Skip to content

Commit 919d078

Browse files
author
Matthew Fisher
authored
Merge pull request #296 from lachie83/feat-chart-enable-hostPort
feat(charts): make hostPort and service type configurable
2 parents d6e31ea + 0fae6d1 commit 919d078

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

charts/router/templates/router-deployment.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,21 @@ spec:
4949
fieldPath: metadata.namespace
5050
ports:
5151
- containerPort: 8080
52+
{{- if .Values.host_port.enabled }}
5253
hostPort: 80
54+
{{- end }}
5355
- containerPort: 6443
56+
{{- if .Values.host_port.enabled }}
5457
hostPort: 443
58+
{{- end }}
5559
- containerPort: 2222
60+
{{- if .Values.host_port.enabled }}
5661
hostPort: 2222
62+
{{- end }}
5763
- containerPort: 9090
64+
{{- if .Values.host_port.enabled }}
5865
hostPort: 9090
66+
{{- end }}
5967
livenessProbe:
6068
httpGet:
6169
path: /healthz

charts/router/templates/router-service.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
labels:
1212
heritage: deis
1313
spec:
14-
type: LoadBalancer
14+
type: {{ default "LoadBalancer" .Values.service_type}}
1515
selector:
1616
app: deis-router
1717
ports:

charts/router/values.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ deployment_annotations:
1515
# which need to be applied can be specified as key-value pairs under "service_annotations"
1616
service_annotations:
1717
#<example-key>: <example-value>
18+
19+
# Enable to pin router pod hostPort when using minikube or vagrant
20+
host_port:
21+
enabled: false
22+
23+
# Service type default to LoadBalancer
24+
# service_type: LoadBalancer

0 commit comments

Comments
 (0)