This commit is contained in:
Laszlo Fogas
2021-03-03 13:51:49 +01:00
parent 3b99ad506d
commit 230c346547
3 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ metadata:
labels:
{{- include "helm-chart.labels" . | nindent 4 }}
spec:
type: ClusterIP
type: {{ if .Values.nodePortEnabled }}NodePort{{ else }}ClusterIP{{ end }}
ports:
- port: {{ .Values.containerPort }}
targetPort: http
@@ -0,0 +1,16 @@
suite: test deployment
templates:
- service.yaml
tests:
- it: Should have default ClusterIP type
asserts:
- equal:
path: spec.type
value: ClusterIP
- it: Should set NodePort if flag enabled
set:
nodePortEnabled: true
asserts:
- equal:
path: spec.type
value: NodePort
+2
View File
@@ -53,3 +53,5 @@ debugSidecar:
podDisruptionBudgetEnabled: true
spreadAcrossNodes: true
nodePortEnabled: false