Which version of kube-score are you using?
kube-score version: v1.13.0
What did you do?
Using a Helm chart that explicitly sets namespaces, with resources that rely on the execution context to set the namespace, means that resources that work together produce an error. For example
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
labels:
app.kubernetes.io/name: app
namespace: default
spec:
selector:
matchLabels:
app.kubernetes.io/name: app
template:
metadata:
name: my-app
labels:
app.kubernetes.io/name: app
spec:
containers:
- name: my-app
image: nginx
and
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: my-app
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: app
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: app
errors because the deployment and network policy don't both explicitly identify the same namespace.
What did you expect to see?
I expected kube-score to have a concept of the current namespace to use when not explicitly stated.
What did you see instead?
An error
[CRITICAL] Pod NetworkPolicy
· The pod does not have a matching NetworkPolicy
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too