-
Notifications
You must be signed in to change notification settings - Fork 61
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
Duplicate MutatingWebhookConfiguration #1665
Comments
Hoy @graipher. The two webhooks with the same name are intended. The reason for that is a bit complicated: Connaisseur is a admission controller that runs inside the k8s cluster and is hooked up into k8s with a so called In order to avoid this situation, we set up the Connaisseur installation, so that the How do we solve this problem? The helm hooks have so called delete policies, that automatically delete the given resource in configurable circumstances. We can't set those policies for the regular With this setup we achieve our two main goals:
We also aechive all of this without any users needing to manually apply/delete the |
Now for your problem .. maybe there is still a solution. Does kustomize alle overwritting the values of the helm chart? |
Hey @phbelitz, thanks for the explanation! When I saw that helm hooks are involved, I knew there might be a reason for it, but I was hoping it was just an oversight that the names are actually identical. Yes, namespace: connaisseur
resources:
- namespace.yml
helmCharts:
- name: connaisseur
repo: https://sse-secure-systems.github.io/connaisseur/charts
releaseName: connaisseur
namespace: connaisseur
valuesFile: values.yml
version: 2.5.0
includeCRDs: true Currently I only configure the ---
application:
# validator options: https://sse-secure-systems.github.io/connaisseur/latest/validators/
validators:
- name: allow
type: static
approve: true
- name: deny
type: static
approve: false
- name: dockerhub
type: notaryv1
trustRoots:
- name: default # root from dockerhub
key: |
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOXYta5TgdCwXTCnLU09W5T4M4r9f
QQrqJuADP6U7g5r9ICgPSmZuRHP/1AYUfOQW3baveKsT969EfELKj1lfCA==
-----END PUBLIC KEY-----
- name: sse # root from sse
key: |
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEsx28WV7BsQfnHF1kZmpdCTTLJaWe
d0CA+JOi8H4REuBaWSZ5zPDe468WuOJ6f71E7WFg3CVEVYHuoZt2UYbN/Q==
-----END PUBLIC KEY-----
- name: example
type: cosign
trustRoots:
# the `default` key is used if no key is specified in image policy
- name: default
key: |
-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----
policy:
- pattern: "*:*"
validator: deny
- pattern: "docker.io/library/*:*"
validator: dockerhub
- pattern: "docker.io/securesystemsengineering/*:*"
validator: dockerhub
with:
trustRoot: sse
- pattern: "registry.k8s.io/*:*"
validator: allow
- pattern: "registry.example.com/*:*"
validator: example
features:
namespacedValidation:
mode: validate # 'ignore' or 'validate'
detectionMode: true
logLevel: debug |
Describe the bug
There are currently two
MutatingWebhookConfiguration
resources in the chart (defined here), but they have the same name. While helm ignores this, k8s will (probably) apply only the second one, overwriting the first. But, crucially for me, when trying to inflate the helm chart using kustomize it (properly) fails saying that a resource with that ID already exists.Expected behavior
The two webhook configurations should have unique names.
To reproduce
Create a folder
connaisseur
and place these two files inside:a
kustomization.yml
file:a
namespace.yml
file:Run
kustomize build connaisseur --enable-helm
and get the following error:Versions:
Additional context
The two webhook configurations do differ in their annotations, but that is not enough to make them unique.
Currently they are defined as:
The text was updated successfully, but these errors were encountered: