Use the 'pulsar.matchLabels' template for matching components of this chart. (#118)

This also limits the scope of the PodMonitors to the resources of only this install, instead of all installs that share `component:` label values.

Co-authored-by: Matthias van de Meent <matthias.vandemeent@cofano.nl>
This commit is contained in:
MMeent 2022-01-26 14:38:52 +01:00 committed by GitHub
parent 41ff20ec5e
commit c0a8c1b97f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 12 additions and 14 deletions

View File

@ -50,5 +50,6 @@ spec:
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
component: {{ .Values.autorecovery.component }} component: {{ .Values.autorecovery.component }}
{{- end }} {{- end }}

View File

@ -32,8 +32,7 @@ spec:
port: {{ .Values.autorecovery.ports.http }} port: {{ .Values.autorecovery.ports.http }}
clusterIP: None clusterIP: None
selector: selector:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 4 }}
release: {{ .Release.Name }}
component: {{ .Values.autorecovery.component }} component: {{ .Values.autorecovery.component }}
{{- end }} {{- end }}

View File

@ -50,5 +50,6 @@ spec:
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
component: bookie component: bookie
{{- end }} {{- end }}

View File

@ -50,5 +50,6 @@ spec:
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
component: broker component: broker
{{- end }} {{- end }}

View File

@ -45,7 +45,6 @@ spec:
{{- end }} {{- end }}
clusterIP: None clusterIP: None
selector: selector:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 4 }}
release: {{ .Release.Name }}
component: {{ .Values.broker.component }} component: {{ .Values.broker.component }}
{{- end }} {{- end }}

View File

@ -30,8 +30,7 @@ spec:
replicas: {{ .Values.dashboard.replicaCount }} replicas: {{ .Values.dashboard.replicaCount }}
selector: selector:
matchLabels: matchLabels:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 6 }}
release: {{ .Release.Name }}
component: {{ .Values.dashboard.component }} component: {{ .Values.dashboard.component }}
template: template:
metadata: metadata:

View File

@ -33,7 +33,6 @@ spec:
{{ toYaml .Values.dashboard.service.ports | indent 2 }} {{ toYaml .Values.dashboard.service.ports | indent 2 }}
clusterIP: None clusterIP: None
selector: selector:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 4 }}
release: {{ .Release.Name }}
component: {{ .Values.dashboard.component }} component: {{ .Values.dashboard.component }}
{{- end }} {{- end }}

View File

@ -34,7 +34,6 @@ spec:
- name: server - name: server
port: {{ .Values.prometheus.port }} port: {{ .Values.prometheus.port }}
selector: selector:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 4 }}
release: {{ .Release.Name }}
component: {{ .Values.prometheus.component }} component: {{ .Values.prometheus.component }}
{{- end }} {{- end }}

View File

@ -50,5 +50,6 @@ spec:
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
component: proxy component: proxy
{{- end }} {{- end }}

View File

@ -50,7 +50,6 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 4 }}
release: {{ .Release.Name }}
component: {{ .Values.proxy.component }} component: {{ .Values.proxy.component }}
{{- end }} {{- end }}

View File

@ -36,8 +36,7 @@ spec:
targetPort: {{ .Values.pulsar_manager.service.targetPort }} targetPort: {{ .Values.pulsar_manager.service.targetPort }}
protocol: TCP protocol: TCP
selector: selector:
app: {{ template "pulsar.name" . }} {{- include "pulsar.matchLabels" . | nindent 4 }}
release: {{ .Release.Name }}
component: {{ .Values.pulsar_manager.component }} component: {{ .Values.pulsar_manager.component }}
{{- if .Values.pulsar_manager.service.loadBalancerSourceRanges }} {{- if .Values.pulsar_manager.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: loadBalancerSourceRanges:

View File

@ -50,5 +50,6 @@ spec:
targetLabel: kubernetes_pod_name targetLabel: kubernetes_pod_name
selector: selector:
matchLabels: matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
component: zookeeper component: zookeeper
{{- end }} {{- end }}