Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on ConfigMap empty key values? #240

Open
esn89 opened this issue Nov 9, 2023 · 1 comment
Open

Failing on ConfigMap empty key values? #240

esn89 opened this issue Nov 9, 2023 · 1 comment

Comments

@esn89
Copy link

esn89 commented Nov 9, 2023

I have successfully helm linted and helm template some purposefully wrong ConfigMaps, then piping them to kubeconform.

As an example I have:

apiVersion: v1
data:
  ENDPOINT_NAME: 
  ENDPOINT_TYPE: "https"
kind: ConfigMap
metadata:
  name: weee
  namespace: woo

When piped, I get:

cat test.yaml | kubeconform -summary -verbose -strict
stdin - ConfigMap weee is valid
Summary: 1 resource found parsing stdin - Valid: 1, Invalid: 0, Errors: 0, Skipped: 0

How can I make it fail on empty values?

@yannh
Copy link
Owner

yannh commented Nov 18, 2023

Hi @esn89 , Kubeconform only does some pretty basic validation of Kubernetes manifests, using the Kubernetes OpenAPI schemas. In this case I suspect your file is "valid" according to the schema for a Configmap - if it is, Kubeconform is likely not the right tool to validate that you have no empty values, unfortunately 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants