Skip to content

Commit 8131ca7

Browse files
authored
feat: support additional labels for pods (#163)
1 parent 20cab08 commit 8131ca7

File tree

10 files changed

+31
-2
lines changed

10 files changed

+31
-2
lines changed

charts/api7/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.17.5
18+
version: 0.17.6
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/api7/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ A Helm chart for Kubernetes
2121
| dashboard.extraEnvVars | list | `[]` | |
2222
| dashboard.extraVolumeMounts | list | `[]` | |
2323
| dashboard.extraVolumes | list | `[]` | |
24+
| dashboard.podLabels | object | `{}` | |
2425
| dashboard.image.pullPolicy | string | `"Always"` | |
2526
| dashboard.image.repository | string | `"api7/api7-ee-3-integrated"` | |
2627
| dashboard.image.tag | string | `"v3.5.0"` | |
@@ -84,6 +85,7 @@ A Helm chart for Kubernetes
8485
| developer_portal.extraEnvVars | list | `[]` | |
8586
| developer_portal.extraVolumeMounts | list | `[]` | |
8687
| developer_portal.extraVolumes | list | `[]` | |
88+
| developer_portal.podLabels | object | `{}` | |
8789
| developer_portal.image.pullPolicy | string | `"Always"` | |
8890
| developer_portal.image.repository | string | `"api7/api7-ee-developer-portal"` | |
8991
| developer_portal.image.tag | string | `"v3.5.0"` | |
@@ -116,6 +118,7 @@ A Helm chart for Kubernetes
116118
| dp_manager.extraEnvVars | list | `[]` | |
117119
| dp_manager.extraVolumeMounts | list | `[]` | |
118120
| dp_manager.extraVolumes | list | `[]` | |
121+
| dp_manager.podLabels | object | `{}` | |
119122
| dp_manager.image.pullPolicy | string | `"Always"` | |
120123
| dp_manager.image.repository | string | `"api7/api7-ee-dp-manager"` | |
121124
| dp_manager.image.tag | string | `"v3.5.0"` | |

charts/api7/templates/dashboard-deploy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ spec:
2121
labels:
2222
{{- include "api7ee3.selectorLabels" . | nindent 8 }}
2323
app.kubernetes.io/component: dashboard
24+
{{- if .Values.dashboard.podLabels }}
25+
{{- range $key, $value := $.Values.dashboard.podLabels }}
26+
{{ $key }}: {{ $value | quote }}
27+
{{- end }}
28+
{{- end }}
2429
spec:
2530
{{- if .Values.imagePullSecret }}
2631
imagePullSecrets:

charts/api7/templates/developer-portal-deploy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ spec:
2222
labels:
2323
{{- include "api7ee3.selectorLabels" . | nindent 8 }}
2424
app.kubernetes.io/component: developer-portal
25+
{{- if .Values.developer_portal.podLabels }}
26+
{{- range $key, $value := $.Values.developer_portal.podLabels }}
27+
{{ $key }}: {{ $value | quote }}
28+
{{- end }}
29+
{{- end }}
2530
spec:
2631
{{- if .Values.imagePullSecret }}
2732
imagePullSecrets:

charts/api7/templates/dp-manager-deploy.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ spec:
2121
labels:
2222
{{- include "api7ee3.selectorLabels" . | nindent 8 }}
2323
app.kubernetes.io/component: dp-manager
24+
{{- if .Values.dp_manager.podLabels }}
25+
{{- range $key, $value := $.Values.dp_manager.podLabels }}
26+
{{ $key }}: {{ $value | quote }}
27+
{{- end }}
28+
{{- end }}
2429
spec:
2530
{{- if .Values.imagePullSecret }}
2631
imagePullSecrets:

charts/api7/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dashboard:
2626
extraEnvVars: []
2727
extraVolumes: []
2828
extraVolumeMounts: []
29+
podLabels: {}
2930

3031
dp_manager:
3132
replicaCount: 1
@@ -49,6 +50,7 @@ dp_manager:
4950
extraEnvVars: []
5051
extraVolumes: []
5152
extraVolumeMounts: []
53+
podLabels: {}
5254

5355
developer_portal:
5456
replicaCount: 1
@@ -63,6 +65,7 @@ developer_portal:
6365
extraEnvVars: []
6466
extraVolumes: []
6567
extraVolumeMounts: []
68+
podLabels: {}
6669

6770
imagePullSecret: ""
6871
nameOverride: ""

charts/gateway/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type: application
1414
# This is the chart version. This version number should be incremented each time you make changes
1515
# to the chart and its templates, including the app version.
1616
# Versions are expected to follow Semantic Versioning (https://semver.org/)
17-
version: 0.2.6
17+
version: 0.2.7
1818

1919
# This is the version number of the application being deployed. This version number should be
2020
# incremented each time you make changes to the application. Versions are not expected to

charts/gateway/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ The command removes all the Kubernetes components associated with the chart and
102102
| apisix.meta.luaSharedDict.prometheus-metrics | string | `"15m"` | |
103103
| apisix.nodeSelector | object | `{}` | Node labels for API7 Gateway pod assignment |
104104
| apisix.podAnnotations | object | `{}` | Annotations to add to each pod |
105+
| apisix.podLabels | object | `{}` | Labels to add to each pod |
105106
| apisix.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}` | See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details |
106107
| apisix.podDisruptionBudget.enabled | bool | `false` | Enable or disable podDisruptionBudget |
107108
| apisix.podDisruptionBudget.maxUnavailable | int | `1` | Set the maxUnavailable of podDisruptionBudget |

charts/gateway/templates/_pod.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ metadata:
99
{{- end }}
1010
labels:
1111
{{- include "apisix.selectorLabels" . | nindent 4 }}
12+
{{- if .Values.apisix.podLabels }}
13+
{{- range $key, $value := $.Values.apisix.podLabels }}
14+
{{ $key }}: {{ $value | quote }}
15+
{{- end }}
16+
{{- end }}
1217
spec:
1318
{{- with .Values.global.imagePullSecrets }}
1419
imagePullSecrets:

charts/gateway/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ apisix:
114114
priorityClassName: ""
115115
# -- Annotations to add to each pod
116116
podAnnotations: {}
117+
# -- Labels to add to each pod
118+
podLabels: {}
117119
# -- Set the securityContext for API7 Gateway pods
118120
podSecurityContext: {}
119121
# fsGroup: 2000

0 commit comments

Comments
 (0)