Skip to content

Commit b101254

Browse files
authored
feat!: allow disabling both load balancer and ingress (#77)
Preserves the default behaviour of creating a load balancer, but allows disabling it with `loadBalancer.enabled: false`. Also changes the load balancer IP parameter from `loadBalancerIP` to `loadBalancer.IP`. Closes #71
1 parent 50ed48b commit b101254

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

charts/example-values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ ingress:
1313
# - secretName: my-cert
1414
# hosts:
1515
# - kubeview.example.net
16+
17+
loadBalancer:
18+
enabled: true
19+
20+
IP: '1.2.3.4'

charts/kubeview/templates/service.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
spec:
88
{{ if .Values.ingress.enabled }}
99
type: ClusterIP
10-
{{ else }}
10+
{{ else if .Values.loadBalancer.enabled }}
1111
type: LoadBalancer
1212
{{ end }}
1313
ports:
@@ -18,6 +18,6 @@ spec:
1818
selector:
1919
app.kubernetes.io/name: {{ include "kubeview.name" . }}
2020
app.kubernetes.io/instance: {{ .Release.Name }}
21-
{{- if .Values.loadBalancerIP }}
22-
loadBalancerIP: {{ .Values.loadBalancerIP }}
21+
{{- if (and .Values.loadBalancer.enabled .Values.loadBalancer.IP) }}
22+
loadBalancerIP: {{ .Values.loadBalancer.IP }}
2323
{{- end }}

charts/kubeview/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ ingress:
2626
tls: []
2727
className:
2828

29-
loadBalancerIP: ''
29+
loadBalancer:
30+
IP: ''
31+
32+
enabled: true
3033

3134
resources:
3235
limits:

0 commit comments

Comments
 (0)