Skip to content

Commit

Permalink
Helm charts: Fixed more broken labels
Browse files Browse the repository at this point in the history
Signed-off-by: Lalith Kota <[email protected]>
  • Loading branch information
lalithkota committed Jun 24, 2024
1 parent 9682fe1 commit 7650d41
Show file tree
Hide file tree
Showing 19 changed files with 50 additions and 95 deletions.
5 changes: 1 addition & 4 deletions charts/debezium/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
24 changes: 8 additions & 16 deletions charts/debezium/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
{{- if .Values.updateStrategy }}
Expand All @@ -19,14 +15,10 @@ spec:
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) | nindent 6 }}
template:
metadata:
annotations:
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
{{- include "debezium.podAnnotations" . | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.podLabels "context" $) | nindent 8 }}
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
annotations: {{- include "debezium.podAnnotations" . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) | nindent 6 }}
Expand Down
5 changes: 1 addition & 4 deletions charts/debezium/templates/service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
12 changes: 4 additions & 8 deletions charts/debezium/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
apiVersion: v1
kind: Service
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
Expand Down
8 changes: 4 additions & 4 deletions charts/debezium/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: http-metrics
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/opensearch-kafka-connector/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-properties
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
connect-distributed.properties: |-
Expand Down
24 changes: 8 additions & 16 deletions charts/opensearch-kafka-connector/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
{{- if .Values.updateStrategy }}
Expand All @@ -19,14 +15,10 @@ spec:
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) | nindent 6 }}
template:
metadata:
annotations:
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
{{- include "opensearch-kafka-connector.podAnnotations" . | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.podLabels "context" $) | nindent 8 }}
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
annotations: {{- include "opensearch-kafka-connector.podAnnotations" . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) | nindent 6 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
12 changes: 4 additions & 8 deletions charts/opensearch-kafka-connector/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
apiVersion: v1
kind: Service
metadata:
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
name: {{ template "common.names.fullname" . }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ metadata:
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" (dict "customLabels" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: http-metrics
Expand Down
7 changes: 2 additions & 5 deletions charts/reporting-init/templates/configmap-startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "common.names.fullname" . }}-startup
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
data:
startup-command.sh: |-
Expand Down
5 changes: 1 addition & 4 deletions charts/reporting-init/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ apiVersion: batch/v1
kind: Job
metadata:
name: {{ template "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "0"
Expand Down
5 changes: 1 addition & 4 deletions charts/reporting-init/templates/secret-git-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ template "common.names.fullname" . }}-git-config
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" .) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/reporting/templates/kafka-ui/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }}
{{- if .Values.kafka.commonAnnotations }}
{{- if .Values.kafkaUi.commonAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
data:
Expand Down
6 changes: 3 additions & 3 deletions charts/reporting/templates/kafka-ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Deployment
metadata:
name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }}
{{- if .Values.kafka.commonAnnotations }}
{{- if .Values.kafkaUi.commonAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
spec:
Expand All @@ -14,11 +14,11 @@ spec:
strategy: {{- toYaml .Values.kafkaUi.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" $) | nindent 6 }}
matchLabels: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" .Subcharts.kafka) | nindent 6 }}
template:
metadata:
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.podLabels "context" .Subcharts.kafka) | nindent 8 }}
{{- if .Values.kafkaUi.commonAnnotations }}
{{- if .Values.kafkaUi.podAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.podAnnotations "context" $) | nindent 8 }}
{{- end }}
spec:
Expand Down
2 changes: 1 addition & 1 deletion charts/reporting/templates/kafka-ui/gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: Gateway
metadata:
name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }}
{{- if .Values.kafka.commonAnnotations }}
{{- if .Values.kafkaUi.commonAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
spec:
Expand Down
4 changes: 2 additions & 2 deletions charts/reporting/templates/kafka-ui/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kind: Service
metadata:
name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }}
{{- if .Values.kafka.commonAnnotations }}
{{- if .Values.kafkaUi.commonAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
spec:
Expand All @@ -24,6 +24,6 @@ spec:
port: {{ .Values.kafkaUi.service.port }}
protocol: TCP
targetPort: {{ .Values.kafkaUi.containerPort }}
selector: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" $) | nindent 4 }}
selector: {{- include "common.labels.matchLabels" (dict "customLabels" .Values.kafkaUi.podLabels "context" .Subcharts.kafka) | nindent 4 }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/reporting/templates/kafka-ui/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: VirtualService
metadata:
name: {{ include "common.names.fullname" .Subcharts.kafka }}-ui
labels: {{ include "common.labels.standard" (dict "customLabels" .Values.kafkaUi.commonLabels "context" .Subcharts.kafka) | nindent 4 }}
{{- if .Values.kafka.commonAnnotations }}
{{- if .Values.kafkaUi.commonAnnotations }}
annotations: {{ include "common.tplvalues.render" (dict "value" .Values.kafkaUi.commonAnnotations "context" $) | nindent 4 }}
{{- end }}
spec:
Expand Down

0 comments on commit 7650d41

Please sign in to comment.