Skip to content

Commit

Permalink
Selectors fixed to correctly refer to alertmanager and prometheus
Browse files Browse the repository at this point in the history
  • Loading branch information
ksa-real committed Jan 28, 2022
1 parent cacdebd commit 1bc8849
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ spec:
labelSelector:
matchExpressions:
- {key: app.kubernetes.io/name, operator: In, values: [alertmanager]}
- {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]}
- {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}]}
{{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -110,7 +110,7 @@ spec:
labelSelector:
matchExpressions:
- {key: app.kubernetes.io/name, operator: In, values: [alertmanager]}
- {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}-alertmanager]}
- {key: alertmanager, operator: In, values: [{{ template "kube-prometheus-stack.fullname" . }}]}
{{- end }}
{{- if .Values.alertmanager.alertmanagerSpec.tolerations }}
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: alertmanager
alertmanager: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
alertmanager: {{ template "kube-prometheus-stack.fullname" . }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ spec:
{{- end }}
selector:
app.kubernetes.io/name: alertmanager
alertmanager: {{ template "kube-prometheus-stack.fullname" . }}-alertmanager
alertmanager: {{ template "kube-prometheus-stack.fullname" . }}
type: "{{ .Values.alertmanager.service.type }}"
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ items:
targetPort: {{ $serviceValues.targetPort }}
selector:
app.kubernetes.io/name: alertmanager
alertmanager: {{ template "kube-prometheus-stack.fullname" $ }}-alertmanager
alertmanager: {{ template "kube-prometheus-stack.fullname" $ }}
statefulset.kubernetes.io/pod-name: alertmanager-{{ include "kube-prometheus-stack.fullname" $ }}-{{ $i }}
type: "{{ $serviceValues.type }}"
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
publishNotReadyAddresses: {{ .Values.prometheus.service.publishNotReadyAddresses }}
selector:
app.kubernetes.io/name: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}
{{- if .Values.prometheus.service.sessionAffinity }}
sessionAffinity: {{ .Values.prometheus.service.sessionAffinity }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ spec:
{{- end }}
selector:
app.kubernetes.io/name: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ spec:
{{- end }}
selector:
app.kubernetes.io/name: prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}-prometheus
prometheus: {{ template "kube-prometheus-stack.fullname" . }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if and .Values.prometheus.enabled .Values.prometheus.servicePerReplica.enabled }}
{{- $count := .Values.prometheus.prometheusSpec.replicas | int -}}
{{- $serviceValues := .Values.prometheus.servicePerReplica -}}
{{- $serviceValues := .Values.prometheus.servicePerReplica -}}
apiVersion: v1
kind: List
metadata:
Expand Down Expand Up @@ -39,7 +39,7 @@ items:
targetPort: {{ $serviceValues.targetPort }}
selector:
app.kubernetes.io/name: prometheus
prometheus: {{ include "kube-prometheus-stack.fullname" $ }}-prometheus
prometheus: {{ include "kube-prometheus-stack.fullname" $ }}
statefulset.kubernetes.io/pod-name: prometheus-{{ include "kube-prometheus-stack.fullname" $ }}-{{ $i }}
type: "{{ $serviceValues.type }}"
{{- end }}
Expand Down

0 comments on commit 1bc8849

Please sign in to comment.