From 28be5ea9bc93a0bafe302647988e7dd2e9c01e74 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 15 Jan 2024 11:38:38 +0100 Subject: [PATCH] Chart: Include value for annotations in controller (deployment) --- charts/actions-runner-controller/README.md | 15 ++++++++------- .../templates/deployment.yaml | 4 ++++ charts/actions-runner-controller/values.yaml | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/charts/actions-runner-controller/README.md b/charts/actions-runner-controller/README.md index e552d8be..1a637c7e 100644 --- a/charts/actions-runner-controller/README.md +++ b/charts/actions-runner-controller/README.md @@ -53,10 +53,11 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | `metrics.proxy.image.tag` | The tag of the kube-proxy image to use when pulling the container | v0.13.1 | | `metrics.serviceMonitorLabels` | Set labels to apply to ServiceMonitor resources | | | `imagePullSecrets` | Specifies the secret to be used when pulling the controller pod containers | | -| `fullnameOverride` | Override the full resource names | | -| `nameOverride` | Override the resource name prefix | | +| `fullnameOverride` | Override the full resource names | | +| `nameOverride` | Override the resource name prefix | | | `serviceAccount.annotations` | Set annotations to the service account | | | `serviceAccount.create` | Deploy the controller pod under a service account | true | +| `annotations` | Set annotations for the controller deployment | | | `podAnnotations` | Set annotations for the controller pod | | | `podLabels` | Set labels for the controller pod | | | `serviceAccount.name` | Set the name of the service account | | @@ -69,7 +70,7 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | `nodeSelector` | Set the controller pod nodeSelector | | | `resources` | Set the controller pod resources | | | `affinity` | Set the controller pod affinity rules | | -| `podDisruptionBudget.enabled` | Enables a PDB to ensure HA of controller pods | false | +| `podDisruptionBudget.enabled` | Enables a PDB to ensure HA of controller pods | false | | `podDisruptionBudget.minAvailable` | Minimum number of pods that must be available after eviction | | | `podDisruptionBudget.maxUnavailable` | Maximum number of pods that can be unavailable after eviction. Kubernetes 1.7+ required. | | | `tolerations` | Set the controller pod tolerations | | @@ -91,8 +92,8 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | `githubWebhookServer.secret.name` | Set the name of the webhook hook secret | github-webhook-server | | `githubWebhookServer.secret.github_webhook_secret_token` | Set the webhook secret token value | | | `githubWebhookServer.imagePullSecrets` | Specifies the secret to be used when pulling the githubWebhookServer pod containers | | -| `githubWebhookServer.nameOverride` | Override the resource name prefix | | -| `githubWebhookServer.fullnameOverride` | Override the full resource names | | +| `githubWebhookServer.nameOverride` | Override the resource name prefix | | +| `githubWebhookServer.fullnameOverride` | Override the full resource names | | | `githubWebhookServer.serviceAccount.create` | Deploy the githubWebhookServer under a service account | true | | `githubWebhookServer.serviceAccount.annotations` | Set annotations for the service account | | | `githubWebhookServer.serviceAccount.name` | Set the service account name | | @@ -127,8 +128,8 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | `actionsMetricsServer.secret.name` | Set the name of the webhook hook secret | actions-metrics-server | | `actionsMetricsServer.secret.github_webhook_secret_token` | Set the webhook secret token value | | | `actionsMetricsServer.imagePullSecrets` | Specifies the secret to be used when pulling the actionsMetricsServer pod containers | | -| `actionsMetricsServer.nameOverride` | Override the resource name prefix | | -| `actionsMetricsServer.fullnameOverride` | Override the full resource names | | +| `actionsMetricsServer.nameOverride` | Override the resource name prefix | | +| `actionsMetricsServer.fullnameOverride` | Override the full resource names | | | `actionsMetricsServer.serviceAccount.create` | Deploy the actionsMetricsServer under a service account | true | | `actionsMetricsServer.serviceAccount.annotations` | Set annotations for the service account | | | `actionsMetricsServer.serviceAccount.name` | Set the service account name | | diff --git a/charts/actions-runner-controller/templates/deployment.yaml b/charts/actions-runner-controller/templates/deployment.yaml index 3490f989..9ff49344 100644 --- a/charts/actions-runner-controller/templates/deployment.yaml +++ b/charts/actions-runner-controller/templates/deployment.yaml @@ -3,6 +3,10 @@ kind: Deployment metadata: name: {{ include "actions-runner-controller.fullname" . }} namespace: {{ .Release.Namespace }} + {{- with .Values.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} labels: {{- include "actions-runner-controller.labels" . | nindent 4 }} spec: diff --git a/charts/actions-runner-controller/values.yaml b/charts/actions-runner-controller/values.yaml index 25da1515..fbb83f9d 100644 --- a/charts/actions-runner-controller/values.yaml +++ b/charts/actions-runner-controller/values.yaml @@ -83,6 +83,7 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +annotations: {} podAnnotations: {} podLabels: {}