You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by al...@apache.org on 2024/01/17 01:18:16 UTC

(apisix-helm-chart) branch master updated: feat: support adding annotations to Deployment (#697)

This is an automated email from the ASF dual-hosted git repository.

alinsran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new 54f67da  feat: support adding annotations to Deployment (#697)
54f67da is described below

commit 54f67da602a5ea5c48f0733042a0e46bfe291885
Author: Martin Štefany <57...@users.noreply.github.com>
AuthorDate: Wed Jan 17 02:18:11 2024 +0100

    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 0f1bb8f..6b49c66 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 ccddd9e..80bd41d 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 74cbc93..4d5f44e 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