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

Support excluding certain namespaces in admission webhook configuration #1196

Open
randmonkey opened this issue Dec 16, 2024 · 2 comments
Open

Comments

@randmonkey
Copy link
Contributor

From FTI-6400.
Customers failed to update kube-dns service in kube-system because the validating admission webhook fails.
We could Add such namespace selector in admission webhook configuration to exclude kube-system service:

  ingressController:
    admissionWebhook:
      namespaceSelector:
        matchExpressions:
          - key: kubernetes.io/metadata.name
            operator: NotIn
            values:
              - kube-system
@lahabana
Copy link
Collaborator

@pmalek mentioned there are existing selectors in admission webhooks. This may bring breaking changes.

Is the right behaviour to change the default in values.yaml? It's technically a breaking change but you can always override it by explicitly setting the value to {}.
This change would require proper documentation but I feel like the annoyance to many valid use cases (blocking EKS upgrades) warrants annoying a few non recommended use-cases. WDYT?

@pmalek
Copy link
Member

pmalek commented Dec 17, 2024

To be precise the one that user hit is in

{{- with .Values.ingressController.admissionWebhook.namespaceSelector }}
namespaceSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
as that's the webhook that validates services.

Is the right behaviour to change the default in values.yaml? It's technically a breaking change but you can always override it by explicitly setting the value to {}.

This could potentially break users' configurations where they rely on webhook and deploy Service (for KIC to reconcile) in kube-system ns. Probably the blast radius is small but it's possible. I'd suggest to document this in kong/README.md (perhaps in a section Excluding objects from webhook validation) rather than change this in a minor/patch version bump.

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

3 participants