NodePort
This commit is contained in:
@@ -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
|
||||
@@ -53,3 +53,5 @@ debugSidecar:
|
||||
|
||||
podDisruptionBudgetEnabled: true
|
||||
spreadAcrossNodes: true
|
||||
|
||||
nodePortEnabled: false
|
||||
|
||||
Reference in New Issue
Block a user