Skip to content
Snippets Groups Projects
Commit 4fa2a0d2 authored by Philipp S. Sommer's avatar Philipp S. Sommer
Browse files

Merge branch 'add-shutdown' into 'main'

implement shutdown option

See merge request !38
parents 9606426b d1336c90
No related branches found
No related tags found
1 merge request!38implement shutdown option
Pipeline #279066 passed
......@@ -8,7 +8,7 @@ metadata:
io.kompose.service: {% raw %}{{ .Values.baseName }}{% endraw %}
name: {% raw %}{{ .Values.baseName }}{% endraw %}
spec:
replicas: {% raw %}{{ .Values.replicas }}{% endraw %}
replicas: {% raw %}{{ if .Values.shutdown }}0{{ else }}{{ .Values.replicas }}{{ end }}{% endraw %}
selector:
matchLabels:
io.kompose.service: {% raw %}{{ .Values.baseName }}{% endraw %}
......
......@@ -8,7 +8,7 @@ metadata:
io.kompose.service: {% raw %}{{ .Values.baseName }}{% endraw %}
name: {% raw %}{{ .Values.baseName }}{% endraw %}
spec:
replicas: {% raw %}{{ .Values.replicas }}{% endraw %}
replicas: {% raw %}{{ if .Values.shutdown }}0{{ else }}{{ .Values.replicas }}{{ end }}{% endraw %}
revisionHistoryLimit: {% raw %}{{ .Values.deploymentRevisionHistoryLimit }}{% endraw %}
selector:
io.kompose.service: {% raw %}{{ .Values.baseName }}{% endraw %}
......
......@@ -3,7 +3,7 @@
schedule: "*/1 * * * *"
concurrencyPolicy: "Replace"
startingDeadlineSeconds: 200
suspend: false
suspend: {% raw %}{{ if .Values.shutdown }}true{{ else }}false{{ end }}{% endraw %}
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
{% raw %}{{- end }}{%- endraw %}
......
......@@ -15,7 +15,7 @@ metadata:
io.kompose.service: {% raw %}{{ $name }}{% endraw %}
name: {% raw %}{{ $name }}{% endraw %}
spec:
replicas: {% raw %}{{ $data.replicas | default 1 }}{% endraw %}
replicas: {% raw %}{{ if .Values.shutdown }}0{{ else }}{{ if (quote $data.replicas | empty) }}1{{ else }}{{ $data.replicas }}{{ end }}{{ end }}{% endraw %}
selector:
matchLabels:
io.kompose.service: {% raw %}{{ $name }}{% endraw %}
......
......@@ -24,6 +24,10 @@ fromImage: null
command: null
{%- endif %}
# shutdown is a boolean flag that suspends all cronjobs and deployments
# of this helm chart. This is a shortcut to the replicas.
shutdown: false
{%- if cookiecutter.__include_build_config == "yes" %}
# secrets is a mapping of secret key to secret default. These values
......
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