Open dewe opened 1 year ago
+1 I have the same issue
Currently we workaround this problem by adding
-skip SealedSecret
to kubeconform.
We ran into the same issue, but I wanted to share our workaround in case anyone else could benefit of it. Instead of skipping validation we are opting to sanitize the input with yq
(this approach could also have some drawbacks).
<generate or print manifests> | yq 'del(.metadata.creationTimestamp)' | kubeconform <arguments>
Which component: kubeseal version: v0.23.1
Describe the bug SealedSecrets from kubeseal contains the field
.spec.template.metadata.creationTimestamp: null
, which is not accepted by the CRD schema when tested withkubeconform
(https://github.com/yannh/kubeconform).To Reproduce Steps to reproduce the behavior:
Convert the CRD OpenAPI file to a JSON schema in a local file, as described here:
Create a sample sealed secret:
Run the
kubeconform
, checking the schemaIn output above you find: ... properties/spec/properties/template/properties/metadata/additionalProperties: additionalProperties 'creationTimestamp' not allowed
Expected behavior CRD OpenAPI schema should accept SealedSecrets created by kubeseal. With previous versions of SealedSecrets, kubeconform did not complain about the resource being invalid.
Additional context I'd guess it's this change that's the root cause: https://github.com/bitnami-labs/sealed-secrets/commit/ebefedf91530ec6311e9ba863d5265d9beeeb273#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R58
Currently we workaround this problem by adding
-skip SealedSecret
to kubeconform.