Skip to content

Commit

Permalink
only set the loadBalancerClass property when the user sets it to a no…
Browse files Browse the repository at this point in the history
…n-empty value

this allows us to easily use the cluster default load balancer class
  • Loading branch information
rgl committed Apr 26, 2023
1 parent 13df3ab commit db0984f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tinkerbell/boots/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ metadata:
spec:
type: {{ .Values.service.type }}
{{- if eq .Values.service.type "LoadBalancer" }}
{{- if .Values.service.class }}
loadBalancerClass: {{ .Values.service.class }}
{{- end }}
loadBalancerIP: {{ $loadBalancerIP }}
{{- end }}
externalTrafficPolicy: Local
Expand Down
2 changes: 2 additions & 0 deletions tinkerbell/stack/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ metadata:
spec:
type: {{ .Values.stack.service.type }}
{{- if eq .Values.stack.service.type "LoadBalancer" }}
{{- if .Values.stack.lbClass }}
loadBalancerClass: {{ .Values.stack.lbClass }}
{{- end }}
loadBalancerIP: {{ .Values.stack.loadBalancerIP }}
{{- end }}
externalTrafficPolicy: Local
Expand Down

0 comments on commit db0984f

Please sign in to comment.