Skip to content

Commit d153a50

Browse files
committed
Change prometheus annotation
use TLS port in case nonTlS
1 parent 7803fe7 commit d153a50

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/resource/statefulset.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,14 @@ func sortVolumeMounts(mounts []corev1.VolumeMount) {
280280

281281
func (builder *StatefulSetBuilder) podTemplateSpec(previousPodAnnotations map[string]string) corev1.PodTemplateSpec {
282282
// default pod annotations used for prometheus metrics
283+
prometheusPort := "15692"
284+
if builder.Instance.DisableNonTLSListeners() {
285+
prometheusPort = "15691"
286+
}
287+
283288
defaultPodAnnotations := map[string]string{
284289
"prometheus.io/scrape": "true",
285-
"prometheus.io/port": "15692",
290+
"prometheus.io/port": prometheusPort,
286291
}
287292

288293
//Init Container resources

0 commit comments

Comments
 (0)