feat(helm): add podLabels to gateway && controller (#1792)

Signed-off-by: Xijun Dai <daixijun1990@gmail.com>
This commit is contained in:
Xijun Dai
2025-03-03 15:31:28 +08:00
committed by GitHub
parent ca32e587d3
commit 80b58e86e1
4 changed files with 32 additions and 16 deletions

View File

@@ -15,6 +15,9 @@ template:
{{- with .Values.gateway.revision }} {{- with .Values.gateway.revision }}
istio.io/rev: {{ . }} istio.io/rev: {{ . }}
{{- end }} {{- end }}
{{- with .Values.gateway.podLabels }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- include "gateway.selectorLabels" . | nindent 6 }} {{- include "gateway.selectorLabels" . | nindent 6 }}
spec: spec:
{{- with .Values.gateway.imagePullSecrets }} {{- with .Values.gateway.imagePullSecrets }}

View File

@@ -19,6 +19,9 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- with .Values.controller.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- include "controller.selectorLabels" . | nindent 8 }} {{- include "controller.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.controller.imagePullSecrets }} {{- with .Values.controller.imagePullSecrets }}

View File

@@ -462,6 +462,9 @@ gateway:
prometheus.io/path: "/stats/prometheus" prometheus.io/path: "/stats/prometheus"
sidecar.istio.io/inject: "false" sidecar.istio.io/inject: "false"
# -- Labels to apply to the pod
podLabels: {}
# -- Define the security context for the pod. # -- Define the security context for the pod.
# If unset, this will be automatically set to the minimum privileges required to bind to port 80 and 443. # If unset, this will be automatically set to the minimum privileges required to bind to port 80 and 443.
# On Kubernetes 1.22+, this only requires the `net.ipv4.ip_unprivileged_port_start` sysctl. # On Kubernetes 1.22+, this only requires the `net.ipv4.ip_unprivileged_port_start` sysctl.
@@ -544,12 +547,12 @@ controller:
labels: {} labels: {}
probe: probe:
{ httpGet:
httpGet: { path: /ready, port: 8888 }, path: /ready
initialDelaySeconds: 1, port: 8888
periodSeconds: 3, initialDelaySeconds: 1
timeoutSeconds: 5, periodSeconds: 3
} timeoutSeconds: 5
imagePullSecrets: [] imagePullSecrets: []
@@ -567,21 +570,26 @@ controller:
podAnnotations: {} podAnnotations: {}
# -- Labels to apply to the pod
podLabels: {}
podSecurityContext: podSecurityContext:
{} {}
# fsGroup: 2000 # fsGroup: 2000
ports: ports:
[ - name: http
{ "name": "http", "protocol": "TCP", "port": 8888, "targetPort": 8888 }, protocol: TCP
{ port: 8888
"name": "http-solver", targetPort: 8888
"protocol": "TCP", - name: http-solver
"port": 8889, protocol: TCP
"targetPort": 8889, port: 8889
}, targetPort: 8889
{ "name": "grpc", "protocol": "TCP", "port": 15051, "targetPort": 15051 }, - name: grpc
] protocol: TCP
port: 15051
targetPort: 15051
service: service:
type: ClusterIP type: ClusterIP

View File

@@ -51,6 +51,7 @@ The command removes all the Kubernetes components associated with the chart and
| controller.name | string | `"higress-controller"` | | | controller.name | string | `"higress-controller"` | |
| controller.nodeSelector | object | `{}` | | | controller.nodeSelector | object | `{}` | |
| controller.podAnnotations | object | `{}` | | | controller.podAnnotations | object | `{}` | |
| controller.podLabels | object | `{}` | Labels to apply to the pod |
| controller.podSecurityContext | object | `{}` | | | controller.podSecurityContext | object | `{}` | |
| controller.ports[0].name | string | `"http"` | | | controller.ports[0].name | string | `"http"` | |
| controller.ports[0].port | int | `8888` | | | controller.ports[0].port | int | `8888` | |
@@ -115,6 +116,7 @@ The command removes all the Kubernetes components associated with the chart and
| gateway.podAnnotations."prometheus.io/port" | string | `"15020"` | | | gateway.podAnnotations."prometheus.io/port" | string | `"15020"` | |
| gateway.podAnnotations."prometheus.io/scrape" | string | `"true"` | | | gateway.podAnnotations."prometheus.io/scrape" | string | `"true"` | |
| gateway.podAnnotations."sidecar.istio.io/inject" | string | `"false"` | | | gateway.podAnnotations."sidecar.istio.io/inject" | string | `"false"` | |
| gateway.podLabels | object | `{}` | Labels to apply to the pod |
| gateway.rbac.enabled | bool | `true` | If enabled, roles will be created to enable accessing certificates from Gateways. This is not needed when using http://gateway-api.org/. | | gateway.rbac.enabled | bool | `true` | If enabled, roles will be created to enable accessing certificates from Gateways. This is not needed when using http://gateway-api.org/. |
| gateway.readinessFailureThreshold | int | `30` | The number of successive failed probes before indicating readiness failure. | | gateway.readinessFailureThreshold | int | `30` | The number of successive failed probes before indicating readiness failure. |
| gateway.readinessInitialDelaySeconds | int | `1` | The initial delay for readiness probes in seconds. | | gateway.readinessInitialDelaySeconds | int | `1` | The initial delay for readiness probes in seconds. |