Skip to content

Commit

Permalink
fix issues with extra labels feature (#20917)
Browse files Browse the repository at this point in the history
  • Loading branch information
xpuska513 authored Dec 29, 2022
1 parent d98ddbb commit 8108f9c
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 60 deletions.
10 changes: 0 additions & 10 deletions charts/airbyte-bootloader/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ helm.sh/chart: {{ include "airbyte.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.extraLabels}}
{{- with mergeOverwrite .Values.extraLabels .Values.global.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -53,11 +48,6 @@ Selector labels
{{- define "airbyte.selectorLabels" -}}
app.kubernetes.io/name: {{ include "airbyte.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.extraSelectorLabels}}
{{- with mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand Down
3 changes: 3 additions & 0 deletions charts/airbyte-bootloader/templates/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 4 }}
{{- end }}
Expand Down
10 changes: 0 additions & 10 deletions charts/airbyte-cron/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ helm.sh/chart: {{ include "airbyte.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.extraLabels}}
{{- with mergeOverwrite .Values.extraLabels .Values.global.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -53,11 +48,6 @@ Selector labels
{{- define "airbyte.selectorLabels" -}}
app.kubernetes.io/name: {{ include "airbyte.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.extraSelectorLabels}}
{{- with mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand Down
6 changes: 6 additions & 0 deletions charts/airbyte-cron/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "airbyte.selectorLabels" . | nindent 6 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 6 }}
{{- end }}
template:
metadata:
labels:
Expand Down
10 changes: 0 additions & 10 deletions charts/airbyte-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ helm.sh/chart: {{ include "airbyte.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.extraLabels}}
{{- with mergeOverwrite .Values.extraLabels .Values.global.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -53,11 +48,6 @@ Selector labels
{{- define "airbyte.selectorLabels" -}}
app.kubernetes.io/name: {{ include "airbyte.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.extraSelectorLabels}}
{{- with mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand Down
6 changes: 6 additions & 0 deletions charts/airbyte-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "airbyte.selectorLabels" . | nindent 6 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 6 }}
{{- end }}
strategy:
type: Recreate # Needed due to volume claims
template:
Expand Down
3 changes: 3 additions & 0 deletions charts/airbyte-server/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ spec:
name: http
selector:
{{- include "airbyte.selectorLabels" . | nindent 4 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 4 }}
{{- end }}
10 changes: 0 additions & 10 deletions charts/airbyte-temporal/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ helm.sh/chart: {{ include "airbyte.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.extraLabels}}
{{- with mergeOverwrite .Values.extraLabels .Values.global.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -53,11 +48,6 @@ Selector labels
{{- define "airbyte.selectorLabels" -}}
app.kubernetes.io/name: {{ include "airbyte.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.extraSelectorLabels}}
{{- with mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand Down
6 changes: 6 additions & 0 deletions charts/airbyte-temporal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "airbyte.selectorLabels" . | nindent 6 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 4 }}
{{- end }}
template:
metadata:
labels:
Expand Down
3 changes: 3 additions & 0 deletions charts/airbyte-temporal/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ spec:
targetPort: 7233
selector:
{{- include "airbyte.selectorLabels" . | nindent 4 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 4 }}
{{- end }}
10 changes: 0 additions & 10 deletions charts/airbyte-webapp/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ helm.sh/chart: {{ include "airbyte.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.extraLabels}}
{{- with mergeOverwrite .Values.extraLabels .Values.global.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -53,11 +48,6 @@ Selector labels
{{- define "airbyte.selectorLabels" -}}
app.kubernetes.io/name: {{ include "airbyte.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.extraSelectorLabels}}
{{- with mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}


Expand Down
6 changes: 6 additions & 0 deletions charts/airbyte-webapp/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "airbyte.selectorLabels" . | nindent 6 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 6 }}
{{- end }}
template:
metadata:
labels:
Expand Down
3 changes: 3 additions & 0 deletions charts/airbyte-webapp/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
name: http
selector:
{{- include "airbyte.selectorLabels" . | nindent 4 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 4 }}
{{- end }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
10 changes: 0 additions & 10 deletions charts/airbyte-worker/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ helm.sh/chart: {{ include "airbyte.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.extraLabels}}
{{- with mergeOverwrite .Values.extraLabels .Values.global.extraLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -53,11 +48,6 @@ Selector labels
{{- define "airbyte.selectorLabels" -}}
app.kubernetes.io/name: {{ include "airbyte.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.extraSelectorLabels}}
{{- with mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels }}
{{ toYaml .}}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand Down
6 changes: 6 additions & 0 deletions charts/airbyte-worker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "airbyte.selectorLabels" . | nindent 6 }}
{{- if .Values.extraSelectorLabels }}
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 6 }}
{{- end }}
template:
metadata:
labels:
Expand Down

0 comments on commit 8108f9c

Please sign in to comment.