Skip to content

Commit

Permalink
Make metrics exposable based on helm variables
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsouza committed Dec 8, 2023
1 parent e29e1dd commit 3af7233
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions charts/zookeeper-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions charts/zookeeper-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 3af7233

Please sign in to comment.