-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add externalTrafficPolicy toggle #145
base: master
Are you sure you want to change the base?
Changes from all commits
48072ae
143fefa
b452b69
b9bd160
367cf68
65ce085
814cb97
d1c39ed
37311c6
3352ce9
daca24b
f5637ee
e63f80f
f43f746
000ed76
f529989
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
service: | ||
type: ClusterIP | ||
type: ClusterIP |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,11 +26,17 @@ metadata: | |
spec: | ||
## If a load balancer is being used, ensure that the newer type of LB that passes along IP information is used | ||
## rather than the legacy one. | ||
{{- if eq .Values.service.type "LoadBalancer" }} | ||
{{- if or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer") }} | ||
{{- if .Values.service.externalTrafficPolicy }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we have an explicit value set, use that |
||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} | ||
{{- end }} | ||
{{- if and (not .Values.service.externalTrafficPolicy) (eq .Values.service.type "LoadBalancer") }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we don't have an explicit value set AND the type is Loadbalancer, use Local |
||
externalTrafficPolicy: Local | ||
{{- else if eq .Values.service.type "NodePort" }} | ||
{{- end }} | ||
{{- if and (not .Values.service.externalTrafficPolicy) (eq .Values.service.type "NodePort") }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we don't have an explicit value set AND the type is NodePort, use Cluster |
||
externalTrafficPolicy: Cluster | ||
{{ end }} | ||
{{- end }} | ||
{{- end }} | ||
selector: | ||
app.kubernetes.io/name: {{ template "dockermailserver.fullname" . }} | ||
release: "{{ .Release.Name }}" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only do this if we are using LB or NodePort