0
Fork 0
mirror of https://github.com/penpot/penpot-helm.git synced 2025-04-07 20:31:25 -05:00

feat: allow to set up extra environments for all containers, specific and common

This commit is contained in:
David Barragán Merino 2025-02-10 19:15:27 +01:00
parent 4501bc66b2
commit 080229c4e4
6 changed files with 31 additions and 2 deletions

View file

@ -50,9 +50,9 @@ annotations:
- name: GitHub PR 18
url: https://github.com/penpot/penpot-helm/pull/18
- kind: added
description: Allow to set the url of Privacy Policy and Terms of Service
description: Allow to set up the url of Privacy Policy and Terms of Service
- kind: added
description: Allow to set extra environments to the backend deployment. Thanks to @jdollar
description: Allow to set up extra environments for all containers, specific and common. Thanks to @jdollar
links:
- name: GitHub PR 18
url: https://github.com/penpot/penpot-helm/pull/18

View file

@ -75,6 +75,7 @@ helm install my-release -f values.yaml penpot/penpot
| config.autoFileSnapshot.every | int | `5` | How many changes before generating a new snapshot. You also need to add the 'auto-file-snapshot' flag to the PENPOT_FLAGS variable. |
| config.autoFileSnapshot.timeout | string | `"3h"` | If there isn't a snapshot during this time, the system will generate one automatically. You also need to add the 'auto-file-snapshot' flag to the PENPOT_FLAGS variable. |
| config.existingSecret | string | `""` | The name of an existing secret. |
| config.extraEnvs | list | `[]` | Specify any additional environment values you want to provide to all the containers (frontend, backend and exporter) in the deployment according to the [specification](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) |
| config.flags | string | `"enable-registration enable-login-with-password disable-email-verification enable-smtp"` | The feature flags to enable. Check [the official docs](https://help.penpot.app/technical-guide/configuration/) for more info. |
| config.internalResolver | string | `""` | Add custom resolver for frontend. e.g. 192.168.1.1 |
| config.postgresql.database | string | `"penpot"` | The PostgreSQL database to use. |
@ -189,6 +190,7 @@ helm install my-release -f values.yaml penpot/penpot
| frontend.affinity | object | `{}` | Affinity for Penpot pods assignment. Check [the official doc](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| frontend.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["all"]},"readOnlyRootFilesystem":false,"runAsNonRoot":true,"runAsUser":1001}` | Configure Container Security Context. Check [the official doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
| frontend.deploymentAnnotations | object | `{}` | An optional map of annotations to be applied to the controller Deployment |
| frontend.extraEnvs | list | `[]` | Specify any additional environment values you want to provide to the frontend container in the deployment according to the [specification](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) |
| frontend.image.pullPolicy | string | `"IfNotPresent"` | The image pull policy to use. |
| frontend.image.repository | string | `"penpotapp/frontend"` | The Docker repository to pull the image from. |
| frontend.image.tag | string | `"2.4.3"` | The image tag to use. |
@ -215,6 +217,7 @@ helm install my-release -f values.yaml penpot/penpot
| exporter.affinity | object | `{}` | Affinity for Penpot pods assignment. Check [the official doc](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| exporter.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["all"]},"readOnlyRootFilesystem":false,"runAsNonRoot":true,"runAsUser":1001}` | Configure Container Security Context. Check [the official doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
| exporter.deploymentAnnotations | object | `{}` | An optional map of annotations to be applied to the controller Deployment |
| exporter.extraEnvs | list | `[]` | Specify any additional environment values you want to provide to the exporter container in the deployment according to the [specification](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables) |
| exporter.image.imagePullPolicy | string | `"IfNotPresent"` | The image pull policy to use. |
| exporter.image.repository | string | `"penpotapp/exporter"` | The Docker repository to pull the image from. |
| exporter.image.tag | string | `"2.4.3"` | The image tag to use. |

View file

@ -399,6 +399,9 @@ spec:
- name: PENPOT_AUTO_FILE_SNAPSHOT_TIMEOUT
value: {{ .Values.config.autoFileSnapshot.timeout | quote }}
# Extra environments
{{- with .Values.config.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.backend.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}

View file

@ -62,6 +62,13 @@ spec:
{{- end }}
- name: PENPOT_TEMPDIR
value: "/tmp/penpot-exporter"
# Extra environments
{{- with .Values.config.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.exporter.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /tmp/penpot-exporter
name: app-data

View file

@ -65,6 +65,13 @@ spec:
value: {{ .Values.config.termsOfSrvicesUri | quote }}
- name: PENPOT_PRIVACY_POLICY_URI
value: {{ .Values.config.privacyPolicyUri | quote }}
# Extra environments
{{- with .Values.config.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.frontend.extraEnvs }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /opt/data/assets
name: app-data

View file

@ -341,6 +341,9 @@ config:
# -- If there isn't a snapshot during this time, the system will generate one automatically. You also need to add the 'auto-file-snapshot' flag to the PENPOT_FLAGS variable.
# @section -- Configuration parameters
timeout: "3h"
# -- Specify any additional environment values you want to provide to all the containers (frontend, backend and exporter) in the deployment according to the [specification](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables)
# @section -- Configuration parameters
extraEnvs: []
backend:
image:
@ -494,6 +497,9 @@ frontend:
# -- (int,string) The number or percentage of pods from that set that can be unavailable after the eviction (e.g.: 3, "10%").
# @section -- Frontend parameters
maxUnavailable:
# -- Specify any additional environment values you want to provide to the frontend container in the deployment according to the [specification](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables)
# @section -- Frontend parameters
extraEnvs: []
exporter:
image:
@ -569,6 +575,9 @@ exporter:
# -- (int,string) The number or percentage of pods from that set that can be unavailable after the eviction (e.g.: 3, "10%").
# @section -- Exporter parameters
maxUnavailable:
# -- Specify any additional environment values you want to provide to the exporter container in the deployment according to the [specification](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables)
# @section -- Exporter parameters
extraEnvs: []
persistence:
assets: