Skip to content

Commit 7417bf8

Browse files
committed
Enable prom-exporter with tls
1 parent 7a42fe0 commit 7417bf8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

controllers/ceilometer_controller.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,13 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
13041304
"CeilometerPassword": string(ceilometerPasswordSecret.Data["CeilometerPassword"]),
13051305
"ceilometer_compute_image": instance.Spec.ComputeImage,
13061306
"ceilometer_ipmi_image": instance.Spec.IpmiImage,
1307+
"TLS": false,
1308+
}
1309+
1310+
if instance.Spec.TLS.Enabled(){
1311+
templateParameters["TLS"] = true
1312+
templateParameters["TlsCert"] = fmt.Sprintf("/etc/pki/tls/certs/%s", tls.CertKey)
1313+
templateParameters["TlsKey"] = fmt.Sprintf("/etc/pki/tls/private/%s", tls.PrivateKey)
13071314
}
13081315

13091316
cms := []util.Template{

templates/ceilometercompute/config/ceilometer.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ transport_url={{ .TransportURL }}
3333

3434
[polling]
3535
heartbeat_socket_dir=/var/lib/ceilometer
36+
{{- if .TLS }}
37+
Prometheus_tls_enable = True
38+
Prometheus_tls_cert = {{ .TlsCert }}
39+
Prometheus_tls_key = {{ .TlsKey }}
40+
{{- end }}
3641

3742
[publisher]
3843
telemetry_secret=eQ5qb0yysfJ8lx82Vl061vSyY

0 commit comments

Comments
 (0)