From 26a8d01b5db31246c330d812f55e263f3832529a Mon Sep 17 00:00:00 2001 From: s0ko1ex Date: Wed, 9 Oct 2024 17:34:48 +0300 Subject: [PATCH 1/2] Add ability to configure volumes for deployment through values.yaml --- charts/reports-server/README.md | 2 ++ charts/reports-server/templates/deployment.yaml | 6 ++++++ charts/reports-server/values.yaml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/charts/reports-server/README.md b/charts/reports-server/README.md index 81a7333..91e7d56 100644 --- a/charts/reports-server/README.md +++ b/charts/reports-server/README.md @@ -95,6 +95,8 @@ helm install reports-server --namespace reports-server --create-namespace report | apiServicesManagement.podAnnotations | object | `{}` | Pod annotations. | | apiServicesManagement.nodeAffinity | object | `{}` | Node affinity constraints. | | apiServicesManagement.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65534,"runAsNonRoot":true,"runAsUser":65534,"seccompProfile":{"type":"RuntimeDefault"}}` | Security context for the hook containers | +| extraVolumes.volumeMounts | list | `[]` | Extra volume mounts for reports-server container | +| extraVolumes.volumeMounts | list | `[]` | Extra volumes for reports-server deployment | ## Source Code diff --git a/charts/reports-server/templates/deployment.yaml b/charts/reports-server/templates/deployment.yaml index ebdd41a..bbb24f6 100644 --- a/charts/reports-server/templates/deployment.yaml +++ b/charts/reports-server/templates/deployment.yaml @@ -94,6 +94,9 @@ spec: volumeMounts: - mountPath: /tmp name: tmp-dir + {{- with .Values.extraVolumes.volumeMounts }} + {{ toYaml . | nindent 12 | trim }} + {{- end }} {{- with .Values.livenessProbe }} livenessProbe: {{- toYaml . | nindent 12 }} @@ -119,3 +122,6 @@ spec: volumes: - emptyDir: {} name: tmp-dir + {{- with .Values.extraVolumes.volumes }} + {{ toYaml . | nindent 6 | trim }} + {{- end }} diff --git a/charts/reports-server/values.yaml b/charts/reports-server/values.yaml index 819f7be..55e5358 100644 --- a/charts/reports-server/values.yaml +++ b/charts/reports-server/values.yaml @@ -273,3 +273,7 @@ apiServicesManagement: - ALL seccompProfile: type: RuntimeDefault + +extraVolumes: + volumeMounts: [] + volumes: [] From 8ae122b6cc198f76ad3b6f6598f07fa1be1124f6 Mon Sep 17 00:00:00 2001 From: s0ko1ex Date: Wed, 9 Oct 2024 17:48:05 +0300 Subject: [PATCH 2/2] Fix README typo --- charts/reports-server/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/reports-server/README.md b/charts/reports-server/README.md index 91e7d56..3fd9ebe 100644 --- a/charts/reports-server/README.md +++ b/charts/reports-server/README.md @@ -96,7 +96,7 @@ helm install reports-server --namespace reports-server --create-namespace report | apiServicesManagement.nodeAffinity | object | `{}` | Node affinity constraints. | | apiServicesManagement.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65534,"runAsNonRoot":true,"runAsUser":65534,"seccompProfile":{"type":"RuntimeDefault"}}` | Security context for the hook containers | | extraVolumes.volumeMounts | list | `[]` | Extra volume mounts for reports-server container | -| extraVolumes.volumeMounts | list | `[]` | Extra volumes for reports-server deployment | +| extraVolumes.volumes | list | `[]` | Extra volumes for reports-server deployment | ## Source Code