Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding correct annotations for svcms and fixing sa #439

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion keda/templates/manager/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Values.operator.name }}
{{- with (mergeOverwrite (deepCopy .Values.additionalAnnotations) .Values.prometheus.operator.podMonitor.annotations) }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
Expand Down
4 changes: 3 additions & 1 deletion keda/templates/manager/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Values.operator.name }}
{{- with (mergeOverwrite (deepCopy .Values.additionalAnnotations) .Values.prometheus.operator.serviceMonitor.annotations) }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
Expand Down
4 changes: 3 additions & 1 deletion keda/templates/metrics-server/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ .Values.operator.name }}-metrics-apiserver
{{- with (mergeOverwrite (deepCopy .Values.additionalAnnotations) .Values.prometheus.metricServer.podMonitor.annotations) }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
Expand Down
6 changes: 5 additions & 1 deletion keda/templates/metrics-server/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Values.operator.name }}-metrics-apiserver
{{- with (mergeOverwrite (deepCopy .Values.additionalAnnotations) .Values.prometheus.metricServer.serviceMonitor.annotations) }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- if or .Values.podIdentity.azureWorkload.enabled .Values.podIdentity.aws.irsa.enabled .Values.serviceAccount.annotations .Values.podIdentity.gcp.enabled }}
annotations:
{{- if .Values.additionalAnnotations }}
{{- toYaml .Values.additionalAnnotations | indent 4 }}
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- end }}
{{- if .Values.podIdentity.azureWorkload.enabled }}
{{- if .Values.podIdentity.azureWorkload.clientId }}
Expand Down
4 changes: 3 additions & 1 deletion keda/templates/webhooks/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ .Values.webhooks.name }}
{{- with (mergeOverwrite (deepCopy .Values.additionalAnnotations) .Values.prometheus.webhooks.serviceMonitor.annotations) }}
annotations:
{{- toYaml .Values.additionalAnnotations | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.webhooks.name }}
{{- include "keda.labels" . | indent 4 }}
Expand Down
10 changes: 10 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ prometheus:
serviceMonitor:
# Enables ServiceMonitor creation for the Prometheus Operator
enabled: false
# Annotations specific for the servicemonitor of the metricServer
annotations: {}
jobLabel:
targetLabels: []
podTargetLabels: []
Expand All @@ -381,6 +383,8 @@ prometheus:
podMonitor:
# Enables PodMonitor creation for the Prometheus Operator
enabled: false
# Annotations specific for the podmnitor of the metricServer
annotations: {}
interval:
scrapeTimeout:
namespace:
Expand All @@ -392,6 +396,8 @@ prometheus:
serviceMonitor:
# Enables ServiceMonitor creation for the Prometheus Operator
enabled: false
# Annotations specific for the servicemonitor of the operator
annotations: {}
jobLabel:
targetLabels: []
podTargetLabels: []
Expand All @@ -405,6 +411,7 @@ prometheus:
podMonitor:
# Enables PodMonitor creation for the Prometheus Operator
enabled: false
annotations: {}
interval:
scrapeTimeout:
namespace:
Expand All @@ -430,6 +437,8 @@ prometheus:
serviceMonitor:
# Enables ServiceMonitor creation for the Prometheus webhooks
enabled: false
# Annotations specific for the servicemonitor of the webhooks
annotations: {}
jobLabel:
targetLabels: []
podTargetLabels: []
Expand All @@ -443,6 +452,7 @@ prometheus:
prometheusRules:
# Enables PrometheusRules creation for the Prometheus Operator
enabled: false
annotations: {}
namespace:
additionalLabels: {}
alerts: []
Expand Down