From cb3865d5b77360285f689f8fb4f439bdb1ae4068 Mon Sep 17 00:00:00 2001 From: Andy Baer Date: Tue, 22 Nov 2022 10:41:40 +0100 Subject: [PATCH] helm option for additional pod labels (#254) * helm option for additional pod labels * readme update * generate helm docs --- helm/README.md | 4 +++- helm/templates/deployment.yaml | 3 +++ helm/values.yaml | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/helm/README.md b/helm/README.md index 11ffc56..b3b398f 100644 --- a/helm/README.md +++ b/helm/README.md @@ -1,6 +1,7 @@ # k8s-event-logger-operator -![Version: 1.10.2](https://img.shields.io/badge/Version-1.10.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.10.2](https://img.shields.io/badge/AppVersion-v1.10.2-informational?style=flat-square) + +![Version: 1.10.2](https://img.shields.io/badge/Version-1.10.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.10.2](https://img.shields.io/badge/AppVersion-v1.10.2-informational?style=flat-square) This operator creates a logging pod that logs corev1.Event information as structured json log. The crd allows to configure the events to be logged. @@ -19,6 +20,7 @@ helm install k8s-event-logger-operator bakito/k8s-event-logger-operator | eventLogger.leaderElection | bool | `true` | Enable leader election for the controller | | eventLogger.leaderElectionResourceLock | string | `nil` | Leader election lock type | | eventLogger.resources | object | `{"limits":{"cpu":"200m","memory":"256Mi"},"requests":{"cpu":"100m","memory":"64Mi"}}` | Resource limits and requests for the operator pods. | +| extraPodLabels | object | `{}` | Add additional pod [labels] | | fullnameOverride | string | `""` | String to fully override "argo-rollouts.fullname" template | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.repository | string | `"ghcr.io/bakito/k8s-event-logger"` | Repository to use | diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index fa219a2..617c17e 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -14,6 +14,9 @@ spec: metadata: labels: {{- include "k8s-event-logger-operator.selectorLabels" . | nindent 8 }} + {{- with .Values.extraPodLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ include "k8s-event-logger-operator.serviceAccountName" . }} containers: diff --git a/helm/values.yaml b/helm/values.yaml index b44fa3a..dce3af6 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -82,3 +82,6 @@ tolerations: [ ] # -- Assign custom [affinity] rules to the deployment affinity: { } + +# -- Add additional pod [labels] +extraPodLabels: { } \ No newline at end of file