From 54f67da602a5ea5c48f0733042a0e46bfe291885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0tefany?= <57348587+mstefany@users.noreply.github.com> Date: Wed, 17 Jan 2024 02:18:11 +0100 Subject: [PATCH] feat: support adding annotations to Deployment (#697) --- charts/apisix-ingress-controller/README.md | 1 + charts/apisix-ingress-controller/templates/deployment.yaml | 4 ++++ charts/apisix-ingress-controller/values.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/charts/apisix-ingress-controller/README.md b/charts/apisix-ingress-controller/README.md index 0f1bb8fc..6b49c66e 100644 --- a/charts/apisix-ingress-controller/README.md +++ b/charts/apisix-ingress-controller/README.md @@ -106,6 +106,7 @@ The same for container level, you need to set: | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | | +| annotations | object | `{}` | Add annotations to Apache APISIX ingress controller resource | | autoscaling.enabled | bool | `false` | | | autoscaling.maxReplicas | int | `100` | | | autoscaling.minReplicas | int | `1` | | diff --git a/charts/apisix-ingress-controller/templates/deployment.yaml b/charts/apisix-ingress-controller/templates/deployment.yaml index ccddd9e7..80bd41d0 100644 --- a/charts/apisix-ingress-controller/templates/deployment.yaml +++ b/charts/apisix-ingress-controller/templates/deployment.yaml @@ -19,6 +19,10 @@ kind: Deployment metadata: name: {{ include "apisix-ingress-controller.fullname" . }} namespace: {{ .Release.Namespace }} + annotations: + {{- range $key, $value := .Values.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} labels: {{- include "apisix-ingress-controller.labels" . | nindent 4 }} spec: diff --git a/charts/apisix-ingress-controller/values.yaml b/charts/apisix-ingress-controller/values.yaml index 74cbc93e..4d5f44e3 100644 --- a/charts/apisix-ingress-controller/values.yaml +++ b/charts/apisix-ingress-controller/values.yaml @@ -29,6 +29,9 @@ labelsOverride: {} # app.kubernetes.io/name: "{{ .Release.Name }}" # app.kubernetes.io/instance: '{{ include "apisix-ingress-controller.name" . }}' +# -- Add annotations to Apache APISIX ingress controller resource +annotations: {} + rbac: # -- Specifies whether RBAC resources should be created create: true