Skip to content

fix(helm): derive metrics Certificate dnsNames from resourceName helper - #291

Merged
GrigoryPervakov merged 2 commits into
ClickHouse:mainfrom
kazuki-ma:fix/metrics-certs-dnsnames
Aug 20, 2026
Merged

fix(helm): derive metrics Certificate dnsNames from resourceName helper#291
GrigoryPervakov merged 2 commits into
ClickHouse:mainfrom
kazuki-ma:fix/metrics-certs-dnsnames

Conversation

@kazuki-ma

Copy link
Copy Markdown
Contributor

Why

The metrics Certificate hardcoded its dnsNames as clickhouse-operator-metrics-service while the metrics Service and the ServiceMonitor's tlsConfig.serverName are rendered through the clickhouse-operator.resourceName helper. With any release name other than the default fullname the SAN never matched and secure scraping failed x509 verification (insecureSkipVerify: false when certManager is enabled).

What

Replaced the two hardcoded dnsNames entries in dist/chart/templates/cert-manager/metrics-certs.yaml with the same clickhouse-operator.resourceName helper (suffix metrics-service) that the metrics Service and the ServiceMonitor already use, so the certificate SANs always follow the rendered Service name.

Verified with helm template myrelease ./dist/chart --namespace demo --set prometheus.enabled=true --set certManager.enabled=true --set metrics.enabled=true --set metrics.secure=true: the Certificate dnsNames and the ServiceMonitor serverName now both render myrelease-clickhouse-operator-metrics-service.demo.svc.

Related Issues

Fixes #290

The metrics Certificate hardcoded its dnsNames as
clickhouse-operator-metrics-service while the metrics Service and the
ServiceMonitor's tlsConfig.serverName are rendered through the
clickhouse-operator.resourceName helper. With any release name other
than the default fullname the SAN never matched and secure scraping
failed x509 verification.

Fixes ClickHouse#290

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Aug 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@GrigoryPervakov

Copy link
Copy Markdown
Member

@kazuki-ma thank you for contribution. I'm ready to merge, but please sign SLA before I can do it

@kazuki-ma

Copy link
Copy Markdown
Contributor Author

Thank you. I just signed CLA.

@GrigoryPervakov
GrigoryPervakov merged commit c6d40fe into ClickHouse:main Aug 20, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants