Severity: Warning | Category: Kubernetes
Environment variable is referenced in a Kubernetes manifest but not defined in the .env file.
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
template:
spec:
containers:
- name: app
env:
- name: API_ENDPOINT
value: "https://api.example.com"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: db-secret
key: url
API_ENDPOINT=https://api.example.com
# DATABASE_URL is missing!
$ envcheck k8s-sync k8s/**/*.yaml --env .env.example
k8s/deployment.yaml: W005: Key in K8s but missing in .env: DATABASE_URL
# .envcheckrc.yaml
rules:
W005:
severity: warning
ignore_namespaces:
- kube-system
- monitoring