diff --git a/charts/reports-server/README.md b/charts/reports-server/README.md index 9b625a2e..953d0a80 100644 --- a/charts/reports-server/README.md +++ b/charts/reports-server/README.md @@ -39,6 +39,7 @@ helm install reports-server --namespace reports-server --create-namespace report | serviceAccount.name | string | `""` | Service account name (required if `serviceAccount.create` is `false`) | | podAnnotations | object | `{}` | Pod annotations | | podSecurityContext | object | `{"fsGroup":2000}` | Pod security context | +| podEnv | object | `{}` | Provide additional environment variables to the pods. Map with the same format as kubernetes deployment spec's env. | | securityContext | object | See [values.yaml](values.yaml) | Container security context | | livenessProbe | object | `{"failureThreshold":10,"httpGet":{"path":"/livez","port":"https","scheme":"HTTPS"},"initialDelaySeconds":20,"periodSeconds":10}` | Liveness probe | | readinessProbe | object | `{"failureThreshold":10,"httpGet":{"path":"/readyz","port":"https","scheme":"HTTPS"},"initialDelaySeconds":30,"periodSeconds":10}` | Readiness probe | diff --git a/charts/reports-server/templates/deployment.yaml b/charts/reports-server/templates/deployment.yaml index 39c52aa7..f43a831f 100644 --- a/charts/reports-server/templates/deployment.yaml +++ b/charts/reports-server/templates/deployment.yaml @@ -1,3 +1,4 @@ +{{- $env := .Values.podEnv }} apiVersion: apps/v1 kind: Deployment metadata: @@ -65,6 +66,9 @@ spec: resourceFieldRef: resource: limits.memory divisor: '1' + {{- with $env }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- if .Values.config.db.secretName }} - name: DB_HOST valueFrom: diff --git a/charts/reports-server/values.yaml b/charts/reports-server/values.yaml index a2a0292c..810dae0d 100644 --- a/charts/reports-server/values.yaml +++ b/charts/reports-server/values.yaml @@ -56,6 +56,9 @@ podAnnotations: {} podSecurityContext: fsGroup: 2000 +# -- Provide additional environment variables to the pods. Map with the same format as kubernetes deployment spec's env. +podEnv: {} + # -- Container security context # @default -- See [values.yaml](values.yaml) securityContext: diff --git a/config/install-etcd.yaml b/config/install-etcd.yaml index f29df750..83c76377 100644 --- a/config/install-etcd.yaml +++ b/config/install-etcd.yaml @@ -259,6 +259,12 @@ spec: - --cert-dir=/tmp - --secure-port=4443 - --authorization-always-allow-paths=/metrics + env: + - name: GOMEMLIMIT + valueFrom: + resourceFieldRef: + resource: limits.memory + divisor: '1' securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/config/install.yaml b/config/install.yaml index 309005a4..d65b163e 100644 --- a/config/install.yaml +++ b/config/install.yaml @@ -327,6 +327,12 @@ spec: - --cert-dir=/tmp - --secure-port=4443 - --authorization-always-allow-paths=/metrics + env: + - name: GOMEMLIMIT + valueFrom: + resourceFieldRef: + resource: limits.memory + divisor: '1' securityContext: allowPrivilegeEscalation: false capabilities: