Skip to content

Commit

Permalink
Support Kubernetes StatefulSetStartOrdinal feature gate (#747)
Browse files Browse the repository at this point in the history
* 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).
  • Loading branch information
uohndecadisde authored Jan 24, 2024
1 parent 4584811 commit 72e24af
Show file tree
Hide file tree
Showing 25 changed files with 147 additions and 32 deletions.
1 change: 1 addition & 0 deletions docs/docs/userguide/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 3 additions & 4 deletions src/main/charts/bamboo-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:** <https://www.atlassian.com/software/bamboo>

## Source Code
Expand Down Expand Up @@ -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 |
10 changes: 6 additions & 4 deletions src/main/charts/bamboo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:** <https://www.atlassian.com/software/bamboo>

## Source Code
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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. |
4 changes: 4 additions & 0 deletions src/main/charts/bamboo/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions src/main/charts/bamboo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions src/main/charts/bitbucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:** <https://atlassian.github.io/data-center-helm-charts/>

## Source Code
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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. |
4 changes: 4 additions & 0 deletions src/main/charts/bitbucket/templates/statefulset-mesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/main/charts/bitbucket/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions src/main/charts/bitbucket/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions src/main/charts/confluence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:** <https://atlassian.github.io/data-center-helm-charts/>

## Source Code
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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. |
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions src/main/charts/confluence/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions src/main/charts/confluence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions src/main/charts/crowd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:** <https://atlassian.github.io/data-center-helm-charts/>

## Source Code
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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. |
4 changes: 4 additions & 0 deletions src/main/charts/crowd/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 14 additions & 0 deletions src/main/charts/crowd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 72e24af

Please sign in to comment.