Skip to content

Commit

Permalink
feat: Allow configuring tolerations for the EG control plane installe…
Browse files Browse the repository at this point in the history
…d via Helm (#3587)

* feat: Allow configuring tolerations for the EG control plane

Signed-off-by: Connor Rogers <[email protected]>

* Fix indentation on topologySpreadConstraints and tolerations

Signed-off-by: Connor Rogers <[email protected]>

* Fix topologySpreadConstraints and tolerations type, and add tests

Signed-off-by: Connor Rogers <[email protected]>

* Fix indentation in input test values file

Signed-off-by: Connor Rogers <[email protected]>

---------

Signed-off-by: Connor Rogers <[email protected]>
  • Loading branch information
coro authored Jun 12, 2024
1 parent ab3a3d2 commit 0abdda7
Show file tree
Hide file tree
Showing 7 changed files with 623 additions and 5 deletions.
3 changes: 2 additions & 1 deletion charts/gateway-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ To uninstall the chart:
| deployment.pod.annotations."prometheus.io/port" | string | `"19001"` | |
| deployment.pod.annotations."prometheus.io/scrape" | string | `"true"` | |
| deployment.pod.labels | object | `{}` | |
| deployment.pod.topologySpreadConstraints | object | `{}` | |
| deployment.pod.tolerations | list | `[]` | |
| deployment.pod.topologySpreadConstraints | list | `[]` | |
| deployment.ports[0].name | string | `"grpc"` | |
| deployment.ports[0].port | int | `18000` | |
| deployment.ports[0].targetPort | int | `18000` | |
Expand Down
6 changes: 5 additions & 1 deletion charts/gateway-helm/templates/envoy-gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ spec:
{{- end }}
{{- with .Values.deployment.pod.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.deployment.pod.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- args:
Expand Down
3 changes: 2 additions & 1 deletion charts/gateway-helm/values.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ deployment:
prometheus.io/scrape: 'true'
prometheus.io/port: '19001'
labels: {}
topologySpreadConstraints: {}
topologySpreadConstraints: []
tolerations: []

config:
envoyGateway:
Expand Down
3 changes: 2 additions & 1 deletion site/content/en/latest/install/gateway-helm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ The Helm chart for Envoy Gateway
| deployment.pod.annotations."prometheus.io/port" | string | `"19001"` | |
| deployment.pod.annotations."prometheus.io/scrape" | string | `"true"` | |
| deployment.pod.labels | object | `{}` | |
| deployment.pod.topologySpreadConstraints | object | `{}` | |
| deployment.pod.tolerations | list | `[]` | |
| deployment.pod.topologySpreadConstraints | list | `[]` | |
| deployment.ports[0].name | string | `"grpc"` | |
| deployment.ports[0].port | int | `18000` | |
| deployment.ports[0].targetPort | int | `18000` | |
Expand Down
3 changes: 2 additions & 1 deletion site/content/zh/latest/install/gateway-helm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ The Helm chart for Envoy Gateway
| deployment.pod.annotations."prometheus.io/port" | string | `"19001"` | |
| deployment.pod.annotations."prometheus.io/scrape" | string | `"true"` | |
| deployment.pod.labels | object | `{}` | |
| deployment.pod.topologySpreadConstraints | object | `{}` | |
| deployment.pod.tolerations | list | `[]` | |
| deployment.pod.topologySpreadConstraints | list | `[]` | |
| deployment.ports[0].name | string | `"grpc"` | |
| deployment.ports[0].port | int | `18000` | |
| deployment.ports[0].targetPort | int | `18000` | |
Expand Down
35 changes: 35 additions & 0 deletions test/helm/deployment-custom-topology.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
global:
images:
envoyGateway:
image: "docker.io/envoyproxy/gateway-dev:latest"
pullPolicy: Always
deployment:
pod:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: topology.kubernetes.io/zone
operator: In
values:
- antarctica-east1
- antarctica-west1
topologySpreadConstraints:
- topologyKey: kubernetes.io/hostname
maxSkew: 1
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: envoyproxy
control-plane: envoy-control-plane
- topologyKey: topology.kubernetes.io/zone
maxSkew: 1
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: envoyproxy
tolerations:
- key: "custom.taint"
operator: "Equal"
value: "custom.value"
Loading

0 comments on commit 0abdda7

Please sign in to comment.