From 25d4e451e685751afd3812fcbd43ce19562094d0 Mon Sep 17 00:00:00 2001 From: Sean Mannion Date: Wed, 19 Feb 2025 15:04:47 -0500 Subject: [PATCH 1/2] Expose topologySpreadConstraints --- ndustrial/deployment/Chart.yaml | 4 ++-- ndustrial/deployment/README.md | 5 +++-- ndustrial/deployment/templates/deployment.yaml | 3 +++ ndustrial/deployment/values.yaml | 5 +++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ndustrial/deployment/Chart.yaml b/ndustrial/deployment/Chart.yaml index 851ca77..55962af 100644 --- a/ndustrial/deployment/Chart.yaml +++ b/ndustrial/deployment/Chart.yaml @@ -13,5 +13,5 @@ maintainers: - email: devops@ndustrial.io name: DevOps # Please make sure that version and appVersion are always the same. -version: 0.1.64 -appVersion: 0.1.64 +version: 0.1.65 +appVersion: 0.1.65 diff --git a/ndustrial/deployment/README.md b/ndustrial/deployment/README.md index 63d2af7..5cd1056 100644 --- a/ndustrial/deployment/README.md +++ b/ndustrial/deployment/README.md @@ -76,7 +76,6 @@ When this chart is bumped, the `nio-api` chart should also be bumped to pull in | `updateStrategy.rollingUpdate` | Deployment deployment rolling update configuration parameters | `{}` | | `terminationGracePeriodSeconds` | Deployment deployment termination Grace Period Seconds | `30` | - ### Service parameters | Name | Description | Value | @@ -175,6 +174,8 @@ When this chart is bumped, the `nio-api` chart should also be bumped to pull in | `containerSecurityContext.enabled` | Enabled Deployment containers' Security Context | `false` | | `containerSecurityContext.runAsUser` | Set Deployment container's Security Context runAsUser | `1001` | | `containerSecurityContext.runAsNonRoot` | Set Deployment container's Security Context runAsNonRoot | `true` | +| `topologySpreadConstraints` | Set pod topology spread constraints | `true` | + ### Pod Affinity parameters @@ -193,7 +194,7 @@ When this chart is bumped, the `nio-api` chart should also be bumped to pull in | `podDisruptionBudget.maxUnavailable` | An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". | `nil` | -### Metrics paramaters +### Metrics parameters | Name | Description | Value | | ----------------------------------------- | ------------------------------------------------------------------------------------------------ | ------- | diff --git a/ndustrial/deployment/templates/deployment.yaml b/ndustrial/deployment/templates/deployment.yaml index db67210..dfd2add 100644 --- a/ndustrial/deployment/templates/deployment.yaml +++ b/ndustrial/deployment/templates/deployment.yaml @@ -66,6 +66,9 @@ spec: {{- if .Values.tolerations }} tolerations: {{- include "nio-common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} {{- end }} + {{- if .Values.topologySpreadConstraints }} + topologySpreadConstraints: {{- include "nio-common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" $) | nindent 8 }} + {{- end }} {{- if .Values.hostAliases }} hostAliases: {{- include "nio-common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} {{- end }} diff --git a/ndustrial/deployment/values.yaml b/ndustrial/deployment/values.yaml index 11a2a9e..fc7d9ba 100644 --- a/ndustrial/deployment/values.yaml +++ b/ndustrial/deployment/values.yaml @@ -538,6 +538,11 @@ podDisruptionBudget: ## @param podDisruptionBudget.maxUnavailable An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". maxUnavailable: +## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ +## @param topologySpreadConstraints Constraints to control how Pods are spread across your cluster among failure-domains + +topologySpreadConstraints: {} + ## @section Metrics paramaters metrics: From 7f1423066e482ed97f5693d3ffd056c8e5d350a6 Mon Sep 17 00:00:00 2001 From: Sean Mannion Date: Wed, 19 Feb 2025 15:08:38 -0500 Subject: [PATCH 2/2] trailing spaces --- ndustrial/deployment/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndustrial/deployment/values.yaml b/ndustrial/deployment/values.yaml index fc7d9ba..ddbddc4 100644 --- a/ndustrial/deployment/values.yaml +++ b/ndustrial/deployment/values.yaml @@ -539,7 +539,7 @@ podDisruptionBudget: maxUnavailable: ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ -## @param topologySpreadConstraints Constraints to control how Pods are spread across your cluster among failure-domains +## @param topologySpreadConstraints Constraints to control how Pods are spread across your cluster among failure-domains topologySpreadConstraints: {}