Skip to content

Commit

Permalink
Merge pull request #147 from MateuszCzubak/add-support-for-session-af…
Browse files Browse the repository at this point in the history
…finity-in-service

Add support for the service session affinity
  • Loading branch information
iNoahNothing authored Nov 30, 2020
2 parents a910174 + 5c16f6a commit 54849e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ The following tables lists the configurable parameters of the Ambassador chart a
| `service.ports` | List of ports Ambassador is listening on | `[{"name": "http","port": 80,"targetPort": 8080},{"name": "https","port": 443,"targetPort": 8443}]` |
| `service.loadBalancerIP` | IP address to assign (if cloud provider supports it) | `""` |
| `service.loadBalancerSourceRanges` | Passed to cloud provider load balancer if created (e.g: AWS ELB) | None |
| `service.sessionAffinity` | Sets the session affinity policy for the service | `""` |
| `service.sessionAffinityConfig` | Sets the session affinity config for the service | `""` |
| `service.type` | Service type to be used | `LoadBalancer` |
| `service.externalIPs` | External IPs to route to the ambassador service | `[]` |
| `serviceAccount.create` | If `true`, create a new service account | `true` |
Expand Down
7 changes: 7 additions & 0 deletions templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ spec:
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: "{{ .Values.service.externalTrafficPolicy }}"
{{- end }}
{{- if .Values.service.sessionAffinity }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
{{- end }}
{{- if .Values.service.sessionAffinityConfig }}
sessionAffinityConfig:
{{- toYaml .Values.service.sessionAffinityConfig | nindent 4 }}
{{- end }}
ports:
{{- range .Values.service.ports }}
- name: {{ .name }}
Expand Down
4 changes: 4 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ service:

externalTrafficPolicy:

sessionAffinity:

sessionAffinityConfig:

externalIPs: []

annotations: {}
Expand Down

0 comments on commit 54849e6

Please sign in to comment.