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
selector:
matchLabels:
{{- include "pulsar.matchLabels" . | nindent 6 }}
component: {{ .Values.autorecovery.component }}
{{- end }}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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