Commit 292b8575 authored by Jens Langhammer's avatar Jens Langhammer

helm: add Resource Limits to deployments, remove initContainers

use SecurityContext with fsGroup instead of initContainers
parent 88453a93
Pipeline #3870 passed with stage
in 3 minutes and 14 seconds
......@@ -41,4 +41,11 @@ spec:
httpGet:
path: /_/tier0/health
port: http
resources:
requests:
cpu: 10m
memory: 50M
limits:
cpu: 200m
memory: 500M
{{- end }}
......@@ -20,6 +20,8 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
k8s.p2.io/component: web
spec:
securityContext:
fsGroup: 100
volumes:
- name: config-volume
configMap:
......@@ -27,13 +29,6 @@ spec:
- name: media-storage
persistentVolumeClaim:
claimName: {{ include "p2.fullname" . }}-pvc-app-storage
initContainers:
- name: fix-volume-permissions
image: busybox
command: ["sh", "-c", "chown -R 100: /storage"]
volumeMounts:
- mountPath: /storage
name: media-storage
containers:
- name: {{ .Chart.Name }}
image: "docker.beryju.org/p2/server:{{ .Values.image.tag }}"
......@@ -50,7 +45,7 @@ spec:
- mountPath: /storage
name: media-storage
livenessProbe:
initialDelaySeconds: 20
initialDelaySeconds: 10
timeoutSeconds: 5
httpGet:
path: /
......@@ -59,7 +54,7 @@ spec:
- name: Host
value: kubernetes-healthcheck-host
readinessProbe:
initialDelaySeconds: 20
initialDelaySeconds: 10
timeoutSeconds: 5
httpGet:
path: /
......@@ -68,16 +63,10 @@ spec:
- name: Host
value: kubernetes-healthcheck-host
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
requests:
cpu: 50m
memory: 100M
limits:
cpu: 100m
memory: 200M
......@@ -20,6 +20,8 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
k8s.p2.io/component: worker
spec:
securityContext:
fsGroup: 100
volumes:
- name: config-volume
configMap:
......@@ -27,13 +29,6 @@ spec:
- name: media-storage
persistentVolumeClaim:
claimName: {{ include "p2.fullname" . }}-pvc-app-storage
initContainers:
- name: fix-volume-permissions
image: busybox
command: ["sh", "-c", "chown -R 100: /storage"]
volumeMounts:
- mountPath: /storage
name: media-storage
containers:
- name: {{ .Chart.Name }}
image: "docker.beryju.org/p2/server:{{ .Values.image.tag }}"
......@@ -45,16 +40,9 @@ spec:
- mountPath: /storage
name: media-storage
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
requests:
cpu: 100m
memory: 250M
limits:
cpu: 200m
memory: 350M
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment