Skip to content

Commit

Permalink
Merge pull request #34 from foomo/squadron-selector
Browse files Browse the repository at this point in the history
feat: add depricated labels
  • Loading branch information
franklinkim authored Oct 27, 2024
2 parents 383d13d + f4a0de3 commit 4270930
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 15 deletions.
4 changes: 2 additions & 2 deletions charts/squadron-keel-cronjob/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ annotations:
- name: Chart Source
url: https://github.com/foomo/helm-charts
version: 0.1.4
appVersion: 0.1.4
version: 0.1.5
appVersion: 0.1.5
2 changes: 1 addition & 1 deletion charts/squadron-keel-cronjob/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# squadron-keel-cronjob

![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.4](https://img.shields.io/badge/AppVersion-0.1.4-informational?style=flat-square)
![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square)

Squadron Keel CronJob Chart

Expand Down
5 changes: 5 additions & 0 deletions charts/squadron-keel-cronjob/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Selector labels
*/}}
{{- define "keel.cronjob.selectorLabels" -}}
{{ if .Values.global.foomo.withDeprecatedSelectorLabels }}
app.kubernetes.io/name: {{ include "keel.cronjob.fullname" . }}
app.kubernetes.io/component: foomo-keel-cron
{{- else }}
app.kubernetes.io/name: {{ include "keel.cronjob.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- end }}

{{/*
Networking labels
Expand Down
4 changes: 2 additions & 2 deletions charts/squadron-keel-cronjob/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
jobTemplate:
metadata:
labels:
{{- include "keel.cronjob.selectorLabels" . | nindent 8 }}
{{- include "keel.cronjob.labels" . | nindent 8 }}
{{- with .Values.cronjob.jobLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -32,7 +32,7 @@ spec:
template:
metadata:
labels:
{{- include "keel.cronjob.selectorLabels" . | nindent 12 }}
{{- include "keel.cronjob.labels" . | nindent 12 }}
{{- include "keel.cronjob.networkingLabels" . | nindent 12 }}
{{- with .Values.cronjob.podAnnotations }}
annotations: {{- toYaml . | nindent 12 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/squadron-keel-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ annotations:
- name: Chart Source
url: https://github.com/foomo/helm-charts
version: 0.1.9
appVersion: 0.1.9
version: 0.1.10
appVersion: 0.1.10
2 changes: 1 addition & 1 deletion charts/squadron-keel-server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# squadron-keel-server

![Version: 0.1.9](https://img.shields.io/badge/Version-0.1.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.9](https://img.shields.io/badge/AppVersion-0.1.9-informational?style=flat-square)
![Version: 0.1.10](https://img.shields.io/badge/Version-0.1.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.10](https://img.shields.io/badge/AppVersion-0.1.10-informational?style=flat-square)

Squadron Keel Server Chart

Expand Down
5 changes: 5 additions & 0 deletions charts/squadron-keel-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Selector labels
*/}}
{{- define "keel.server.selectorLabels" -}}
{{ if .Values.global.foomo.withDeprecatedSelectorLabels }}
app.kubernetes.io/name: {{ include "keel.server.fullname" . }}
app.kubernetes.io/component: foomo-keel-server
{{- else }}
app.kubernetes.io/name: {{ include "keel.server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- end }}

{{/*
Networking labels
Expand Down
2 changes: 1 addition & 1 deletion charts/squadron-keel-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
template:
metadata:
labels:
{{- include "keel.server.selectorLabels" . | nindent 8 }}
{{- include "keel.server.labels" . | nindent 8 }}
{{- include "keel.server.networkingLabels" . | nindent 8 }}
annotations:
{{- include "keel.server.annotations.recreatePod" . | nindent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/squadron-nextjs-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ annotations:
- name: Chart Source
url: https://github.com/foomo/helm-charts
version: 0.1.3
appVersion: 0.1.3
version: 0.1.4
appVersion: 0.1.4
2 changes: 1 addition & 1 deletion charts/squadron-nextjs-server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# squadron-nextjs-server

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.3](https://img.shields.io/badge/AppVersion-0.1.3-informational?style=flat-square)
![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.4](https://img.shields.io/badge/AppVersion-0.1.4-informational?style=flat-square)

Squadron NextJS Server Chart

Expand Down
4 changes: 2 additions & 2 deletions charts/squadron-nextjs-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Selector labels
*/}}
{{- define "nextjs.server.selectorLabels" -}}
{{ if ((.Values.global).foomo).withDeprecatedSelectorLabels }}
{{ if .Values.global.foomo.withDeprecatedSelectorLabels }}
app.kubernetes.io/name: {{ include "nextjs.server.fullname" . }}
app.kubernetes.io/component: "nextjs"
app.kubernetes.io/component: nextjs
{{ else }}
app.kubernetes.io/name: {{ include "nextjs.server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
Expand Down
2 changes: 1 addition & 1 deletion charts/squadron-nextjs-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
template:
metadata:
labels:
{{- include "nextjs.server.selectorLabels" . | nindent 8 }}
{{- include "nextjs.server.labels" . | nindent 8 }}
{{- include "nextjs.server.networkingLabels" . | nindent 8 }}
annotations:
{{- include "nextjs.server.annotations.recreatePod" . | nindent 8 }}
Expand Down

0 comments on commit 4270930

Please sign in to comment.