From 67fa1c998a3af3eaedf4a6a25163b31c5555e581 Mon Sep 17 00:00:00 2001 From: Oleksander B <5033681+0xbilko@users.noreply.github.com> Date: Tue, 20 Aug 2024 09:20:18 +0300 Subject: [PATCH] add annotations + podAnnotations (#212) Signed-off-by: beliys Signed-off-by: bko Signed-off-by: Oleksander B <5033681+0xbilko@users.noreply.github.com> Signed-off-by: Maksim Nabokikh Co-authored-by: Maksim Nabokikh --- charts/k8s-image-availability-exporter/Chart.yaml | 2 +- charts/k8s-image-availability-exporter/README.md | 4 +++- .../templates/deployment.yaml | 6 ++++++ charts/k8s-image-availability-exporter/values.yaml | 6 ++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/charts/k8s-image-availability-exporter/Chart.yaml b/charts/k8s-image-availability-exporter/Chart.yaml index ffd1400..a5afafb 100644 --- a/charts/k8s-image-availability-exporter/Chart.yaml +++ b/charts/k8s-image-availability-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "0.9.0" description: Application for monitoring the cluster workloads image presence in a container registry. name: k8s-image-availability-exporter -version: "0.14.0" +version: "0.15.0" kubeVersion: ">=1.14.0-0" maintainers: - name: nabokihms diff --git a/charts/k8s-image-availability-exporter/README.md b/charts/k8s-image-availability-exporter/README.md index 9b9d60b..7590f70 100644 --- a/charts/k8s-image-availability-exporter/README.md +++ b/charts/k8s-image-availability-exporter/README.md @@ -1,6 +1,6 @@ # k8s-image-availability-exporter -![Version: 0.14.0](https://img.shields.io/badge/Version-0.14.0-informational?style=flat-square) ![AppVersion: 0.9.0](https://img.shields.io/badge/AppVersion-0.9.0-informational?style=flat-square) +![Version: 0.15.0](https://img.shields.io/badge/Version-0.15.0-informational?style=flat-square) ![AppVersion: 0.9.0](https://img.shields.io/badge/AppVersion-0.9.0-informational?style=flat-square) Application for monitoring the cluster workloads image presence in a container registry. @@ -27,6 +27,8 @@ This chart bootstraps a [k8s-image-availability-exporter](https://github.com/fla | k8sImageAvailabilityExporter.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy to use for the k8s-image-availability-exporter deployment | | k8sImageAvailabilityExporter.args | list | `["--bind-address=:8080"]` | Command line arguments for the exporter | | k8sImageAvailabilityExporter.useSecretsForPrivateRepositories | bool | `true` | Setting this to false will prevent k8s-iae having unconstrained cluster-wide secret access | +| annotations | object | `{}` | additional annotations for deployment | +| podAnnotations | object | `{}` | additional annotations added to the pod | | replicaCount | int | `1` | Number of replicas (pods) to launch. | | imagePullSecrets | list | `[]` | Reference to one or more secrets to be used when [pulling images](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret) (from private registries). | | podSecurityContext | object | `{}` | Pod [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context) for details. | diff --git a/charts/k8s-image-availability-exporter/templates/deployment.yaml b/charts/k8s-image-availability-exporter/templates/deployment.yaml index d394411..140426f 100644 --- a/charts/k8s-image-availability-exporter/templates/deployment.yaml +++ b/charts/k8s-image-availability-exporter/templates/deployment.yaml @@ -2,6 +2,9 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "k8s-image-availability-exporter.fullname" . }} + {{- with .Values.annotations }} + annotations: {{- toYaml . | nindent 4 }} + {{- end }} labels: helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" app.kubernetes.io/name: "{{ template "k8s-image-availability-exporter.fullname" . }}" @@ -21,6 +24,9 @@ spec: app: {{ template "k8s-image-availability-exporter.fullname" . }} template: metadata: + {{- with .Values.podAnnotations }} + annotations: {{- toYaml . | nindent 8 }} + {{- end }} labels: app: {{ template "k8s-image-availability-exporter.fullname" . }} spec: diff --git a/charts/k8s-image-availability-exporter/values.yaml b/charts/k8s-image-availability-exporter/values.yaml index ff660b7..070f9dc 100644 --- a/charts/k8s-image-availability-exporter/values.yaml +++ b/charts/k8s-image-availability-exporter/values.yaml @@ -13,6 +13,12 @@ k8sImageAvailabilityExporter: # -- Setting this to false will prevent k8s-iae having unconstrained cluster-wide secret access useSecretsForPrivateRepositories: true +# -- additional annotations for deployment +annotations: {} + +# -- additional annotations added to the pod +podAnnotations: {} + # -- Number of replicas (pods) to launch. replicaCount: 1