This is an automated email from the ASF dual-hosted git repository.
ashishtiwari 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 a9a2ecb feat: support adding labels to APISIX Pods (#730)
a9a2ecb is described below
commit a9a2ecb59807affd21d3b1e9f84c0dbc82468620
Author: Fábio Viana <[email protected]>
AuthorDate: Wed Mar 20 08:40:30 2024 +0100
feat: support adding labels to APISIX Pods (#730)
---
charts/apisix/README.md | 1 +
charts/apisix/templates/_pod.tpl | 3 +++
charts/apisix/values.yaml | 2 ++
3 files changed, 6 insertions(+)
diff --git a/charts/apisix/README.md b/charts/apisix/README.md
index 8dc266c..3ba83c9 100644
--- a/charts/apisix/README.md
+++ b/charts/apisix/README.md
@@ -85,6 +85,7 @@ The command removes all the Kubernetes components associated
with the chart and
| apisix.podDisruptionBudget.enabled | bool | `false` | Enable or disable
podDisruptionBudget |
| apisix.podDisruptionBudget.maxUnavailable | int | `1` | Set the
maxUnavailable of podDisruptionBudget |
| apisix.podDisruptionBudget.minAvailable | string | `"90%"` | Set the
`minAvailable` of podDisruptionBudget. You can specify only one of
`maxUnavailable` and `minAvailable` in a single PodDisruptionBudget. See
[Specifying a Disruption Budget for your
Application](https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget)
for more details |
+| apisix.podLabels | object | `{}` | Labels to add to each pod |
| apisix.podSecurityContext | object | `{}` | Set the securityContext for
Apache APISIX pods |
| apisix.priorityClassName | string | `""` | Set
[priorityClassName](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority)
for Apache APISIX pods |
| apisix.proxyProtocol | object |
`{"enabled":false,"listenHttpPort":9181,"listenHttpsPort":9182,"tcp":true,"upstream":true}`
| Enable Proxy Protocol |
diff --git a/charts/apisix/templates/_pod.tpl b/charts/apisix/templates/_pod.tpl
index bfa5543..73f313d 100644
--- a/charts/apisix/templates/_pod.tpl
+++ b/charts/apisix/templates/_pod.tpl
@@ -7,6 +7,9 @@ metadata:
{{- end }}
labels:
{{- include "apisix.selectorLabels" . | nindent 4 }}
+ {{- with .Values.apisix.podLabels }}
+ {{ tpl (toYaml .) $ | nindent 4}}
+ {{- end }}
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index ba50746..c7d9847 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -116,6 +116,8 @@ apisix:
priorityClassName: ""
# -- Annotations to add to each pod
podAnnotations: {}
+ # -- Labels to add to each pod
+ podLabels: {}
# -- Set the securityContext for Apache APISIX pods
podSecurityContext: {}
# fsGroup: 2000