Skip to content

Commit cd962e1

Browse files
authored
Merge pull request #62 from setiseta/main
NodePorts not adjustable & Service for IP Discovery not specified
2 parents 7e6e958 + e2f0869 commit cd962e1

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

charts/bunkerweb/templates/bunkerweb-service-external.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ spec:
2020
targetPort: 8080
2121
protocol: TCP
2222
name: http
23+
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePortHttp }}
24+
nodePort: {{ .Values.service.nodePortHttp }}
25+
{{- end }}
2326
- port: 443
2427
targetPort: 8443
2528
protocol: TCP
2629
name: https
30+
{{- if and (eq .Values.service.type "NodePort") .Values.service.nodePortHttps }}
31+
nodePort: {{ .Values.service.nodePortHttps }}
32+
{{- end }}
2733
{{- end }}

charts/bunkerweb/templates/controller-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ spec:
6767
value: "{{ .Values.settings.kubernetes.domainName }}"
6868
- name: KUBERNETES_IGNORE_ANNOTATIONS
6969
value: "{{ .Values.settings.kubernetes.ignoreAnnotations }}"
70+
- name: BUNKERWEB_SERVICE_NAME
71+
value: "{{ include "bunkerweb.fullname" . }}-external"
7072
{{- if .Values.controller.extraEnvs }}
7173
{{- toYaml .Values.controller.extraEnvs | nindent 12 }}
7274
{{- end }}

charts/bunkerweb/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ service:
263263
# NodePort: Exposes service on each node's IP at a static port
264264
# ClusterIP: Only accessible within the cluster
265265
type: LoadBalancer
266+
267+
# Set defined NodePorts if using Service type NodePort, if not set, random ports will be assigned
268+
# nodePortHttp: 30080
269+
# nodePortHttps: 30443
266270

267271
# External traffic policy: Local or Cluster
268272
# Local: Preserves client IP but may cause uneven distribution

0 commit comments

Comments
 (0)