Skip to content

Comments

[kube-prometheus-stack] Fix operator tls handling when admission webhooks are disabled#6602

Open
firasmosbehi wants to merge 1 commit intoprometheus-community:mainfrom
firasmosbehi:fix/kps-operator-tls-without-webhook-6586
Open

[kube-prometheus-stack] Fix operator tls handling when admission webhooks are disabled#6602
firasmosbehi wants to merge 1 commit intoprometheus-community:mainfrom
firasmosbehi:fix/kps-operator-tls-without-webhook-6586

Conversation

@firasmosbehi
Copy link
Contributor

Summary

  • fix Prometheus Operator TLS rendering when prometheusOperator.admissionWebhooks.enabled=false
  • compute effective operator TLS as enabled only when a certificate source exists:
    • admission webhooks enabled, or
    • cert-manager admission certs enabled, or
    • prometheusOperator.tls.secretName explicitly set
  • avoid mounting the generated *-admission secret when it is not created
  • switch operator Service, ServiceMonitor, and operator network policies to the same effective TLS mode
  • add prometheusOperator.tls.secretName to values for users who want TLS without admission webhooks
  • add regression unit tests for deployment/service/servicemonitor behavior and bump chart version to 81.5.1

Closes #6586.

Testing

  • helm unittest --strict --file 'unittests/**/*.yaml' charts/kube-prometheus-stack
  • helm lint charts/kube-prometheus-stack
  • GITHUB_SHA=$(git rev-parse HEAD) ct lint --config .github/linters/ct.yaml --charts charts/kube-prometheus-stack

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
templates:
- prometheus-operator/deployment.yaml
tests:
- it: falls back to http when admission webhooks are disabled and no tls secret is provided
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If prometheusOperator.tls.enabled is set to true, I expect that the operator is configured with tls. Automatic behavior feels dangerous here.

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

Successfully merging this pull request may close these issues.

[kube-prometheus-stack] Helm chart won't install with admission webhook disabled

2 participants