You can use Secrets as values for container environment variables. This validator detects when a Secret used as a source for environment variables is empty. Because of that, no environment variables will be sources from the Secret.
Affected Resources: Deployment, DaemonSet, StatefulSet, CronJob, Job, ReplicaSet, Pod
kind: Deployment
spec:
template:
spec:
containers:
- name: my-container
envFrom:
- secretRef:
name: my-secret # This Secret is empty
kind: Secret
metadata:
name: my-secret
data: {} # Empty data or no data at all
Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.