Skip to content

Commit

Permalink
project: do not deploy normalyy when cronjob is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
fredlahde committed Apr 18, 2024
1 parent 4e63f88 commit 91d85e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion project-template/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.cronjob -}}
{{ $buildType := .Values.buildtype }}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -119,4 +120,5 @@ spec:
- name: {{ .name }}-{{ $buildType }}-folder
emptyDir: {}
{{ end }}
{{ end }}
{{ end }}
{{- end -}}
2 changes: 2 additions & 0 deletions project-template/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.cronjob -}}
{{- if .Values.servePublicly -}}
{{- $buildtype := .Values.buildtype -}}
apiVersion: networking.k8s.io/v1
Expand Down Expand Up @@ -37,3 +38,4 @@ spec:
port:
number: 80
{{ end }}
{{ end }}
2 changes: 2 additions & 0 deletions project-template/templates/pod-disruption-budget.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.cronjob -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
Expand All @@ -20,3 +21,4 @@ spec:
selector:
matchLabels:
{{- include "project-template.selectorLabels" . | nindent 6 }}
{{- end -}}
2 changes: 2 additions & 0 deletions project-template/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.cronjob -}}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -23,3 +24,4 @@ spec:
{{- end }}
selector:
{{- include "project-template.selectorLabels" . | nindent 8 }}
{{- end -}}

0 comments on commit 91d85e8

Please sign in to comment.