Skip to content
Snippets Groups Projects
Verified Commit 3054b27c authored by Philipp S. Sommer's avatar Philipp S. Sommer
Browse files

implement useManyFilesPVC and shutdown

parent 94f88348
No related branches found
No related tags found
1 merge request!17implement useManyFilesPVC and shutdown
Pipeline #279067 passed
{
"template": "https://codebase.helmholtz.cloud/hcdc/software-templates/helm-chart-template.git",
"commit": "5333f3e02c86ada701a2ca10e7916735348378e5",
"commit": "4fa2a0d203c98470982dd046601137efcff82254",
"checkout": null,
"context": {
"cookiecutter": {
......
......@@ -11,7 +11,7 @@ metadata:
io.kompose.service: {{ .Values.baseName }}
name: {{ .Values.baseName }}
spec:
replicas: {{ .Values.replicas }}
replicas: {{ if .Values.shutdown }}0{{ else }}{{ .Values.replicas }}{{ end }}
revisionHistoryLimit: {{ .Values.deploymentRevisionHistoryLimit }}
selector:
io.kompose.service: {{ .Values.baseName }}
......
......@@ -2,7 +2,7 @@
schedule: "*/1 * * * *"
concurrencyPolicy: "Replace"
startingDeadlineSeconds: 200
suspend: false
suspend: {{ if .Values.shutdown }}true{{ else }}false{{ end }}
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
{{- end }}
......@@ -35,6 +35,14 @@ jobTemplate:
{{- include "nginx.selectorLabels" $ | nindent 20 }}
topologyKey: kubernetes.io/hostname
{{- end }}
{{- if .Values.useManyFilesPVC }}
securityContext:
fsGroupChangePolicy: OnRootMismatch
seLinuxOptions:
type: spc_t
serviceAccountName: manyfilespvc
serviceAccount: manyfilespvc
{{- end }}
containers:
- name: {{ .name | quote }}
{{- $builtinContainer := include "nginx.cronJobContainer" . | fromYaml }}
......
......@@ -22,6 +22,14 @@ metadata:
spec:
affinity: {{- include "nginx.affinity" . | nindent 4 }}
{{- if .Values.useManyFilesPVC }}
securityContext:
fsGroupChangePolicy: OnRootMismatch
seLinuxOptions:
type: spc_t
serviceAccountName: manyfilespvc
serviceAccount: manyfilespvc
{{- end }}
containers:
- name: {{ .Values.baseName }}
{{- if .Values.command }}
......
......@@ -20,6 +20,10 @@ fromImage: null
# command is the command that the docker container shall run (has to be a list)
command: null
# shutdown is a boolean flag that suspends all cronjobs and deployments
# of this helm chart. This is a shortcut to the replicas.
shutdown: false
# secrets is a mapping of secret key to secret default. These values
# can be used to generate a secret that is used during the build.
buildSecrets: {}
......@@ -150,3 +154,12 @@ cronJobs: {}
# suspend: false
# successfulJobsHistoryLimit: 3
# failedJobsHistoryLimit: 1
# useManyFilesPVC is a boolean. If true, we expect that the cluster-admin added
# a `manyfilespvc` serviceaccount. You should use this option when you expect
# that a PVC mounted on the container contains houndreds of thousands of files,
# it uses `seLinuxOptions: {type: spc_t}` in the `securityContext`.
#
# See https://access.redhat.com/solutions/6221251 for information on how this
# is implemented
useManyFilesPVC: false
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment