From 72e24afa9eef3012733c44bb634b9a5631fbafa3 Mon Sep 17 00:00:00 2001 From: Udo Hagemann <122786416+uohndecadisde@users.noreply.github.com> Date: Wed, 24 Jan 2024 20:50:33 +0100 Subject: [PATCH] Support Kubernetes StatefulSetStartOrdinal feature gate (#747) * Allow for StatefulSetStartOrdinal feature gate (first step: confluence only). * Allow for StatefulSetStartOrdinal feature gate (extend to remaining products, add note in user documentation). * Allow for StatefulSetStartOrdinal feature gate (fixed helm output tests). --- docs/docs/userguide/CONFIGURATION.md | 1 + src/main/charts/bamboo-agent/README.md | 7 +++---- src/main/charts/bamboo/README.md | 10 ++++++---- src/main/charts/bamboo/templates/statefulset.yaml | 4 ++++ src/main/charts/bamboo/values.yaml | 14 ++++++++++++++ src/main/charts/bitbucket/README.md | 10 ++++++---- .../bitbucket/templates/statefulset-mesh.yaml | 4 ++++ .../charts/bitbucket/templates/statefulset.yaml | 4 ++++ src/main/charts/bitbucket/values.yaml | 14 ++++++++++++++ src/main/charts/confluence/README.md | 10 ++++++---- .../templates/statefulset-synchrony.yaml | 4 ++++ .../charts/confluence/templates/statefulset.yaml | 4 ++++ src/main/charts/confluence/values.yaml | 14 ++++++++++++++ src/main/charts/crowd/README.md | 10 ++++++---- src/main/charts/crowd/templates/statefulset.yaml | 4 ++++ src/main/charts/crowd/values.yaml | 14 ++++++++++++++ src/main/charts/jira/README.md | 10 ++++++---- src/main/charts/jira/templates/statefulset.yaml | 4 ++++ src/main/charts/jira/values.yaml | 14 ++++++++++++++ .../expected_helm_output/bamboo-agent/output.yaml | 1 - .../expected_helm_output/bamboo/output.yaml | 4 +++- .../expected_helm_output/bitbucket/output.yaml | 5 +++-- .../expected_helm_output/confluence/output.yaml | 5 +++-- .../expected_helm_output/crowd/output.yaml | 4 +++- .../expected_helm_output/jira/output.yaml | 4 +++- 25 files changed, 147 insertions(+), 32 deletions(-) diff --git a/docs/docs/userguide/CONFIGURATION.md b/docs/docs/userguide/CONFIGURATION.md index 64cf32a1b..2724b5dfd 100644 --- a/docs/docs/userguide/CONFIGURATION.md +++ b/docs/docs/userguide/CONFIGURATION.md @@ -474,6 +474,7 @@ The Helm charts also allow you to specify: * [`tolerations`](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/){.external}, * [`nodeSelectors`](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector){.external} * [`affinities`](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity){.external}. +* [`ordinals`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#start-ordinal){.external}. These are standard Kubernetes structures that will be included in the pods. diff --git a/src/main/charts/bamboo-agent/README.md b/src/main/charts/bamboo-agent/README.md index 6d404d0f5..00fd406a8 100644 --- a/src/main/charts/bamboo-agent/README.md +++ b/src/main/charts/bamboo-agent/README.md @@ -4,6 +4,8 @@ A chart for installing Bamboo Data Center remote agents on Kubernetes +For installation please follow [the documentation](https://atlassian.github.io/data-center-helm-charts/). + **Homepage:** ## Source Code @@ -67,7 +69,4 @@ Kubernetes: `>=1.21.x-0` | serviceAccount.imagePullSecrets | list | `[]` | For Docker images hosted in private registries, define the list of image pull secrets that should be utilized by the created ServiceAccount https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod | | serviceAccount.name | string | `nil` | The name of the ServiceAccount to be used by the pods. If not specified, but the "serviceAccount.create" flag is set to 'true', then the ServiceAccount name will be auto-generated, otherwise the 'default' ServiceAccount will be used. https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server | | tolerations | list | `[]` | Standard K8s tolerations that will be applied to all Bamboo agent pods | -| volumes | object | `{"additional":null}` | Defines additional volumes that should be applied to all Bamboo agent pods. Note that this will not create any corresponding volume mounts which need to be defined in bamboo.additionalVolumeMounts | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +| volumes | object | `{"additional":null}` | Defines additional volumes that should be applied to all Bamboo agent pods. Note that this will not create any corresponding volume mounts which need to be defined in bamboo.additionalVolumeMounts | \ No newline at end of file diff --git a/src/main/charts/bamboo/README.md b/src/main/charts/bamboo/README.md index e8511fd91..bfc7d2f69 100644 --- a/src/main/charts/bamboo/README.md +++ b/src/main/charts/bamboo/README.md @@ -4,6 +4,8 @@ A chart for installing Bamboo Data Center on Kubernetes +For installation please follow [the documentation](https://atlassian.github.io/data-center-helm-charts/). + **Homepage:** ## Source Code @@ -155,6 +157,9 @@ Kubernetes: `>=1.21.x-0` | monitoring.serviceMonitor.prometheusLabelSelector | object | `{}` | ServiceMonitorSelector of the prometheus instance. | | monitoring.serviceMonitor.scrapeIntervalSeconds | int | `30` | Scrape interval for the JMX service. | | nodeSelector | object | `{}` | Standard K8s node-selectors that will be applied to all Bamboo pods | +| ordinals | object | `{"enabled":false,"start":0}` | Set a custom start ordinal number for the K8s stateful set. Note that this depends on the StatefulSetStartOrdinal K8s feature gate, which has entered beta state with K8s version 1.27. | +| ordinals.enabled | bool | `false` | Enable only if StatefulSetStartOrdinal K8s feature gate is available. | +| ordinals.start | int | `0` | Set start ordinal to a positive integer, defaulting to 0. | | podAnnotations | object | `{}` | Custom annotations that will be applied to all Bamboo pods | | podDisruptionBudget | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":null,"minAvailable":null}` | PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. When both minAvailable and maxUnavailable are set, maxUnavailable takes precedence. | | podLabels | object | `{}` | Custom labels that will be applied to all Bamboo pods | @@ -186,7 +191,4 @@ Kubernetes: `>=1.21.x-0` | volumes.sharedHome.persistentVolumeClaim.create | bool | `false` | If 'true', then a 'PersistentVolumeClaim' and 'PersistentVolume' will be dynamically created for shared-home based on the 'StorageClassName' supplied below. | | volumes.sharedHome.persistentVolumeClaim.resources | object | `{"requests":{"storage":"1Gi"}}` | Specifies the standard K8s resource requests and/or limits for the shared-home volume claims. | | volumes.sharedHome.persistentVolumeClaim.storageClassName | string | `nil` | Specify the name of the 'StorageClass' that should be used for the 'shared-home' volume claim. | -| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Bamboo container. | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Bamboo container. | \ No newline at end of file diff --git a/src/main/charts/bamboo/templates/statefulset.yaml b/src/main/charts/bamboo/templates/statefulset.yaml index 078523657..a5d933058 100644 --- a/src/main/charts/bamboo/templates/statefulset.yaml +++ b/src/main/charts/bamboo/templates/statefulset.yaml @@ -5,6 +5,10 @@ metadata: labels: {{- include "common.labels.commonLabels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.replicaCount }} serviceName: {{ include "common.names.fullname" . }} selector: diff --git a/src/main/charts/bamboo/values.yaml b/src/main/charts/bamboo/values.yaml index ea3d46e7f..b3c99dd2f 100644 --- a/src/main/charts/bamboo/values.yaml +++ b/src/main/charts/bamboo/values.yaml @@ -40,6 +40,20 @@ # replicaCount: 1 +# -- Set a custom start ordinal number for the K8s stateful set. +# Note that this depends on the StatefulSetStartOrdinal K8s feature gate, +# which has entered beta state with K8s version 1.27. +# +ordinals: + + # -- Enable only if StatefulSetStartOrdinal K8s feature gate is available. + # + enabled: false + + # -- Set start ordinal to a positive integer, defaulting to 0. + # + start: 0 + # Image configuration # image: diff --git a/src/main/charts/bitbucket/README.md b/src/main/charts/bitbucket/README.md index e34573287..b5e4a91b2 100644 --- a/src/main/charts/bitbucket/README.md +++ b/src/main/charts/bitbucket/README.md @@ -4,6 +4,8 @@ A chart for installing Bitbucket Data Center on Kubernetes +For installation please follow [the documentation](https://atlassian.github.io/data-center-helm-charts/). + **Homepage:** ## Source Code @@ -193,6 +195,9 @@ Kubernetes: `>=1.21.x-0` | monitoring.serviceMonitor.prometheusLabelSelector | object | `{}` | ServiceMonitorSelector of the prometheus instance. | | monitoring.serviceMonitor.scrapeIntervalSeconds | int | `30` | Scrape interval for the JMX service. | | nodeSelector | object | `{}` | Standard K8s node-selectors that will be applied to all Bitbucket pods | +| ordinals | object | `{"enabled":false,"start":0}` | Set a custom start ordinal number for the K8s stateful set. Note that this depends on the StatefulSetStartOrdinal K8s feature gate, which has entered beta state with K8s version 1.27. | +| ordinals.enabled | bool | `false` | Enable only if StatefulSetStartOrdinal K8s feature gate is available. | +| ordinals.start | int | `0` | Set start ordinal to a positive integer, defaulting to 0. | | podAnnotations | object | `{}` | Custom annotations that will be applied to all Bitbucket pods | | podDisruptionBudget | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":null,"minAvailable":null}` | PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. When both minAvailable and maxUnavailable are set, maxUnavailable takes precedence. | | podLabels | object | `{}` | Custom labels that will be applied to all Bitbucket pods | @@ -236,7 +241,4 @@ Kubernetes: `>=1.21.x-0` | volumes.sharedHome.persistentVolumeClaim.resources | object | `{"requests":{"storage":"1Gi"}}` | Specifies the standard K8s resource requests and/or limits for the shared-home volume claims. | | volumes.sharedHome.persistentVolumeClaim.storageClassName | string | `nil` | Specify the name of the 'StorageClass' that should be used If set to non-empty string value, this will specify the storage class to be used. If left without value, the default Storage Class will be utilised. Alternatively, can be set to the empty string "", to indicate that no Storage Class should be used here. | | volumes.sharedHome.persistentVolumeClaim.volumeName | string | `nil` | If persistentVolume.create and persistentVolumeClaim.create are both true then any value supplied here is ignored and the default used. A custom value here is useful when bringing your own 'PersistentVolume' i.e. 'persistentVolume.create' is false. | -| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Bitbucket container. | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Bitbucket container. | \ No newline at end of file diff --git a/src/main/charts/bitbucket/templates/statefulset-mesh.yaml b/src/main/charts/bitbucket/templates/statefulset-mesh.yaml index b23316f85..963987f9f 100644 --- a/src/main/charts/bitbucket/templates/statefulset-mesh.yaml +++ b/src/main/charts/bitbucket/templates/statefulset-mesh.yaml @@ -6,6 +6,10 @@ metadata: labels: {{- include "common.labels.commonLabels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.bitbucket.mesh.replicaCount }} updateStrategy: type: RollingUpdate diff --git a/src/main/charts/bitbucket/templates/statefulset.yaml b/src/main/charts/bitbucket/templates/statefulset.yaml index b0770a682..3f4888820 100644 --- a/src/main/charts/bitbucket/templates/statefulset.yaml +++ b/src/main/charts/bitbucket/templates/statefulset.yaml @@ -8,6 +8,10 @@ metadata: labels: {{- include "common.labels.commonLabels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.replicaCount }} updateStrategy: type: RollingUpdate diff --git a/src/main/charts/bitbucket/values.yaml b/src/main/charts/bitbucket/values.yaml index 509a65b78..729a80639 100644 --- a/src/main/charts/bitbucket/values.yaml +++ b/src/main/charts/bitbucket/values.yaml @@ -36,6 +36,20 @@ # replicaCount: 1 +# -- Set a custom start ordinal number for the K8s stateful set. +# Note that this depends on the StatefulSetStartOrdinal K8s feature gate, +# which has entered beta state with K8s version 1.27. +# +ordinals: + + # -- Enable only if StatefulSetStartOrdinal K8s feature gate is available. + # + enabled: false + + # -- Set start ordinal to a positive integer, defaulting to 0. + # + start: 0 + # -- Image configuration # image: diff --git a/src/main/charts/confluence/README.md b/src/main/charts/confluence/README.md index 672ac7b0d..d4bcbeea4 100644 --- a/src/main/charts/confluence/README.md +++ b/src/main/charts/confluence/README.md @@ -4,6 +4,8 @@ A chart for installing Confluence Data Center on Kubernetes +For installation please follow [the documentation](https://atlassian.github.io/data-center-helm-charts/). + **Homepage:** ## Source Code @@ -154,6 +156,9 @@ Kubernetes: `>=1.21.x-0` | monitoring.serviceMonitor.prometheusLabelSelector | object | `{}` | ServiceMonitorSelector of the prometheus instance. | | monitoring.serviceMonitor.scrapeIntervalSeconds | int | `30` | Scrape interval for the JMX service. | | nodeSelector | object | `{}` | Standard K8s node-selectors that will be applied to all Confluence pods | +| ordinals | object | `{"enabled":false,"start":0}` | Set a custom start ordinal number for the K8s stateful set. Note that this depends on the StatefulSetStartOrdinal K8s feature gate, which has entered beta state with K8s version 1.27. | +| ordinals.enabled | bool | `false` | Enable only if StatefulSetStartOrdinal K8s feature gate is available. | +| ordinals.start | int | `0` | Set start ordinal to a positive integer, defaulting to 0. | | podAnnotations | object | `{}` | Custom annotations that will be applied to all Confluence pods | | podDisruptionBudget | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":null,"minAvailable":null}` | PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. When both minAvailable and maxUnavailable are set, maxUnavailable takes precedence. | | podLabels | object | `{}` | Custom labels that will be applied to all Confluence pods | @@ -230,7 +235,4 @@ Kubernetes: `>=1.21.x-0` | volumes.synchronyHome.persistentVolumeClaim.resources | object | `{"requests":{"storage":"1Gi"}}` | Specifies the standard K8s resource requests for the synchrony-home volume claims. | | volumes.synchronyHome.persistentVolumeClaim.storageClassName | string | `nil` | Specify the name of the 'StorageClass' that should be used for the synchrony-home volume claim. | | volumes.synchronyHome.persistentVolumeClaimRetentionPolicy.whenDeleted | string | `nil` | Configures the volume retention behavior that applies when the StatefulSet is deleted. | -| volumes.synchronyHome.persistentVolumeClaimRetentionPolicy.whenScaled | string | `nil` | Configures the volume retention behavior that applies when the replica count of the StatefulSet is reduced. | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +| volumes.synchronyHome.persistentVolumeClaimRetentionPolicy.whenScaled | string | `nil` | Configures the volume retention behavior that applies when the replica count of the StatefulSet is reduced. | \ No newline at end of file diff --git a/src/main/charts/confluence/templates/statefulset-synchrony.yaml b/src/main/charts/confluence/templates/statefulset-synchrony.yaml index caae4a52d..1ed9eae54 100644 --- a/src/main/charts/confluence/templates/statefulset-synchrony.yaml +++ b/src/main/charts/confluence/templates/statefulset-synchrony.yaml @@ -6,6 +6,10 @@ metadata: labels: {{- include "synchrony.labels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.synchrony.replicaCount }} serviceName: {{ include "synchrony.fullname" . }} selector: diff --git a/src/main/charts/confluence/templates/statefulset.yaml b/src/main/charts/confluence/templates/statefulset.yaml index d8bca6a62..6ae4abe77 100644 --- a/src/main/charts/confluence/templates/statefulset.yaml +++ b/src/main/charts/confluence/templates/statefulset.yaml @@ -5,6 +5,10 @@ metadata: labels: {{- include "common.labels.commonLabels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.replicaCount }} serviceName: {{ include "common.names.fullname" . }} selector: diff --git a/src/main/charts/confluence/values.yaml b/src/main/charts/confluence/values.yaml index 4884bd94e..1775824a7 100644 --- a/src/main/charts/confluence/values.yaml +++ b/src/main/charts/confluence/values.yaml @@ -28,6 +28,20 @@ # replicaCount: 1 +# -- Set a custom start ordinal number for the K8s stateful set. +# Note that this depends on the StatefulSetStartOrdinal K8s feature gate, +# which has entered beta state with K8s version 1.27. +# +ordinals: + + # -- Enable only if StatefulSetStartOrdinal K8s feature gate is available. + # + enabled: false + + # -- Set start ordinal to a positive integer, defaulting to 0. + # + start: 0 + # Image configuration # image: diff --git a/src/main/charts/crowd/README.md b/src/main/charts/crowd/README.md index d120331bc..54b7e0fd1 100644 --- a/src/main/charts/crowd/README.md +++ b/src/main/charts/crowd/README.md @@ -4,6 +4,8 @@ A chart for installing Crowd Data Center on Kubernetes +For installation please follow [the documentation](https://atlassian.github.io/data-center-helm-charts/). + **Homepage:** ## Source Code @@ -129,6 +131,9 @@ Kubernetes: `>=1.21.x-0` | monitoring.serviceMonitor.prometheusLabelSelector | object | `{}` | ServiceMonitorSelector of the prometheus instance. | | monitoring.serviceMonitor.scrapeIntervalSeconds | int | `30` | Scrape interval for the JMX service. | | nodeSelector | object | `{}` | Standard K8s node-selectors that will be applied to all Crowd pods | +| ordinals | object | `{"enabled":false,"start":0}` | Set a custom start ordinal number for the K8s stateful set. Note that this depends on the StatefulSetStartOrdinal K8s feature gate, which has entered beta state with K8s version 1.27. | +| ordinals.enabled | bool | `false` | Enable only if StatefulSetStartOrdinal K8s feature gate is available. | +| ordinals.start | int | `0` | Set start ordinal to a positive integer, defaulting to 0. | | podAnnotations | object | `{}` | Custom annotations that will be applied to all Crowd pods | | podDisruptionBudget | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":null,"minAvailable":null}` | PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. When both minAvailable and maxUnavailable are set, maxUnavailable takes precedence. | | podLabels | object | `{}` | Custom labels that will be applied to all Crowd pods | @@ -161,7 +166,4 @@ Kubernetes: `>=1.21.x-0` | volumes.sharedHome.persistentVolumeClaim.create | bool | `false` | If 'true', then a 'PersistentVolumeClaim' and 'PersistentVolume' will be dynamically created for shared-home based on the 'StorageClassName' supplied below. | | volumes.sharedHome.persistentVolumeClaim.resources | object | `{"requests":{"storage":"1Gi"}}` | Specifies the standard K8s resource requests and/or limits for the shared-home volume claims. | | volumes.sharedHome.persistentVolumeClaim.storageClassName | string | `nil` | Specify the name of the 'StorageClass' that should be used for the 'shared-home' volume claim. | -| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Crowd container. | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Crowd container. | \ No newline at end of file diff --git a/src/main/charts/crowd/templates/statefulset.yaml b/src/main/charts/crowd/templates/statefulset.yaml index ed19ad762..9f452418a 100644 --- a/src/main/charts/crowd/templates/statefulset.yaml +++ b/src/main/charts/crowd/templates/statefulset.yaml @@ -5,6 +5,10 @@ metadata: labels: {{- include "common.labels.commonLabels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.replicaCount }} serviceName: {{ include "common.names.fullname" . }} selector: diff --git a/src/main/charts/crowd/values.yaml b/src/main/charts/crowd/values.yaml index faf8cca8c..7a8630300 100644 --- a/src/main/charts/crowd/values.yaml +++ b/src/main/charts/crowd/values.yaml @@ -25,6 +25,20 @@ # replicaCount: 1 +# -- Set a custom start ordinal number for the K8s stateful set. +# Note that this depends on the StatefulSetStartOrdinal K8s feature gate, +# which has entered beta state with K8s version 1.27. +# +ordinals: + + # -- Enable only if StatefulSetStartOrdinal K8s feature gate is available. + # + enabled: false + + # -- Set start ordinal to a positive integer, defaulting to 0. + # + start: 0 + # -- The termination grace period for pods during shutdown. 30s is the # -- Kubernetes default, but can be overridden here. terminationGracePeriodSeconds: 30 diff --git a/src/main/charts/jira/README.md b/src/main/charts/jira/README.md index 5f11e3f32..e3914b412 100644 --- a/src/main/charts/jira/README.md +++ b/src/main/charts/jira/README.md @@ -4,6 +4,8 @@ A chart for installing Jira Data Center on Kubernetes +For installation please follow [the documentation](https://atlassian.github.io/data-center-helm-charts/). + **Homepage:** ## Source Code @@ -146,6 +148,9 @@ Kubernetes: `>=1.21.x-0` | monitoring.serviceMonitor.prometheusLabelSelector | object | `{}` | ServiceMonitorSelector of the prometheus instance. | | monitoring.serviceMonitor.scrapeIntervalSeconds | int | `30` | Scrape interval for the JMX service. | | nodeSelector | object | `{}` | Standard K8s node-selectors that will be applied to all Jira pods | +| ordinals | object | `{"enabled":false,"start":0}` | Set a custom start ordinal number for the K8s stateful set. Note that this depends on the StatefulSetStartOrdinal K8s feature gate, which has entered beta state with K8s version 1.27. | +| ordinals.enabled | bool | `false` | Enable only if StatefulSetStartOrdinal K8s feature gate is available. | +| ordinals.start | int | `0` | Set start ordinal to a positive integer, defaulting to 0. | | podAnnotations | object | `{}` | Custom annotations that will be applied to all Jira pods | | podDisruptionBudget | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":null,"minAvailable":null}` | PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. When both minAvailable and maxUnavailable are set, maxUnavailable takes precedence. | | podLabels | object | `{}` | Custom labels that will be applied to all Jira pods | @@ -178,7 +183,4 @@ Kubernetes: `>=1.21.x-0` | volumes.sharedHome.persistentVolumeClaim.create | bool | `false` | If 'true', then a 'PersistentVolumeClaim' and 'PersistentVolume' will be dynamically created for shared-home based on the 'StorageClassName' supplied below. | | volumes.sharedHome.persistentVolumeClaim.resources | object | `{"requests":{"storage":"1Gi"}}` | Specifies the standard K8s resource requests and/or limits for the shared-home volume claims. | | volumes.sharedHome.persistentVolumeClaim.storageClassName | string | `nil` | Specify the name of the 'StorageClass' that should be used for the 'shared-home' volume claim. | -| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Jira container. | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +| volumes.sharedHome.subPath | string | `nil` | Specifies the sub-directory of the shared-home volume that will be mounted in to the Jira container. | \ No newline at end of file diff --git a/src/main/charts/jira/templates/statefulset.yaml b/src/main/charts/jira/templates/statefulset.yaml index 92968ae64..05b265602 100644 --- a/src/main/charts/jira/templates/statefulset.yaml +++ b/src/main/charts/jira/templates/statefulset.yaml @@ -5,6 +5,10 @@ metadata: labels: {{- include "common.labels.commonLabels" . | nindent 4 }} spec: + {{ if .Values.ordinals.enabled }} + ordinals: + start: {{ .Values.ordinals.start }} + {{ end }} replicas: {{ .Values.replicaCount }} serviceName: {{ include "common.names.fullname" . }} selector: diff --git a/src/main/charts/jira/values.yaml b/src/main/charts/jira/values.yaml index 0fb779cce..6a6683886 100644 --- a/src/main/charts/jira/values.yaml +++ b/src/main/charts/jira/values.yaml @@ -28,6 +28,20 @@ # replicaCount: 1 +# -- Set a custom start ordinal number for the K8s stateful set. +# Note that this depends on the StatefulSetStartOrdinal K8s feature gate, +# which has entered beta state with K8s version 1.27. +# +ordinals: + + # -- Enable only if StatefulSetStartOrdinal K8s feature gate is available. + # + enabled: false + + # -- Set start ordinal to a positive integer, defaulting to 0. + # + start: 0 + # Image configuration # image: diff --git a/src/test/resources/expected_helm_output/bamboo-agent/output.yaml b/src/test/resources/expected_helm_output/bamboo-agent/output.yaml index 8fb139b74..270999d2c 100644 --- a/src/test/resources/expected_helm_output/bamboo-agent/output.yaml +++ b/src/test/resources/expected_helm_output/bamboo-agent/output.yaml @@ -46,7 +46,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: c76b97ad511ad56e48bf81240bedbd243ae6726f619176805b2ec7192a2231cd labels: app.kubernetes.io/name: bamboo-agent app.kubernetes.io/instance: unittest-bamboo-agent diff --git a/src/test/resources/expected_helm_output/bamboo/output.yaml b/src/test/resources/expected_helm_output/bamboo/output.yaml index b77f41a4f..f55281800 100644 --- a/src/test/resources/expected_helm_output/bamboo/output.yaml +++ b/src/test/resources/expected_helm_output/bamboo/output.yaml @@ -241,6 +241,9 @@ data: prometheusLabelSelector: {} scrapeIntervalSeconds: 30 nodeSelector: {} + ordinals: + enabled: false + start: 0 podAnnotations: {} podDisruptionBudget: annotations: {} @@ -402,7 +405,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: 173499a93a0bba58596806cb16b777f1c7b4fa0427578f1237b612608ccb22cd labels: app.kubernetes.io/name: bamboo app.kubernetes.io/instance: unittest-bamboo diff --git a/src/test/resources/expected_helm_output/bitbucket/output.yaml b/src/test/resources/expected_helm_output/bitbucket/output.yaml index 62cc78132..52c4ff812 100644 --- a/src/test/resources/expected_helm_output/bitbucket/output.yaml +++ b/src/test/resources/expected_helm_output/bitbucket/output.yaml @@ -312,6 +312,9 @@ data: prometheusLabelSelector: {} scrapeIntervalSeconds: 30 nodeSelector: {} + ordinals: + enabled: false + start: 0 podAnnotations: {} podDisruptionBudget: annotations: {} @@ -561,7 +564,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: 411a1dfa086b093587c121f8f90e46c8013ecb3368d7cf314767ca5cd41d0d6e labels: app.kubernetes.io/name: bitbucket-mesh app.kubernetes.io/instance: unittest-bitbucket @@ -684,7 +686,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: 54c4cd5794e6de59ce3c0023c2dd8b34701c2e0759fbdf8a76511825ad0fc84f labels: app.kubernetes.io/name: bitbucket app.kubernetes.io/instance: unittest-bitbucket diff --git a/src/test/resources/expected_helm_output/confluence/output.yaml b/src/test/resources/expected_helm_output/confluence/output.yaml index 866f2bb62..06749b8f6 100644 --- a/src/test/resources/expected_helm_output/confluence/output.yaml +++ b/src/test/resources/expected_helm_output/confluence/output.yaml @@ -258,6 +258,9 @@ data: prometheusLabelSelector: {} scrapeIntervalSeconds: 30 nodeSelector: {} + ordinals: + enabled: false + start: 0 podAnnotations: {} podDisruptionBudget: annotations: {} @@ -518,7 +521,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: 5c7e4f3183d49bd4e8c82a29b06246e551e4120042495652f1f9b27a0599a882 labels: app.kubernetes.io/name: confluence-synchrony app.kubernetes.io/instance: unittest-confluence @@ -600,7 +602,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: 7ba13a28e5027978cd81d64e677fc44ccf73e05699c95edd099bf822fb122a9d labels: app.kubernetes.io/name: confluence app.kubernetes.io/instance: unittest-confluence diff --git a/src/test/resources/expected_helm_output/crowd/output.yaml b/src/test/resources/expected_helm_output/crowd/output.yaml index 53852ad7b..59c1cfd4f 100644 --- a/src/test/resources/expected_helm_output/crowd/output.yaml +++ b/src/test/resources/expected_helm_output/crowd/output.yaml @@ -210,6 +210,9 @@ data: prometheusLabelSelector: {} scrapeIntervalSeconds: 30 nodeSelector: {} + ordinals: + enabled: false + start: 0 podAnnotations: {} podDisruptionBudget: annotations: {} @@ -349,7 +352,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: d32f7983e5805d1b32887cbfb8aca2c9fe4c38c8ed4ccc6fea2105f21ec14ffa labels: app.kubernetes.io/name: crowd app.kubernetes.io/instance: unittest-crowd diff --git a/src/test/resources/expected_helm_output/jira/output.yaml b/src/test/resources/expected_helm_output/jira/output.yaml index 80b45a83d..1679f3190 100644 --- a/src/test/resources/expected_helm_output/jira/output.yaml +++ b/src/test/resources/expected_helm_output/jira/output.yaml @@ -246,6 +246,9 @@ data: prometheusLabelSelector: {} scrapeIntervalSeconds: 30 nodeSelector: {} + ordinals: + enabled: false + start: 0 podAnnotations: {} podDisruptionBudget: annotations: {} @@ -388,7 +391,6 @@ spec: template: metadata: annotations: - checksum/config-jvm: 71f45694cd6c269a552ddc55cf6d698f17e77464f607aba800b908c501bc0d0c labels: app.kubernetes.io/name: jira app.kubernetes.io/instance: unittest-jira