fix(crds): remove allowEmptyValue to fix ArgoCD perpetual OutOfSync#481
fix(crds): remove allowEmptyValue to fix ArgoCD perpetual OutOfSync#481pierluigilenoci wants to merge 1 commit intolitmuschaos:masterfrom
Conversation
|
@Jonsy13 @ispeakc0de this is ready for review. Simple removal of an invalid OpenAPI field that the K8s API server strips, causing ArgoCD drift. No validation is lost since |
|
@ksatchit @Jasstkn @uditgaurav could you please review this when you get a chance? Thanks! |
1af37b9 to
b0c7f07
Compare
|
Hey @pierluigilenoci Could you please resolve the conflicts? |
Remove `allowEmptyValue: false` from all CRD schemas across all charts. This field is not part of the OpenAPI v3 JSON Schema spec used by Kubernetes CRDs. The API server silently strips it when the CRD is applied, creating a perpetual diff between the desired state (with the field) and the live state (without it). ArgoCD detects this diff and reports the CRDs as OutOfSync indefinitely. The existing `minLength: 1` constraints already enforce the same validation, so removing `allowEmptyValue` does not reduce any schema protection. Affected charts: litmus-core, litmus-agent, kube-aws, kube-azure, kube-gcp, kubernetes-chaos. Fixes litmuschaos#419 Signed-off-by: Pierluigi Lenoci <pierluigi.lenoci@gmail.com>
b0c7f07 to
ea1a429
Compare
|
Done — rebased on latest master, conflicts resolved. Ready for review! |
|
Hi @PriteshKiri — I've verified the branch is already based on the latest master ( |
|
@pierluigilenoci yes, conflicts are resolved now @ispeakc0de will be reviewing it shortly. |
|
Hi @ispeakc0de, @Jonsy13 -- friendly follow-up. @PriteshKiri confirmed on Mar 31 that conflicts are resolved and mentioned @ispeakc0de would review shortly. It's been about 10 days since then. CI is green and all checks pass. Would you be able to take a look? Thank you! |
Summary
Remove
allowEmptyValue: falsefrom all CRD schemas across 7 files in 6 charts.Problem
allowEmptyValueis not a valid field in the OpenAPI v3 JSON Schema used by Kubernetes CRDs. When the CRD is applied, the K8s API server silently strips it. ArgoCD then detects a diff between the desired state (with the field) and the live state (without it), causing a perpetual OutOfSync status — even withServerSideApply=true.Fix
Remove all 11 occurrences of
allowEmptyValue: falseacross all charts. The existingminLength: 1constraints already enforce the same validation.Affected charts:
crds/chaosengine_crd.yamlcrds/chaosexperiment_crd.yamltemplates/crds.yamlcrds/chaosexperiment_crd.yamlcrds/chaosexperiment_crd.yamlcrds/chaosexperiment_crd.yamlcrds/chaosexperiment_crd.yamlCloses #419
Test plan
grep -rn allowEmptyValue charts/returns zero matches