NodePort
This commit is contained in:
@@ -6,7 +6,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: {{ if .Values.nodePortEnabled }}NodePort{{ else }}ClusterIP{{ end }}
|
||||||
ports:
|
ports:
|
||||||
- port: {{ .Values.containerPort }}
|
- port: {{ .Values.containerPort }}
|
||||||
targetPort: http
|
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
|
podDisruptionBudgetEnabled: true
|
||||||
spreadAcrossNodes: true
|
spreadAcrossNodes: true
|
||||||
|
|
||||||
|
nodePortEnabled: false
|
||||||
|
|||||||
Reference in New Issue
Block a user