Add Annotations to created ServiceAccount (#480)
diff --git a/helm/solr-operator/Chart.yaml b/helm/solr-operator/Chart.yaml
index 8446dc9..55a9982 100644
--- a/helm/solr-operator/Chart.yaml
+++ b/helm/solr-operator/Chart.yaml
@@ -60,6 +60,11 @@
url: https://github.com/apache/solr-operator/issues/479
- name: Github PR
url: https://github.com/apache/solr-operator/pull/481
+ - kind: added
+ description: Support custom annotations on created ServiceAccount
+ links:
+ - name: GitHub PR
+ url: https://github.com/apache/solr-operator/pull/480
artifacthub.io/images: |
- name: solr-operator
image: apache/solr-operator:v0.7.0-prerelease
diff --git a/helm/solr-operator/templates/service_account.yaml b/helm/solr-operator/templates/service_account.yaml
index 38003ff..65aefc8 100644
--- a/helm/solr-operator/templates/service_account.yaml
+++ b/helm/solr-operator/templates/service_account.yaml
@@ -17,5 +17,11 @@
apiVersion: v1
kind: ServiceAccount
metadata:
+ {{- if .Values.serviceAccount.annotations }}
+ annotations:
+ {{- range $key, $value := .Values.serviceAccount.annotations }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
name: {{ include "solr-operator.serviceAccountName" . }}
-{{- end }}
\ No newline at end of file
+{{- end }}
diff --git a/helm/solr-operator/values.yaml b/helm/solr-operator/values.yaml
index 92ce1b2..dc88cab 100644
--- a/helm/solr-operator/values.yaml
+++ b/helm/solr-operator/values.yaml
@@ -62,6 +62,9 @@
# If not set and create is true, a name is generated using the fullname template
name: ""
+ ## Annotations to be added to ServiceAccount
+ annotations: {}
+
# Various Pod Options to customize the runtime of the operator
resources: {}
envVars: []
diff --git a/helm/solr/Chart.yaml b/helm/solr/Chart.yaml
index 17695af..64a86bf 100644
--- a/helm/solr/Chart.yaml
+++ b/helm/solr/Chart.yaml
@@ -40,15 +40,10 @@
# Allowed syntax is described at: https://artifacthub.io/docs/topics/annotations/helm/#example
artifacthub.io/changes: |
- kind: added
- description: Addition 1
+ description: Support custom annotations on created ServiceAccount
links:
- - name: Github Issue
- url: https://github.com/issue-url
- - kind: changed
- description: Change 2
- links:
- - name: Github PR
- url: https://github.com/pr-url
+ - name: GitHub PR
+ url: https://github.com/apache/solr-operator/pull/480
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/apache-solr/solr-operator
diff --git a/helm/solr/templates/service_account.yaml b/helm/solr/templates/service_account.yaml
index ed035d1..b3ea841 100644
--- a/helm/solr/templates/service_account.yaml
+++ b/helm/solr/templates/service_account.yaml
@@ -17,5 +17,11 @@
apiVersion: v1
kind: ServiceAccount
metadata:
+ {{- if .Values.serviceAccount.annotations }}
+ annotations:
+ {{- range $key, $value := .Values.serviceAccount.annotations }}
+ {{ $key | quote }}: {{ $value | quote }}
+ {{- end }}
+ {{- end }}
name: {{ include "solr.serviceAccountName.global" . }}
{{- end }}
diff --git a/helm/solr/values.yaml b/helm/solr/values.yaml
index 1c1f1d3..d61dad2 100644
--- a/helm/solr/values.yaml
+++ b/helm/solr/values.yaml
@@ -36,6 +36,9 @@
# If not set and create is true, a name is generated using the fullname template
name: ""
+ ## Annotations to be added to ServiceAccount
+ annotations: {}
+
image:
repository: "solr"
tag: ""