From b0856eeea57716f361c1e36c34a9ea6453f0d5d8 Mon Sep 17 00:00:00 2001 From: EBMBA Date: Sat, 11 Nov 2023 17:22:18 +0100 Subject: [PATCH 1/5] feat: Add conditional logic for datastore --- charts/kamaji/templates/_helpers_datastore.tpl | 4 ++++ charts/kamaji/templates/datastore.yaml | 2 ++ charts/kamaji/values.yaml | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/kamaji/templates/_helpers_datastore.tpl b/charts/kamaji/templates/_helpers_datastore.tpl index b7b4698b..3ed2c16e 100644 --- a/charts/kamaji/templates/_helpers_datastore.tpl +++ b/charts/kamaji/templates/_helpers_datastore.tpl @@ -2,7 +2,11 @@ Create a default fully qualified datastore name. */}} {{- define "datastore.fullname" -}} +{{- if .Values.datastore.enabled }} {{- default "default" .Values.datastore.nameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- required "A valid .Values.datastore.nameOverride required!" .Values.datastore.nameOverride }} +{{- end }} {{- end }} {{/* diff --git a/charts/kamaji/templates/datastore.yaml b/charts/kamaji/templates/datastore.yaml index 60a84ffe..b54ef99a 100644 --- a/charts/kamaji/templates/datastore.yaml +++ b/charts/kamaji/templates/datastore.yaml @@ -1,3 +1,4 @@ +{{- if .Values.datastore.enabled}} apiVersion: kamaji.clastix.io/v1alpha1 kind: DataStore metadata: @@ -24,3 +25,4 @@ spec: {{- include "datastore.certificateAuthority" . | indent 6 }} clientCertificate: {{- include "datastore.clientCertificate" . | indent 6 }} +{{- end}} diff --git a/charts/kamaji/values.yaml b/charts/kamaji/values.yaml index d8aec6b4..092b3fdd 100644 --- a/charts/kamaji/values.yaml +++ b/charts/kamaji/values.yaml @@ -157,7 +157,9 @@ loggingDevel: enable: false datastore: - # -- (string) The Datastore name override, if empty defaults to `default` + # -- (bool) Enable the Kamaji Datastore creation (default=true) + enabled: true + # -- (string) The Datastore name override, if empty and enabled=true defaults to `default`, if enabled=false, this is the name of the Datastore to connect to. nameOverride: # -- (string) The Kamaji Datastore driver, supported: etcd, MySQL, PostgreSQL (defaults=etcd). driver: etcd From b239011b15aefd56332738b0ecddf1e8dc43f3be Mon Sep 17 00:00:00 2001 From: EBMBA Date: Sun, 12 Nov 2023 18:11:38 +0100 Subject: [PATCH 2/5] bump helm chart version --- charts/kamaji/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kamaji/Chart.yaml b/charts/kamaji/Chart.yaml index e373ca3f..f9ded56d 100644 --- a/charts/kamaji/Chart.yaml +++ b/charts/kamaji/Chart.yaml @@ -15,7 +15,7 @@ name: kamaji sources: - https://github.com/clastix/kamaji type: application -version: 0.12.8 +version: 0.12.9 annotations: catalog.cattle.io/certified: partner catalog.cattle.io/release-name: kamaji From 7b019a95c25f082ed6308a77189487e34a6f2ce7 Mon Sep 17 00:00:00 2001 From: EBMBA Date: Sun, 12 Nov 2023 20:54:25 +0100 Subject: [PATCH 3/5] chore: update helm chart documentation --- charts/kamaji/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/kamaji/README.md b/charts/kamaji/README.md index 6fb50c00..909d6a17 100644 --- a/charts/kamaji/README.md +++ b/charts/kamaji/README.md @@ -1,6 +1,6 @@ # kamaji -![Version: 0.12.8](https://img.shields.io/badge/Version-0.12.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.5](https://img.shields.io/badge/AppVersion-v0.3.5-informational?style=flat-square) +![Version: 0.12.9](https://img.shields.io/badge/Version-0.12.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.5](https://img.shields.io/badge/AppVersion-v0.3.5-informational?style=flat-square) Kamaji is a Kubernetes Control Plane Manager. @@ -73,8 +73,9 @@ Here the values you can override: | datastore.basicAuth.usernameSecret.name | string | `nil` | The name of the Secret containing the username used to connect to the relational database. | | datastore.basicAuth.usernameSecret.namespace | string | `nil` | The namespace of the Secret containing the username used to connect to the relational database. | | datastore.driver | string | `"etcd"` | (string) The Kamaji Datastore driver, supported: etcd, MySQL, PostgreSQL (defaults=etcd). | +| datastore.enabled | bool | `true` | (bool) Enable the Kamaji Datastore creation (default=true) | | datastore.endpoints | list | `[]` | (array) List of endpoints of the selected Datastore. When letting the Chart install the etcd datastore, this field is populated automatically. | -| datastore.nameOverride | string | `nil` | The Datastore name override, if empty defaults to `default` | +| datastore.nameOverride | string | `nil` | The Datastore name override, if empty and enabled=true defaults to `default`, if enabled=false, this is the name of the Datastore to connect to. | | datastore.tlsConfig.certificateAuthority.certificate.keyPath | string | `nil` | Key of the Secret which contains the content of the certificate. | | datastore.tlsConfig.certificateAuthority.certificate.name | string | `nil` | Name of the Secret containing the CA required to establish the mandatory SSL/TLS connection to the datastore. | | datastore.tlsConfig.certificateAuthority.certificate.namespace | string | `nil` | Namespace of the Secret containing the CA required to establish the mandatory SSL/TLS connection to the datastore. | From 7afe80d84ecb4ae88db120a98ce506e859f5995f Mon Sep 17 00:00:00 2001 From: EBMBA Date: Sun, 19 Nov 2023 18:59:53 +0100 Subject: [PATCH 4/5] fix: add tolerations on etcd sts --- charts/kamaji/Chart.yaml | 2 +- charts/kamaji/README.md | 3 ++- charts/kamaji/templates/etcd_sts.yaml | 4 ++++ charts/kamaji/values.yaml | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/kamaji/Chart.yaml b/charts/kamaji/Chart.yaml index f9ded56d..5a266b17 100644 --- a/charts/kamaji/Chart.yaml +++ b/charts/kamaji/Chart.yaml @@ -15,7 +15,7 @@ name: kamaji sources: - https://github.com/clastix/kamaji type: application -version: 0.12.9 +version: 0.12.10 annotations: catalog.cattle.io/certified: partner catalog.cattle.io/release-name: kamaji diff --git a/charts/kamaji/README.md b/charts/kamaji/README.md index 909d6a17..638e0282 100644 --- a/charts/kamaji/README.md +++ b/charts/kamaji/README.md @@ -1,6 +1,6 @@ # kamaji -![Version: 0.12.9](https://img.shields.io/badge/Version-0.12.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.5](https://img.shields.io/badge/AppVersion-v0.3.5-informational?style=flat-square) +![Version: 0.12.10](https://img.shields.io/badge/Version-0.12.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.5](https://img.shields.io/badge/AppVersion-v0.3.5-informational?style=flat-square) Kamaji is a Kubernetes Control Plane Manager. @@ -105,6 +105,7 @@ Here the values you can override: | etcd.port | int | `2379` | The client request port. | | etcd.serviceAccount.create | bool | `true` | Create a ServiceAccount, required to install and provision the etcd backing storage (default: true) | | etcd.serviceAccount.name | string | `""` | Define the ServiceAccount name to use during the setup and provision of the etcd backing storage (default: "") | +| etcd.tolerations | list | `[]` | (array) Kubernetes affinity rules to apply to Kamaji etcd pods | | extraArgs | list | `[]` | A list of extra arguments to add to the kamaji controller default ones | | fullnameOverride | string | `""` | | | healthProbeBindAddress | string | `":8081"` | The address the probe endpoint binds to. (default ":8081") | diff --git a/charts/kamaji/templates/etcd_sts.yaml b/charts/kamaji/templates/etcd_sts.yaml index b3863ec5..516873bf 100644 --- a/charts/kamaji/templates/etcd_sts.yaml +++ b/charts/kamaji/templates/etcd_sts.yaml @@ -22,6 +22,10 @@ spec: - name: certs secret: secretName: {{ include "etcd.caSecretName" . }} + {{- with .Values.etcd.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: etcd image: {{ .Values.etcd.image.repository }}:{{ .Values.etcd.image.tag | default "v3.5.4" }} diff --git a/charts/kamaji/values.yaml b/charts/kamaji/values.yaml index 092b3fdd..6dc584db 100644 --- a/charts/kamaji/values.yaml +++ b/charts/kamaji/values.yaml @@ -60,6 +60,9 @@ etcd: # -- The custom annotations to add to the PVC customAnnotations: {} # volumeType: local + + # -- (array) Kubernetes affinity rules to apply to Kamaji etcd pods + tolerations: [] overrides: caSecret: From 7f78b3af5a8202b930bccd9b3dde878fd1877d24 Mon Sep 17 00:00:00 2001 From: EBMBA Date: Tue, 21 Nov 2023 08:05:54 +0100 Subject: [PATCH 5/5] fix: bump helm chart minor version --- charts/kamaji/Chart.yaml | 2 +- charts/kamaji/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/kamaji/Chart.yaml b/charts/kamaji/Chart.yaml index 5a266b17..20a75090 100644 --- a/charts/kamaji/Chart.yaml +++ b/charts/kamaji/Chart.yaml @@ -15,7 +15,7 @@ name: kamaji sources: - https://github.com/clastix/kamaji type: application -version: 0.12.10 +version: 0.13.0 annotations: catalog.cattle.io/certified: partner catalog.cattle.io/release-name: kamaji diff --git a/charts/kamaji/README.md b/charts/kamaji/README.md index 638e0282..fda4b928 100644 --- a/charts/kamaji/README.md +++ b/charts/kamaji/README.md @@ -1,6 +1,6 @@ # kamaji -![Version: 0.12.10](https://img.shields.io/badge/Version-0.12.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.5](https://img.shields.io/badge/AppVersion-v0.3.5-informational?style=flat-square) +![Version: 0.13.0](https://img.shields.io/badge/Version-0.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.5](https://img.shields.io/badge/AppVersion-v0.3.5-informational?style=flat-square) Kamaji is a Kubernetes Control Plane Manager.