From bc6eede10e56306f9108ad3b9ba9771743020727 Mon Sep 17 00:00:00 2001 From: Renu Kumari Date: Fri, 8 Oct 2021 13:03:10 -0400 Subject: [COMMON] Add limits to timescale db - Added resources limit similar to postgres in the timescaledb - Using common.podSecurityContext - removed init-container and it is handled by kubernetes if fsGroup is provided Issue-ID: CPS-667 Signed-off-by: Renu Kumari Change-Id: I944cc93526d0d89f32840450121c1ff608fdd4c5 --- .../common/timescaledb/templates/statefulset.yaml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'kubernetes/common/timescaledb/templates/statefulset.yaml') diff --git a/kubernetes/common/timescaledb/templates/statefulset.yaml b/kubernetes/common/timescaledb/templates/statefulset.yaml index 435c925eb2..0bd7d30478 100644 --- a/kubernetes/common/timescaledb/templates/statefulset.yaml +++ b/kubernetes/common/timescaledb/templates/statefulset.yaml @@ -29,25 +29,10 @@ spec: metadata: {{- include "common.templateMetadata" . | nindent 6 }} spec: serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - initContainers: - - name: chowm-mount-path - command: - - /bin/sh - args: - - -c - - chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsGroup }} /var/lib/postgresql/data - image: {{ include "repositoryGenerator.image.busybox" . }} - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: {{ include "common.fullname" . }} + {{ include "common.podSecurityContext" . | indent 10 | trim}} containers: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} imagePullPolicy: {{ .Values.pullPolicy }} ports: {{ include "common.containerPorts" . | nindent 12 }} livenessProbe: -- cgit 1.2.3-korg