To prevent continuous regeneration of mutating webhooks by CD tools, you can provide a custom certificate for Hub admission webhooks using one of three methods:
Method 1: Direct Base64 strings in values.yaml
Generate a self-signed certificate and provide the base64 encoded strings directly.
hub:
token: traefik-hub-license
apimanagement:
enabled: true
admission:
customWebhookCertificate:
tls.crt: <base64_crt>
tls.key: <base64_key>
Note: When using --set via CLI, escape the dots: hub.apimanagement.admission.customWebhookCertificate.tls\.crt.
Method 2: Using cert-manager CA injector
Use annotations to allow cert-manager to inject the CA from a specific certificate resource.
hub:
token: traefik-hub-license
apimanagement:
enabled: true
admission:
selfManagedCertificate: true
secretName: admission-tls
annotations:
cert-manager.io/inject-ca-from: traefik/admission-tls
Method 3: Using an existing Kubernetes Secret
If you have a certificate stored in a managed secret, enable selfManagedCertificate.
hub:
apimanagement:
admission:
selfManagedCertificate: true