diff --git a/CHANGELOG.md b/CHANGELOG.md index 075bd8754e..6812e7360e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,8 +29,10 @@ 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)] * API Gateway: Create PodSecurityPolicy for controller when `global.enablePodSecurityPolicies=true`. [[GH-1656](https://github.com/hashicorp/consul-k8s/pull/1656)] + ## 1.0.0-beta4 (October 28, 2022) IMPROVEMENTS: diff --git a/charts/consul/templates/api-gateway-controller-deployment.yaml b/charts/consul/templates/api-gateway-controller-deployment.yaml index a611fdd2d3..0a41101e7d 100644 --- a/charts/consul/templates/api-gateway-controller-deployment.yaml +++ b/charts/consul/templates/api-gateway-controller-deployment.yaml @@ -237,4 +237,8 @@ spec: nodeSelector: {{ tpl .Values.apiGateway.controller.nodeSelector . | indent 8 | trim }} {{- end }} + {{- if .Values.apiGateway.controller.tolerations }} + tolerations: + {{ tpl .Values.apiGateway.controller.tolerations . | indent 8 | trim }} + {{- end }} {{- end }} diff --git a/charts/consul/templates/api-gateway-gatewayclassconfig.yaml b/charts/consul/templates/api-gateway-gatewayclassconfig.yaml index 6394671528..450357a773 100644 --- a/charts/consul/templates/api-gateway-gatewayclassconfig.yaml +++ b/charts/consul/templates/api-gateway-gatewayclassconfig.yaml @@ -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: diff --git a/charts/consul/values.yaml b/charts/consul/values.yaml index edef5f8e77..28c8fc5990 100644 --- a/charts/consul/values.yaml +++ b/charts/consul/values.yaml @@ -2897,6 +2897,13 @@ apiGateway: # @type: string nodeSelector: null + # This value defines the tolerations that will be assigned to a gateway 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 + # This value defines the type of service created for gateways (e.g. LoadBalancer, ClusterIP) serviceType: LoadBalancer @@ -2979,6 +2986,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.