From 001265cf2a18970f2bcfb04ff154312bec0f2f64 Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Wed, 11 Oct 2023 21:15:21 +0200 Subject: [PATCH 1/3] feat(helm-chart): allow to provide affinity values for the pods --- .../templates/backend-deployment.yaml | 4 ++++ .../templates/frontend-deployment.yaml | 4 ++++ helm-charts/infisical/values.yaml | 24 ++++++++++++------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/helm-charts/infisical/templates/backend-deployment.yaml b/helm-charts/infisical/templates/backend-deployment.yaml index 95fb11744..86c00c1bc 100644 --- a/helm-charts/infisical/templates/backend-deployment.yaml +++ b/helm-charts/infisical/templates/backend-deployment.yaml @@ -25,6 +25,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + {{- with $backend.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ template "infisical.name" . }}-{{ $backend.name }} image: "{{ $backend.image.repository }}:{{ $backend.image.tag | default "latest" }}" diff --git a/helm-charts/infisical/templates/frontend-deployment.yaml b/helm-charts/infisical/templates/frontend-deployment.yaml index 162f7154e..043a94263 100644 --- a/helm-charts/infisical/templates/frontend-deployment.yaml +++ b/helm-charts/infisical/templates/frontend-deployment.yaml @@ -25,6 +25,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + {{- with $frontend.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ template "infisical.name" . }}-{{ $frontend.name }} image: "{{ $frontend.image.repository }}:{{ $frontend.image.tag | default "latest" }}" diff --git a/helm-charts/infisical/values.yaml b/helm-charts/infisical/values.yaml index 0bda0d695..75f57e7bd 100644 --- a/helm-charts/infisical/values.yaml +++ b/helm-charts/infisical/values.yaml @@ -16,31 +16,31 @@ frontend: ## @param frontend.enabled Enable frontend ## enabled: true - ## @param frontend.name Backend name + ## @param frontend.name Frontend name ## name: frontend - ## @param frontend.fullnameOverride Backend fullnameOverride + ## @param frontend.fullnameOverride Frontend fullnameOverride ## fullnameOverride: "" - ## @param frontend.podAnnotations Backend pod annotations + ## @param frontend.podAnnotations Frontend pod annotations ## podAnnotations: {} - ## @param frontend.deploymentAnnotations Backend deployment annotations + ## @param frontend.deploymentAnnotations Frontend deployment annotations ## deploymentAnnotations: {} - ## @param frontend.replicaCount Backend replica count + ## @param frontend.replicaCount Frontend replica count ## replicaCount: 2 - ## Backend image parameters + ## Frontend image parameters ## image: - ## @param frontend.image.repository Backend image repository + ## @param frontend.image.repository Frontend image repository ## repository: infisical/frontend - ## @param frontend.image.tag Backend image tag + ## @param frontend.image.tag Frontend image tag ## tag: "latest" - ## @param frontend.image.pullPolicy Backend image pullPolicy + ## @param frontend.image.pullPolicy Frontend image pullPolicy ## pullPolicy: IfNotPresent ## @param frontend.resources.limits.memory container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) @@ -51,6 +51,9 @@ frontend: memory: 100Mi requests: cpu: 100m + ## @param frontend.affinity Frontend pod affinity + ## + affinity: {} ## @param frontend.kubeSecretRef Backend secret resource reference name (containing required [frontend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) ## kubeSecretRef: "" @@ -118,6 +121,9 @@ backend: memory: 200Mi requests: cpu: 150m + ## @param backend.affinity Backend pod affinity + ## + affinity: {} ## @param backend.kubeSecretRef Backend secret resource reference name (containing required [backend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) ## kubeSecretRef: "" From f5c8e537c95c6efbf9df0300f74c03746b9095d8 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 12 Oct 2023 11:01:21 +0100 Subject: [PATCH 2/3] generate documentation --- helm-charts/infisical/README.md | 21 ++++++++++++--------- helm-charts/infisical/values.yaml | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/helm-charts/infisical/README.md b/helm-charts/infisical/README.md index 427acd98c..4aca077a9 100644 --- a/helm-charts/infisical/README.md +++ b/helm-charts/infisical/README.md @@ -64,16 +64,17 @@ kubectl get secrets -n \ | Name | Description | Value | | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | | `frontend.enabled` | Enable frontend | `true` | -| `frontend.name` | Backend name | `frontend` | -| `frontend.fullnameOverride` | Backend fullnameOverride | `""` | -| `frontend.podAnnotations` | Backend pod annotations | `{}` | -| `frontend.deploymentAnnotations` | Backend deployment annotations | `{}` | -| `frontend.replicaCount` | Backend replica count | `2` | -| `frontend.image.repository` | Backend image repository | `infisical/frontend` | -| `frontend.image.tag` | Backend image tag | `latest` | -| `frontend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` | +| `frontend.name` | Frontend name | `frontend` | +| `frontend.fullnameOverride` | Frontend fullnameOverride | `""` | +| `frontend.podAnnotations` | Frontend pod annotations | `{}` | +| `frontend.deploymentAnnotations` | Frontend deployment annotations | `{}` | +| `frontend.replicaCount` | Frontend replica count | `2` | +| `frontend.image.repository` | Frontend image repository | `infisical/frontend` | +| `frontend.image.tag` | Frontend image tag | `latest` | +| `frontend.image.pullPolicy` | Frontend image pullPolicy | `IfNotPresent` | | `frontend.resources.limits.memory` | container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `100Mi` | -| `frontend.resources.requests.cpu` | container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `10m` | +| `frontend.resources.requests.cpu` | container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `100m` | +| `frontend.affinity` | Frontend pod affinity | `{}` | | `frontend.kubeSecretRef` | Backend secret resource reference name (containing required [frontend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) | `""` | | `frontend.service.annotations` | Backend service annotations | `{}` | | `frontend.service.type` | Backend service type | `ClusterIP` | @@ -95,6 +96,7 @@ kubectl get secrets -n \ | `backend.image.pullPolicy` | Backend image pullPolicy | `IfNotPresent` | | `backend.resources.limits.memory` | container memory limit [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `200Mi` | | `backend.resources.requests.cpu` | container CPU request [check the offical kubernetes documentations](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) | `150m` | +| `backend.affinity` | Backend pod affinity | `{}` | | `backend.kubeSecretRef` | Backend secret resource reference name (containing required [backend configuration variables](https://infisical.com/docs/self-hosting/configuration/envars)) | `""` | | `backend.service.annotations` | Backend service annotations | `{}` | | `backend.service.type` | Backend service type | `ClusterIP` | @@ -194,6 +196,7 @@ kubectl get secrets -n \ + ## Persistence The database persistence is enabled by default, your volumes will remain on your cluster even after uninstalling the chart. To disable persistence, set this value `mongodb.persistence.enabled: false` diff --git a/helm-charts/infisical/values.yaml b/helm-charts/infisical/values.yaml index 75f57e7bd..12706c56b 100644 --- a/helm-charts/infisical/values.yaml +++ b/helm-charts/infisical/values.yaml @@ -292,7 +292,7 @@ mongodb: ## rootPassword: root - ## @param auth.existingSecret Existing secret with MongoDB(®) credentials (keys: `mongodb-passwords`, `mongodb-root-password`, `mongodb-metrics-password`, `mongodb-replica-set-key`) + ## @param mongodb.auth.existingSecret Existing secret with MongoDB(®) credentials (keys: `mongodb-passwords`, `mongodb-root-password`, `mongodb-metrics-password`, `mongodb-replica-set-key`) ## NOTE: When it's set the previous parameters are ignored. ## existingSecret: "" From 792c3827430959e8a33c0cd226c2d9ddbcfdd76d Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 12 Oct 2023 11:03:21 +0100 Subject: [PATCH 3/3] update chart version --- helm-charts/infisical/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-charts/infisical/Chart.yaml b/helm-charts/infisical/Chart.yaml index 99e53b465..97fca592e 100644 --- a/helm-charts/infisical/Chart.yaml +++ b/helm-charts/infisical/Chart.yaml @@ -7,7 +7,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.3.4 +version: 0.3.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to