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

Change chart to only set matchConditions on webhooks when the value parameter is not empty #3410

Open
martijnvdp opened this issue Jun 3, 2024 · 1 comment · May be fixed by #3412
Open
Labels
enhancement New feature or request

Comments

@martijnvdp
Copy link

martijnvdp commented Jun 3, 2024

Describe the solution you'd like

would be nice if the following statements only set this matchConditions if the value .Values.validatingWebhookMatchConditions is not [] empty

kind: ValidatingWebhookConfiguration
  {{- if ge (int .Capabilities.KubeVersion.Minor) 28 }}
  matchConditions: {{ toYaml .Values.validatingWebhookMatchConditions | nindent 4 }}
  {{- end }}

due a bug in argocd i am getting an error in argocd due this new setting:

Failed to compare desired state to live state: failed to perform pre-diff normalization: error building typed results: error creating typedConfig: .webhooks[name="validation.gatekeeper.sh"].matchConditions: field not declared in schema

see issue: argoproj/gitops-engine#558

but i'm not even using this parameter so as a workaround it would be nice if the chart left this parameter out when .values.validatingWebhookMatchConditions : []
same for mutatingWebhookMatchConditions

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Gatekeeper version: 3.16.3
  • Kubernetes version: 1.28
  • Argo v2.10.1+a79e0ea
@martijnvdp martijnvdp added the enhancement New feature or request label Jun 3, 2024
@martijnvdp
Copy link
Author

martijnvdp commented Jun 3, 2024

was able to fix the error by removing

    resource.customizations.ignoreDifferences.all: |
        managedFieldsManagers:
        - kube-controller-manager

which i had set in my argocd configmap

now its only drifiting on the matchConditions field as it ommited when its empty so would still be better not set it in the manifest when its empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant