Skip to content

Commit 9c50d0f

Browse files
authored
feat: Add conditional rendering for deployment and service (#126)
* feat: Add conditional rendering for deployment and service * chore: add default values for services and deployment in values.yaml * chore: update chart version
1 parent dc859ec commit 9c50d0f

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

stable/app/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.7.1
18+
version: 0.8.0

stable/app/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.deployment.enabled }}
12
apiVersion: apps/v1
23
kind: Deployment
34
metadata:
@@ -118,3 +119,4 @@ spec:
118119
{{- with .Values.terminationGracePeriodSeconds }}
119120
terminationGracePeriodSeconds: {{ . }}
120121
{{- end }}
122+
{{- end }}

stable/app/templates/service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.service.enabled }}
12
apiVersion: v1
23
kind: Service
34
metadata:
@@ -20,3 +21,4 @@ spec:
2021
{{- end }}
2122
selector:
2223
{{- include "app.selectorLabels" . | nindent 4 }}
24+
{{- end }}

stable/app/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ migration:
3737
args: []
3838

3939
service:
40+
enabled: true
4041
type: ClusterIP
4142
ports:
4243
- port: 80
@@ -45,6 +46,9 @@ service:
4546
name: tcp
4647
annotations: {}
4748

49+
deployment:
50+
enabled: true
51+
4852
ingress:
4953
enabled: false
5054
className: ""

0 commit comments

Comments
 (0)