cdk8s-team / cdk8s

Define Kubernetes native apps and abstractions using object-oriented programming
https://cdk8s.io
Apache License 2.0
4.29k stars 290 forks source link

Add validation for values #1338

Closed yairyairyair closed 1 week ago

yairyairyair commented 1 year ago

I want that cdk8s will verify some values that kubernetes api server already validates, for example if you input a i valid deployment name and apply in kubernetes it will give you an error that a deployment name needs to be of regex.... We need that same regex validation after the cdk8s generate or somewhere.

Let me know your thoughts

iliapolo commented 1 year ago

Marked this as a p2. It won't be on our immediate roadmap but will get bumped if enough folks vote for it. PR's are welcome :)

mcouthon commented 1 year ago

Encountered this now as well. Someone added an underscore to a string that went in a label. The synth passed fine, and we only discovered it at deploy time. Do you have a good workaround for that, maybe? Is there some ability to pass a validator to the synth command? Us implementing this from scratch wouldn't be prudent.

github-actions[bot] commented 2 weeks ago

This issue has not received any attention in 1 year and will be closed soon. If you want to keep it open, please leave a comment below @mentioning a maintainer.