Skip to content

Commit

Permalink
Added prometheus port name
Browse files Browse the repository at this point in the history
  • Loading branch information
guicholeo committed Nov 13, 2023
1 parent 56f161c commit d36d852
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
8 changes: 5 additions & 3 deletions keda/templates/manager/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ spec:
failureThreshold: {{ .Values.operator.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.operator.readinessProbe.successThreshold }}
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 9666
name: metricsservice
protocol: TCP
{{- if .Values.prometheus.operator.enabled }}
- containerPort: {{ .Values.prometheus.operator.port }}
name: {{ .Values.prometheus.operator.portName }}
protocol: TCP
{{- end }}
env:
- name: WATCH_NAMESPACE
value: {{ .Values.watchNamespace | quote }}
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/manager/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
port: 9666
targetPort: 9666
{{- if .Values.prometheus.operator.enabled }}
- name: metrics
- name: {{ .Values.prometheus.operator.portName }}
port: {{ .Values.prometheus.operator.port }}
targetPort: {{ .Values.prometheus.operator.port }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/metrics-server/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
{{- toYaml . | nindent 4 }}
{{- end }}
endpoints:
- port: {{ .Values.prometheus.metricServer.portName }}
- port: {{ .Values.prometheus.metricServer.serviceMonitor.port }}
{{- with .Values.prometheus.metricServer.serviceMonitor.targetPort }}
targetPort: {{ . }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/webhooks/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ spec:
protocol: TCP
{{- if .Values.prometheus.webhooks.enabled }}
- containerPort: {{ .Values.prometheus.webhooks.port }}
name: metrics
name: {{ .Values.prometheus.webhooks.portName }}
protocol: TCP
{{- end }}
env:
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/webhooks/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
protocol: TCP
targetPort: {{ .Values.webhooks.port | default 9443 }}
{{- if .Values.prometheus.webhooks.enabled }}
- name: {{ .Values.prometheus.webhooks.serviceMonitor.port }}
- name: {{ .Values.prometheus.webhooks.portName }}
port: {{ .Values.prometheus.webhooks.port }}
targetPort: {{ .Values.prometheus.webhooks.port }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ prometheus:
enabled: false
# -- Port used for exposing KEDA Operator prometheus metrics
port: 8080
# -- HTTP port name for exposing KEDA Operator prometheus metrics
portName: metrics
serviceMonitor:
# -- Enables ServiceMonitor creation for the Prometheus Operator
enabled: false
Expand Down Expand Up @@ -622,6 +624,8 @@ prometheus:
enabled: false
# -- Port used for exposing KEDA admission webhooks prometheus metrics
port: 8080
# -- HTTP port name for KEDA admission webhooks prometheus metrics
portName: metrics
serviceMonitor:
# -- Enables ServiceMonitor creation for the Prometheus webhooks
enabled: false
Expand Down

0 comments on commit d36d852

Please sign in to comment.