Skip to content
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

Consul API Gateway, Add Tolerations support #1650

Merged
merged 13 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ IMPROVEMENTS:
* Remove deprecated annotation `service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"` in the `server-service` template. [[GH-1619](https://github.com/hashicorp/consul-k8s/pull/1619)]
* Support `minAvailable` on connect injector `PodDisruptionBudget`. [[GH-1557](https://github.com/hashicorp/consul-k8s/pull/1557)]
* Add `tolerations` and `nodeSelector` to Server ACL init jobs and `nodeSelector` to Webhook cert manager. [[GH-1581](https://github.com/hashicorp/consul-k8s/pull/1581)]
* API Gateway: Add `tolerations` to `apiGateway.managedGatewayClass` and `apiGateway.controller` [[GH-1650](https://github.com/hashicorp/consul-k8s/pull/1650)]
* Control plane
* Support merged metrics with consul-dataplane. [[GH-1635](https://github.com/hashicorp/consul-k8s/pull/1635)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,4 +237,8 @@ spec:
nodeSelector:
{{ tpl .Values.apiGateway.controller.nodeSelector . | indent 8 | trim }}
{{- end }}
{ { - if .Values.apiGateway.controller.tolerations } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting on the {{ and }} needs correcting here. There is an additional space.

sarahalsmiller marked this conversation as resolved.
Show resolved Hide resolved
tolerations:
{ { tpl .Values.apiGateway.controller.tolerations . | indent 8 | trim } }
{ { - end } }
{{- end }}
6 changes: 5 additions & 1 deletion charts/consul/templates/api-gateway-gatewayclassconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@ spec:
image:
consulAPIGateway: {{ .Values.apiGateway.image }}
envoy: {{ .Values.global.imageEnvoy }}
{{- if .Values.apiGateway.nodeSelector }}
{{- if .Values.apiGateway.managedGatewayClass.nodeSelector }}
nodeSelector:
{{ tpl .Values.apiGateway.managedGatewayClass.nodeSelector . | indent 4 | trim }}
{{- end }}
{{ - if .Values.apiGateway.managedGatewayClass.tolerations }}
tolerations:
{ { tpl .Values.apiGateway.managedGatewayClass.tolerations . | indent 4 | trim } }
{ { - end } }
{{- if .Values.apiGateway.managedGatewayClass.copyAnnotations.service }}
copyAnnotations:
service:
Expand Down
13 changes: 13 additions & 0 deletions charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,13 @@ apiGateway:
# @type: string
nodeSelector: null

# This value defines the tolerations that will be assigned to a gateway pod
sarahalsmiller marked this conversation as resolved.
Show resolved Hide resolved
# This should be a multi-line string matching the
# Tolerations (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) array in a Pod spec.
#
# @type: string
tolerations: null

# This value defines the type of service created for gateways (e.g. LoadBalancer, ClusterIP)
serviceType: LoadBalancer

Expand Down Expand Up @@ -3007,6 +3014,12 @@ apiGateway:
# @type: string
nodeSelector: null

# This value defines the tolerations for api-gateway-controller pod, this should be a multi-line string matching the
# Tolerations (https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) array in a Pod spec.
#
# @type: string
tolerations: null

# Configuration for the Service created for the api-gateway-controller
service:
# Annotations to apply to the api-gateway-controller service.
Expand Down