kube-linter icon indicating copy to clipboard operation
kube-linter copied to clipboard

[FEATURE_REQUEST] env-var template for validating environment variables in ConfigMap

Open jeraldsm opened this issue 2 years ago • 1 comments

Description of the problem/feature request As a Developer, I would like to validate if the environment variables configured in the ConfigMap matches a specific pattern. Example:

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: app-config
data:
  APP_TAGS: example-value

Description of the existing behavior vs. expected behavior

The validation of environment variables is currently possible only for deployment objects and it wont validate the variables defined in ConfigMap. But we define the environment specific variables in ConfigMap. So it would be great, if we have something similar to this:

  - name: app-configmap-env-var-check
    template: env-var
    params:
      name: APP_TAGS
      value: "!(example-value)"
    scope:
      objectKinds:
        - ConfigMap

jeraldsm avatar Jan 13 '23 06:01 jeraldsm

Hi @janisz

Do you have an ETA for implementing this feature ? Just wanted to check if this feature can be implemented at the earliest, as I was working on project which needs this feature.

Many Thanks. Jerald

jeraldsm avatar Jan 23 '23 06:01 jeraldsm