From 27c4849507ed791c6ce6160e717c668cee1c2250 Mon Sep 17 00:00:00 2001 From: Rob Williams Date: Fri, 12 Nov 2021 16:19:30 +0000 Subject: [PATCH 1/4] Adding the ability to define custom annotations for the service account created by the Helm install --- helm/prefect-server/templates/serviceaccount.yaml | 2 ++ helm/prefect-server/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/helm/prefect-server/templates/serviceaccount.yaml b/helm/prefect-server/templates/serviceaccount.yaml index c64df53d..023ec245 100644 --- a/helm/prefect-server/templates/serviceaccount.yaml +++ b/helm/prefect-server/templates/serviceaccount.yaml @@ -5,4 +5,6 @@ metadata: name: {{ include "prefect-server.serviceAccountName" . }} labels: {{- include "prefect-server.commonLabels" . | nindent 4 }} + annotations: + {{- merge .Values.serviceAccount.annotations .Values.annotations | toYaml | nindent 4 }} {{- end -}} diff --git a/helm/prefect-server/values.yaml b/helm/prefect-server/values.yaml index 8a783a84..e63db8dd 100644 --- a/helm/prefect-server/values.yaml +++ b/helm/prefect-server/values.yaml @@ -387,6 +387,8 @@ serviceAccount: # associated with the prefect-server infrastructure create: true + annotations: {} + # name sets the name of the service account to use # If not set and create is true, a name is generated using the # prefect-server.nameField template From 5ce033520b72394f15dcf79ba8ee1b0b7f41544d Mon Sep 17 00:00:00 2001 From: Rob Williams Date: Fri, 12 Nov 2021 16:19:30 +0000 Subject: [PATCH 2/4] Adding the ability to define custom annotations for the service account created by the Helm install --- helm/prefect-server/templates/serviceaccount.yaml | 2 ++ helm/prefect-server/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/helm/prefect-server/templates/serviceaccount.yaml b/helm/prefect-server/templates/serviceaccount.yaml index c64df53d..023ec245 100644 --- a/helm/prefect-server/templates/serviceaccount.yaml +++ b/helm/prefect-server/templates/serviceaccount.yaml @@ -5,4 +5,6 @@ metadata: name: {{ include "prefect-server.serviceAccountName" . }} labels: {{- include "prefect-server.commonLabels" . | nindent 4 }} + annotations: + {{- merge .Values.serviceAccount.annotations .Values.annotations | toYaml | nindent 4 }} {{- end -}} diff --git a/helm/prefect-server/values.yaml b/helm/prefect-server/values.yaml index 8a783a84..e63db8dd 100644 --- a/helm/prefect-server/values.yaml +++ b/helm/prefect-server/values.yaml @@ -387,6 +387,8 @@ serviceAccount: # associated with the prefect-server infrastructure create: true + annotations: {} + # name sets the name of the service account to use # If not set and create is true, a name is generated using the # prefect-server.nameField template From f7041c22270b5183712d3adb4c4ac361b119e8c8 Mon Sep 17 00:00:00 2001 From: Rob Williams Date: Wed, 17 Nov 2021 11:09:27 +0000 Subject: [PATCH 3/4] Added changelog entry --- changes/pr314.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 changes/pr314.yaml diff --git a/changes/pr314.yaml b/changes/pr314.yaml new file mode 100644 index 00000000..72304a99 --- /dev/null +++ b/changes/pr314.yaml @@ -0,0 +1,23 @@ +# An example changelog entry +# +# 1. Choose one (or more if a PR encompasses multiple changes) of the following headers: +# - feature +# - enhancement +# - fix +# - deprecation +# - breaking (for breaking changes) +# - migration (for database migrations) +# +# 2. Fill in one (or more) bullet points under the heading, describing the change. +# Markdown syntax may be used. +# +# 3. If you would like to be credited as helping with this release, add a +# contributor section with your name and github username. +# +# Here's an example of a PR that adds an enhancement + +enhancement: + - "Add service role annotations - [#314](https://github.com/PrefectHQ/server/pull/314)" + +contributor: + - "[Rob Williams](https://github.com/rwilliams-exs)" From 5c66ebecc48c875e7788646b5cd2179a13e4b9ff Mon Sep 17 00:00:00 2001 From: rwilliams-exs <82091721+rwilliams-exs@users.noreply.github.com> Date: Wed, 17 Nov 2021 18:20:53 +0000 Subject: [PATCH 4/4] Update changes/pr314.yaml Co-authored-by: Michael Adkins --- changes/pr314.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes/pr314.yaml b/changes/pr314.yaml index 72304a99..0b4163df 100644 --- a/changes/pr314.yaml +++ b/changes/pr314.yaml @@ -17,7 +17,7 @@ # Here's an example of a PR that adds an enhancement enhancement: - - "Add service role annotations - [#314](https://github.com/PrefectHQ/server/pull/314)" + - "Helm: Allow annotations to be provided for service accounts- [#314](https://github.com/PrefectHQ/server/pull/314)" contributor: - "[Rob Williams](https://github.com/rwilliams-exs)"