diff --git a/charts/zookeeper-operator/templates/operator.yaml b/charts/zookeeper-operator/templates/operator.yaml index eb8223ad..eeeaeb53 100644 --- a/charts/zookeeper-operator/templates/operator.yaml +++ b/charts/zookeeper-operator/templates/operator.yaml @@ -33,12 +33,13 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - containerPort: 6000 + - containerPort: {{ int .Values.metricsPort }} name: metrics command: - zookeeper-operator - {{- if .Values.disableFinalizer }} args: + - -metrics-bind-address={{ .Values.metricsBindAddress }}:{{ int .Values.metricsPort }} + {{- if .Values.disableFinalizer }} - -disableFinalizer {{- end }} env: diff --git a/charts/zookeeper-operator/values.yaml b/charts/zookeeper-operator/values.yaml index afc8397e..3830f81f 100644 --- a/charts/zookeeper-operator/values.yaml +++ b/charts/zookeeper-operator/values.yaml @@ -86,3 +86,7 @@ additionalVolumes: {} # emptyDir: {} disableFinalizer: false + +## In order to enable gathering metrics by Prometheus etc... bind to 0.0.0.0 +metricsBindAddress: 127.0.0.1 +metricsPort: "6000"