Skip to content

Commit

Permalink
fix: add nodeAffinity and externalTrafficPolicy configuration to valu…
Browse files Browse the repository at this point in the history
…es.yaml and change the default value of externalTrafficPolicy to Cluster in order to enable loadbalancing between nodes while using metallb
  • Loading branch information
wojtekzyla committed Nov 7, 2024
1 parent ed89995 commit 0ee9941
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/splunk-connect-for-syslog/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:

spec:
type: {{ .Values.service.type }}
externalTrafficPolicy: Local
externalTrafficPolicy: {{ .Values.externalTrafficPolicy }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
Expand Down Expand Up @@ -92,7 +92,7 @@ metadata:
{{- include "splunk-connect-for-syslog.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
externalTrafficPolicy: Local
externalTrafficPolicy: {{ .Values.externalTrafficPolicy }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/splunk-connect-for-syslog/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
affinity:
{{- with .Values.nodeAffinity }}
nodeAffinity:
{{- toYaml . | nindent 10 }}
{{- end }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand Down
4 changes: 4 additions & 0 deletions charts/splunk-connect-for-syslog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,8 @@ autoscaling:

nodeSelector: {}

nodeAffinity: {}

tolerations: []

externalTrafficPolicy: Cluster

0 comments on commit 0ee9941

Please sign in to comment.