From e2d9674304301590ca03f79be53f2f2b6036fcb7 Mon Sep 17 00:00:00 2001 From: Vitor Gomes Date: Wed, 5 Mar 2025 22:03:17 -0300 Subject: [PATCH] feat(kgo): add node selector to deployment --- charts/gateway-operator/CHANGELOG.md | 7 +++++++ charts/gateway-operator/Chart.yaml | 2 +- .../ci/node-selector-values.yaml | 16 ++++++++++++++++ .../gateway-operator/templates/deployment.yaml | 4 ++++ charts/gateway-operator/values.yaml | 4 ++++ 5 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 charts/gateway-operator/ci/node-selector-values.yaml diff --git a/charts/gateway-operator/CHANGELOG.md b/charts/gateway-operator/CHANGELOG.md index 8d6269424..53b961bbc 100644 --- a/charts/gateway-operator/CHANGELOG.md +++ b/charts/gateway-operator/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.5.3 + +## Changes + +- Add the option to define a `nodeSelector` to the Kong Gateway Operator controller pod. + [#1262](https://github.com/Kong/charts/pull/1262) + ## 0.5.2 ### Fixes diff --git a/charts/gateway-operator/Chart.yaml b/charts/gateway-operator/Chart.yaml index 514d5bc50..a900a23f8 100644 --- a/charts/gateway-operator/Chart.yaml +++ b/charts/gateway-operator/Chart.yaml @@ -8,7 +8,7 @@ maintainers: name: gateway-operator sources: - https://github.com/Kong/charts/tree/main/charts/gateway-operator -version: 0.5.2 +version: 0.5.3 appVersion: "1.5" annotations: artifacthub.io/prerelease: "false" diff --git a/charts/gateway-operator/ci/node-selector-values.yaml b/charts/gateway-operator/ci/node-selector-values.yaml new file mode 100644 index 000000000..65f7a3a02 --- /dev/null +++ b/charts/gateway-operator/ci/node-selector-values.yaml @@ -0,0 +1,16 @@ +nodeSelector: + kubernetes.io/os: linux + +livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 1 + periodSeconds: 1 + +readinessProbe: + initialDelaySeconds: 1 + periodSeconds: 1 + +env: + anonymous_reports: "false" diff --git a/charts/gateway-operator/templates/deployment.yaml b/charts/gateway-operator/templates/deployment.yaml index f91062bd4..a14a79b3d 100644 --- a/charts/gateway-operator/templates/deployment.yaml +++ b/charts/gateway-operator/templates/deployment.yaml @@ -39,6 +39,10 @@ spec: affinity: {{ toYaml . | nindent 8 }} {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: + {{- toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} containers: - name: manager {{ with .Values.args -}} diff --git a/charts/gateway-operator/values.yaml b/charts/gateway-operator/values.yaml index f71a80bd4..76f456937 100644 --- a/charts/gateway-operator/values.yaml +++ b/charts/gateway-operator/values.yaml @@ -44,6 +44,10 @@ extraLabels: {} # Labels to be added to KGO pods podLabels: {} +# Node labels for pod assignment +# Ref: https://kubernetes.io/docs/user-guide/node-selection/ +nodeSelector: {} + # Install KIC's CRDs kic-crds: enabled: true