Skip to content

Commit

Permalink
Added annotations to the StatefulSets (#857)
Browse files Browse the repository at this point in the history
* possiblity to add annotations to the StatefulSets, which might be useful for gitops aproach

* Update values.yaml

* fixing unittests

* Fix unit tests

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: yivan-atl <[email protected]>
Co-authored-by: Yevhen Ivantsov <[email protected]>
  • Loading branch information
4 people authored Aug 12, 2024
1 parent dd3ca29 commit 0b8d625
Show file tree
Hide file tree
Showing 22 changed files with 108 additions and 1 deletion.
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 @@ -4,6 +4,10 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.commonLabels" . | nindent 4 }}
annotations:
{{- with .Values.bamboo.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
Expand Down
4 changes: 4 additions & 0 deletions src/main/charts/bamboo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,10 @@ bamboo:
#
additionalVolumeMounts: []

# -- Defines additional annotations to the Bamboo StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations: {}
# argocd.argoproj.io/sync-wave: "10"

# -- Defines any additional environment variables to be passed to the Bamboo
# container. See https://hub.docker.com/r/atlassian/bamboo for
# supported variables.
Expand Down
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 @@ -5,6 +5,10 @@ metadata:
name: {{ include "common.names.fullname" . }}-mesh
labels:
{{- include "common.labels.commonLabels" . | nindent 4 }}
annotations:
{{- with .Values.bitbucket.mesh.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
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 @@ -7,6 +7,10 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.commonLabels" . | nindent 4 }}
annotations:
{{- with .Values.bitbucket.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
Expand Down
8 changes: 8 additions & 0 deletions src/main/charts/bitbucket/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,10 @@ bitbucket:
# key: keystore.jks
# mountPath: /var/ssl

# -- Defines additional annotations to the Bitbucket Mesh StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations: {}
# argocd.argoproj.io/sync-wave: "10"

# -- Standard K8s node-selectors that will be applied to all Bitbucket Mesh pods
#
nodeSelector: {}
Expand Down Expand Up @@ -1209,6 +1213,10 @@ bitbucket:
# requests:
# storage: 1Gi

# -- Defines additional annotations to the Bitbucket StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations: {}
# argocd.argoproj.io/sync-wave: "10"

# -- Defines topology spread constraints for Bitbucket pods. See details:
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
name: {{ include "synchrony.fullname" . }}
labels:
{{- include "synchrony.labels" . | nindent 4 }}
annotations:
{{- with .Values.synchrony.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
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 @@ -4,6 +4,10 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.commonLabels" . | nindent 4 }}
annotations:
{{- with .Values.confluence.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
Expand Down
8 changes: 8 additions & 0 deletions src/main/charts/confluence/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,10 @@ confluence:
# requests:
# storage: 1Gi

# -- Defines additional annotations to the Confluence StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations: {}
# argocd.argoproj.io/sync-wave: "10"

# -- Defines topology spread constraints for Confluence pods. See details:
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
#
Expand Down Expand Up @@ -1347,6 +1351,10 @@ synchrony:
#
additionalVolumeMounts: []

# -- Defines additional annotations to the Synchrony StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations:
# argocd.argoproj.io/sync-wave: "10"

# -- Defines any additional ports for the Synchrony container.
#
additionalPorts: []
Expand Down
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 @@ -4,6 +4,10 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.commonLabels" . | nindent 4 }}
annotations:
{{- with .Values.crowd.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
Expand Down
4 changes: 4 additions & 0 deletions src/main/charts/crowd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,10 @@ crowd:
# requests:
# storage: 1Gi

# -- Defines additional annotations to the Bamboo StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations: {}
# argocd.argoproj.io/sync-wave: "10"

# -- Defines topology spread constraints for Crowd pods. See details:
# https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
#
Expand Down
4 changes: 4 additions & 0 deletions src/main/charts/jira/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.commonLabels" . | nindent 4 }}
annotations:
{{- with .Values.jira.additionalAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.updateStrategy }}
{{- with .Values.updateStrategy }}
Expand Down
4 changes: 4 additions & 0 deletions src/main/charts/jira/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,10 @@ jira:
#
additionalEnvironmentVariables: []

# -- Defines additional annotations to the Jira StateFulSet. This might be required when deploying using a GitOps approach
additionalAnnotations: {}
# argocd.argoproj.io/sync-wave: "10"

# -- Defines any additional ports for the Jira container.
#
additionalPorts: []
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expected_helm_output/bamboo/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ data:
accessLog:
localHomeSubPath: log
mountPath: /opt/atlassian/bamboo/logs
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalBundledPlugins: []
additionalCertificates:
customCmd: null
Expand Down Expand Up @@ -436,6 +438,8 @@ metadata:
app.kubernetes.io/instance: unittest-bamboo
app.kubernetes.io/version: "9.6.4"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 1
serviceName: unittest-bamboo
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/expected_helm_output/bamboo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ bamboo:
jmsService:
enabled: true

additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"

priorityClassName: "high"
additionalHosts:
Expand Down
8 changes: 8 additions & 0 deletions src/test/resources/expected_helm_output/bitbucket/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ data:
helmValues:
enabled: true
bitbucket:
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalBundledPlugins: []
additionalCertificates:
customCmd: null
Expand Down Expand Up @@ -143,6 +145,8 @@ data:
periodSeconds: 5
timeoutSeconds: 1
mesh:
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalCertificates:
customCmd: null
initContainer:
Expand Down Expand Up @@ -576,6 +580,8 @@ metadata:
app.kubernetes.io/instance: unittest-bitbucket
app.kubernetes.io/version: "8.19.6"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 3
podManagementPolicy: OrderedReady
Expand Down Expand Up @@ -695,6 +701,8 @@ metadata:
app.kubernetes.io/instance: unittest-bitbucket
app.kubernetes.io/version: "8.19.6"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 1
podManagementPolicy: OrderedReady
Expand Down
6 changes: 6 additions & 0 deletions src/test/resources/expected_helm_output/bitbucket/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ bitbucket:
enabled: true
priorityClassName: "high"

additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"

additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"

priorityClassName: "high"
additionalHosts:
- ip: "127.0.0.1"
Expand Down
10 changes: 9 additions & 1 deletion src/test/resources/expected_helm_output/confluence/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ data:
enabled: true
localHomeSubPath: logs
mountPath: /opt/atlassian/confluence/logs
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalBundledPlugins: []
additionalCertificates:
customCmd: null
Expand Down Expand Up @@ -317,6 +319,8 @@ data:
roleBinding:
create: true
synchrony:
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalCertificates:
customCmd: null
initContainer:
Expand Down Expand Up @@ -532,6 +536,8 @@ metadata:
app.kubernetes.io/instance: unittest-confluence
app.kubernetes.io/version: "8.5.14"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 1
serviceName: unittest-confluence-synchrony
Expand Down Expand Up @@ -612,6 +618,8 @@ metadata:
app.kubernetes.io/instance: unittest-confluence
app.kubernetes.io/version: "8.5.14"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 1
serviceName: unittest-confluence
Expand All @@ -622,7 +630,7 @@ spec:
template:
metadata:
annotations:
checksum/config-jvm: f3e06517d2f5a9ad3f17140e443aeec6e7cef638abd89a4718bd90923eb9a37c
checksum/config-jvm: a47976a0429405564e76ef046691a3da0b15cee3d9b45d523f1cfa6def699df6
labels:
app.kubernetes.io/name: confluence
app.kubernetes.io/instance: unittest-confluence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ volumes:
synchrony:
enabled: true

additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"

additionalHosts:
- ip: "192.168.1.1"
hostnames:
Expand All @@ -20,3 +23,7 @@ monitoring:
atlassianAnalyticsAndSupport:
analytics:
enabled: false

confluence:
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
4 changes: 4 additions & 0 deletions src/test/resources/expected_helm_output/crowd/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ data:
enabled: true
localHomeSubPath: logs
mountPath: /opt/atlassian/crowd/apache-tomcat/logs
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalBundledPlugins: []
additionalCertificates:
customCmd: null
Expand Down Expand Up @@ -360,6 +362,8 @@ metadata:
app.kubernetes.io/instance: unittest-crowd
app.kubernetes.io/version: "6.0.0"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 1
serviceName: unittest-crowd
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expected_helm_output/crowd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ monitoring:
atlassianAnalyticsAndSupport:
analytics:
enabled: false

crowd:
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
4 changes: 4 additions & 0 deletions src/test/resources/expected_helm_output/jira/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ data:
accessLog:
localHomeSubPath: log
mountPath: /opt/atlassian/jira/logs
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"
additionalBundledPlugins: []
additionalCertificates:
customCmd: null
Expand Down Expand Up @@ -383,6 +385,8 @@ metadata:
app.kubernetes.io/instance: unittest-jira
app.kubernetes.io/version: "9.12.12"
app.kubernetes.io/managed-by: Helm
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
replicas: 1
serviceName: unittest-jira
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/expected_helm_output/jira/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ monitoring:
atlassianAnalyticsAndSupport:
analytics:
enabled: false

jira:
additionalAnnotations:
argocd.argoproj.io/sync-wave: "10"

0 comments on commit 0b8d625

Please sign in to comment.