From 43141cb75175d28d14822b68a05f11e636623a2f Mon Sep 17 00:00:00 2001 From: Maxim Tacu Date: Sun, 17 Oct 2021 22:18:35 +0100 Subject: [PATCH] feat: Added option for secret annotation (#824) * feat: Added option for secret annotation * bump the chart version * chore: aligning values attributes with standard * fixed template for manager_secrets * docs: update annotations and fix layout Co-authored-by: Maxim Tacu Co-authored-by: Callum Tait <15716903+toast-gear@users.noreply.github.com> --- charts/actions-runner-controller/README.md | 1 + charts/actions-runner-controller/templates/ci-secret.yaml | 4 ++++ .../actions-runner-controller/templates/manager_secrets.yaml | 4 ++++ charts/actions-runner-controller/values.yaml | 3 ++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/actions-runner-controller/README.md b/charts/actions-runner-controller/README.md index 3b3a6dce..5028e479 100644 --- a/charts/actions-runner-controller/README.md +++ b/charts/actions-runner-controller/README.md @@ -20,6 +20,7 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | `logLevel` | Set the log level of the controller container | | | `authSecret.create` | Deploy the controller auth secret | false | | `authSecret.name` | Set the name of the auth secret | controller-manager | +| `authSecret.annotations` | Set annotations for the auth Secret | | | `authSecret.github_app_id` | The ID of your GitHub App. **This can't be set at the same time as `authSecret.github_token`** | | | `authSecret.github_app_installation_id` | The ID of your GitHub App installation. **This can't be set at the same time as `authSecret.github_token`** | | | `authSecret.github_app_private_key` | The multiline string of your GitHub App's private key. **This can't be set at the same time as `authSecret.github_token`** | | diff --git a/charts/actions-runner-controller/templates/ci-secret.yaml b/charts/actions-runner-controller/templates/ci-secret.yaml index 7cdfaef4..2e3154cf 100644 --- a/charts/actions-runner-controller/templates/ci-secret.yaml +++ b/charts/actions-runner-controller/templates/ci-secret.yaml @@ -7,4 +7,8 @@ data: kind: Secret metadata: name: controller-manager + {{- if .Values.authSecret.annotations }} + annotations: + {{ toYaml .Values.authSecret.annotations | nindent 4 }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/actions-runner-controller/templates/manager_secrets.yaml b/charts/actions-runner-controller/templates/manager_secrets.yaml index 50e7f291..acdc6a13 100644 --- a/charts/actions-runner-controller/templates/manager_secrets.yaml +++ b/charts/actions-runner-controller/templates/manager_secrets.yaml @@ -4,6 +4,10 @@ kind: Secret metadata: name: {{ include "actions-runner-controller.secretName" . }} namespace: {{ .Release.Namespace }} + {{- if .Values.authSecret.annotations }} + annotations: + {{ toYaml .Values.authSecret.annotations | nindent 4 }} + {{- end }} labels: {{- include "actions-runner-controller.labels" . | nindent 4 }} type: Opaque diff --git a/charts/actions-runner-controller/values.yaml b/charts/actions-runner-controller/values.yaml index f4ff7637..4a924588 100644 --- a/charts/actions-runner-controller/values.yaml +++ b/charts/actions-runner-controller/values.yaml @@ -26,7 +26,8 @@ enableLeaderElection: true authSecret: create: false name: "controller-manager" - ### GitHub Apps Configuration + annotations: {} + ### GitHub App Configuration #github_app_id: "" #github_app_installation_id: "" #github_app_private_key: |