From b0b79c58f70d4aa204c3900eaee99b91773ea06b Mon Sep 17 00:00:00 2001 From: Chris Thornton Date: Tue, 7 May 2024 15:06:19 -0700 Subject: [PATCH 1/3] Add selectorLabels for baserow pods This lets you add other labels to the deployments that you may need --- charts/baserow/README.md | 4 ++++ charts/baserow/templates/_helpers.tpl | 12 ++++++++++++ charts/baserow/values.schema.json | 12 ++++++++++++ charts/baserow/values.yaml | 12 ++++++++++++ 4 files changed, 40 insertions(+) diff --git a/charts/baserow/README.md b/charts/baserow/README.md index 7750aff1..2d613c28 100644 --- a/charts/baserow/README.md +++ b/charts/baserow/README.md @@ -66,6 +66,7 @@ The command removes all the Kubernetes components associated with the chart and | backend.asgi.resources | object | `{}` | Resource limits and requests for the controller pods. | | backend.asgi.revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain | | backend.asgi.securityContext | object | `{"runAsGroup":9999,"runAsNonRoot":true,"runAsUser":9999}` | container-level security context | +| backend.asgi.selectorLabels | object | `{}` | Labels to add to the pod | | backend.asgi.service.port | int | `8000` | Kubernetes port where service is exposed | | backend.asgi.service.type | string | `"ClusterIP"` | Kubernetes service type | | backend.asgi.serviceAccount.annotations | object | `{}` | Annotations to add to the service account | @@ -90,6 +91,7 @@ The command removes all the Kubernetes components associated with the chart and | backend.celery.resources | object | `{}` | Resource limits and requests for the controller pods. | | backend.celery.revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain | | backend.celery.securityContext | object | `{"runAsGroup":9999,"runAsNonRoot":true,"runAsUser":9999}` | container-level security context | +| backend.celery.selectorLabels | object | `{}` | Labels to add to the pod | | backend.celery.serviceAccount.annotations | object | `{}` | Annotations to add to the service account | | backend.celery.serviceAccount.create | bool | `true` | Specifies whether a service account should be created | | backend.celery.serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | @@ -189,6 +191,7 @@ The command removes all the Kubernetes components associated with the chart and | backend.wsgi.resources | object | `{}` | Resource limits and requests for the controller pods. | | backend.wsgi.revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain | | backend.wsgi.securityContext | object | `{"runAsGroup":9999,"runAsNonRoot":true,"runAsUser":9999}` | container-level security context | +| backend.wsgi.selectorLabels | object | `{}` | Labels to add to the pod | | backend.wsgi.service.port | int | `8000` | Kubernetes port where service is exposed | | backend.wsgi.service.type | string | `"ClusterIP"` | Kubernetes service type | | backend.wsgi.serviceAccount.annotations | object | `{}` | Annotations to add to the service account | @@ -241,6 +244,7 @@ The command removes all the Kubernetes components associated with the chart and | frontend.resources | object | `{}` | Resource limits and requests for the controller pods. | | frontend.revisionHistoryLimit | int | `10` | The number of old ReplicaSets to retain | | frontend.securityContext | object | `{"runAsGroup":9999,"runAsNonRoot":true,"runAsUser":9999}` | container-level security context | +| frontend.selectorLabels | object | `{}` | Labels to add to the pod | | frontend.service.port | int | `3000` | Kubernetes port where service is exposed | | frontend.service.type | string | `"ClusterIP"` | Kubernetes service type | | frontend.serviceAccount.annotations | object | `{}` | Annotations to add to the service account | diff --git a/charts/baserow/templates/_helpers.tpl b/charts/baserow/templates/_helpers.tpl index 859a4286..16935d8e 100644 --- a/charts/baserow/templates/_helpers.tpl +++ b/charts/baserow/templates/_helpers.tpl @@ -77,6 +77,9 @@ Selector labels for the frontend pods and deployment {{- define "baserow.frontend.selectorLabels" -}} app.kubernetes.io/name: {{ include "baserow.frontend.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{- range $k, $v := .Values.frontend.selectorLabels }} +{{ $k}}: {{ $v }} +{{- end }} {{- end }} {{/* @@ -130,6 +133,9 @@ Selector labels for the asgi backend {{- define "baserow.backend.asgi.selectorLabels" -}} app.kubernetes.io/name: {{ include "baserow.backend.asgi.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{- range $k, $v := .Values.backend.asgi.selectorLabels }} +{{ $k}}: {{ $v }} +{{- end }} {{- end }} {{/* @@ -176,6 +182,9 @@ Selector labels for the wsgi backend {{- define "baserow.backend.wsgi.selectorLabels" -}} app.kubernetes.io/name: {{ include "baserow.backend.wsgi.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{- range $k, $v := .Values.backend.wsgi.selectorLabels }} +{{ $k}}: {{ $v }} +{{- end }} {{- end }} {{/* @@ -280,6 +289,9 @@ Selector labels for the celery workers {{- define "baserow.backend.celery.selectorLabels" -}} app.kubernetes.io/name: {{ include "baserow.backend.celery.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{- range $k, $v := .Values.backend.celery.selectorLabels }} +{{ $k}}: {{ $v }} +{{- end }} {{- end }} {{/* diff --git a/charts/baserow/values.schema.json b/charts/baserow/values.schema.json index dbb5e3be..9ca09271 100644 --- a/charts/baserow/values.schema.json +++ b/charts/baserow/values.schema.json @@ -94,6 +94,9 @@ } } }, + "selectorLabels": { + "type": "object" + }, "service": { "type": "object", "properties": { @@ -213,6 +216,9 @@ } } }, + "selectorLabels": { + "type": "object" + }, "serviceAccount": { "type": "object", "properties": { @@ -615,6 +621,9 @@ } } }, + "selectorLabels": { + "type": "object" + }, "service": { "type": "object", "properties": { @@ -855,6 +864,9 @@ } } }, + "selectorLabels": { + "type": "object" + }, "service": { "type": "object", "properties": { diff --git a/charts/baserow/values.yaml b/charts/baserow/values.yaml index 547e9ba5..9e8c003c 100644 --- a/charts/baserow/values.yaml +++ b/charts/baserow/values.yaml @@ -109,6 +109,9 @@ frontend: # -- Affinity settings for pod assignment affinity: {} + # -- Labels to add to the pod + selectorLabels: {} + # -- additional environment variables to be added to the pods extraEnv: [] @@ -208,6 +211,9 @@ backend: # -- Affinity settings for pod assignment affinity: {} + # -- Labels to add to the pod + selectorLabels: {} + # -- additional environment variables to be added to the pods extraEnv: [] @@ -288,6 +294,9 @@ backend: # -- Affinity settings for pod assignment affinity: {} + # -- Labels to add to the pod + selectorLabels: {} + # -- additional environment variables to be added to the pods extraEnv: [] @@ -528,6 +537,9 @@ backend: # -- Affinity settings for pod assignment affinity: {} + # -- Labels to add to the pod + selectorLabels: {} + # -- additional environment variables to be added to the pods extraEnv: [] From 8a9c3aedad234df228e3bad79400bc623a5e3fa0 Mon Sep 17 00:00:00 2001 From: Christian Huth Date: Thu, 29 Aug 2024 12:56:02 +0200 Subject: [PATCH 2/3] Update Chart.yaml --- charts/baserow/Chart.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/baserow/Chart.yaml b/charts/baserow/Chart.yaml index 6fd51c82..337409f7 100644 --- a/charts/baserow/Chart.yaml +++ b/charts/baserow/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: baserow description: Baserow is an open source no-code database and Airtable alternative. type: application -version: 2.1.1 +version: 2.1.4 appVersion: "1.22.3" home: https://github.com/christianknell/helm-charts icon: https://baserow.io/img/favicon_192.png @@ -24,8 +24,8 @@ dependencies: annotations: artifacthub.io/category: database artifacthub.io/changes: | - - kind: changed - description: bumped helm dependency for postgresql to 14.1.3 + - kind: added + description: option to define additional selector labels artifacthub.io/screenshots: | - title: Create your own online database without technical experience. url: https://baserow.io/_nuxt/img/home_intro_screenshot.194c66b.png From d028529083a6317e25b38ca01e54d7bf637577b4 Mon Sep 17 00:00:00 2001 From: Christian Huth Date: Thu, 29 Aug 2024 12:57:20 +0200 Subject: [PATCH 3/3] Update values.yaml --- charts/baserow/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/baserow/values.yaml b/charts/baserow/values.yaml index 9e8c003c..1925db7f 100644 --- a/charts/baserow/values.yaml +++ b/charts/baserow/values.yaml @@ -109,7 +109,7 @@ frontend: # -- Affinity settings for pod assignment affinity: {} - # -- Labels to add to the pod + # -- Additional labels to add to the pod selectorLabels: {} # -- additional environment variables to be added to the pods @@ -211,7 +211,7 @@ backend: # -- Affinity settings for pod assignment affinity: {} - # -- Labels to add to the pod + # -- Additional labels to add to the pod selectorLabels: {} # -- additional environment variables to be added to the pods @@ -294,7 +294,7 @@ backend: # -- Affinity settings for pod assignment affinity: {} - # -- Labels to add to the pod + # -- Additional labels to add to the pod selectorLabels: {} # -- additional environment variables to be added to the pods @@ -537,7 +537,7 @@ backend: # -- Affinity settings for pod assignment affinity: {} - # -- Labels to add to the pod + # -- Additional labels to add to the pod selectorLabels: {} # -- additional environment variables to be added to the pods