mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
feat: create podmonitor cr in helm chart (#1157)
Signed-off-by: fengxusong <fengxsong@outlook.com>
This commit is contained in:
@@ -101,3 +101,15 @@ higress: {{ include "controller.name" . }}
|
|||||||
true
|
true
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "gateway.podMonitor.gvk" -}}
|
||||||
|
{{- if eq .Values.gateway.metrics.provider "monitoring.coreos.com" -}}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
{{- else if eq .Values.gateway.metrics.provider "operator.victoriametrics.com" -}}
|
||||||
|
apiVersion: operator.victoriametrics.com/v1beta1
|
||||||
|
kind: VMPodScrape
|
||||||
|
{{- else -}}
|
||||||
|
{{- fail "unexpected gateway.metrics.provider" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|||||||
314
helm/core/templates/_pod.tpl
Normal file
314
helm/core/templates/_pod.tpl
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
|
||||||
|
{{/*
|
||||||
|
Rendering the pod template of gateway component.
|
||||||
|
*/}}
|
||||||
|
{{- define "gateway.podTemplate" -}}
|
||||||
|
{{- $o11y := .Values.global.o11y -}}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.global.enableHigressIstio }}
|
||||||
|
"enableHigressIstio": "true"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.podAnnotations }}
|
||||||
|
{{- toYaml .Values.gateway.podAnnotations | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
sidecar.istio.io/inject: "false"
|
||||||
|
{{- with .Values.gateway.revision }}
|
||||||
|
istio.io/rev: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "gateway.selectorLabels" . | nindent 6 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.gateway.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "gateway.serviceAccountName" . }}
|
||||||
|
{{- if .Values.global.priorityClassName }}
|
||||||
|
priorityClassName: "{{ .Values.global.priorityClassName }}"
|
||||||
|
{{- end }}
|
||||||
|
securityContext:
|
||||||
|
{{- if .Values.gateway.securityContext }}
|
||||||
|
{{- toYaml .Values.gateway.securityContext | nindent 6 }}
|
||||||
|
{{- else if and .Values.gateway.unprivilegedPortSupported (and (not .Values.gateway.hostNetwork) (semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||||
|
# Safe since 1.22: https://github.com/kubernetes/kubernetes/pull/103326
|
||||||
|
sysctls:
|
||||||
|
- name: net.ipv4.ip_unprivileged_port_start
|
||||||
|
value: "0"
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: higress-gateway
|
||||||
|
image: "{{ .Values.gateway.hub | default .Values.global.hub }}/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
||||||
|
args:
|
||||||
|
- proxy
|
||||||
|
- router
|
||||||
|
- --domain
|
||||||
|
- $(POD_NAMESPACE).svc.cluster.local
|
||||||
|
- --proxyLogLevel=warning
|
||||||
|
- --proxyComponentLogLevel=misc:error
|
||||||
|
- --log_output_level=all:info
|
||||||
|
- --serviceCluster=higress-gateway
|
||||||
|
securityContext:
|
||||||
|
{{- if .Values.gateway.containerSecurityContext }}
|
||||||
|
{{- toYaml .Values.gateway.containerSecurityContext | nindent 10 }}
|
||||||
|
{{- else if and .Values.gateway.unprivilegedPortSupported (and (not .Values.gateway.hostNetwork) (semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion)) }}
|
||||||
|
# Safe since 1.22: https://github.com/kubernetes/kubernetes/pull/103326
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
privileged: false
|
||||||
|
# When enabling lite metrics, the configuration template files need to be replaced.
|
||||||
|
{{- if not .Values.global.liteMetrics }}
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
{{- end }}
|
||||||
|
runAsUser: 1337
|
||||||
|
runAsGroup: 1337
|
||||||
|
runAsNonRoot: true
|
||||||
|
{{- else }}
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
add:
|
||||||
|
- NET_BIND_SERVICE
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 1337
|
||||||
|
runAsNonRoot: false
|
||||||
|
allowPrivilegeEscalation: true
|
||||||
|
{{- end }}
|
||||||
|
env:
|
||||||
|
- name: NODE_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: spec.nodeName
|
||||||
|
- name: POD_NAME
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: metadata.name
|
||||||
|
- name: POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: INSTANCE_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: HOST_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: status.hostIP
|
||||||
|
- name: SERVICE_ACCOUNT
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: spec.serviceAccountName
|
||||||
|
- name: PROXY_XDS_VIA_AGENT
|
||||||
|
value: "true"
|
||||||
|
- name: ENABLE_INGRESS_GATEWAY_SDS
|
||||||
|
value: "false"
|
||||||
|
- name: JWT_POLICY
|
||||||
|
value: {{ include "controller.jwtPolicy" . }}
|
||||||
|
- name: ISTIO_META_HTTP10
|
||||||
|
value: "1"
|
||||||
|
- name: ISTIO_META_CLUSTER_ID
|
||||||
|
value: "{{ $.Values.clusterName | default `Kubernetes` }}"
|
||||||
|
- name: INSTANCE_NAME
|
||||||
|
value: "higress-gateway"
|
||||||
|
{{- if .Values.global.liteMetrics }}
|
||||||
|
- name: LITE_METRICS
|
||||||
|
value: "on"
|
||||||
|
{{- end }}
|
||||||
|
{{- if include "skywalking.enabled" . }}
|
||||||
|
- name: ISTIO_BOOTSTRAP_OVERRIDE
|
||||||
|
value: /etc/istio/custom-bootstrap/custom_bootstrap.json
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.gateway.networkGateway }}
|
||||||
|
- name: ISTIO_META_REQUESTED_NETWORK_VIEW
|
||||||
|
value: "{{.}}"
|
||||||
|
{{- end }}
|
||||||
|
{{- range $key, $val := .Values.env }}
|
||||||
|
- name: {{ $key }}
|
||||||
|
value: {{ $val | quote }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 15020
|
||||||
|
protocol: TCP
|
||||||
|
name: istio-prom
|
||||||
|
- containerPort: 15090
|
||||||
|
protocol: TCP
|
||||||
|
name: http-envoy-prom
|
||||||
|
{{- if or .Values.global.local .Values.global.kind }}
|
||||||
|
- containerPort: {{ .Values.gateway.httpPort }}
|
||||||
|
hostPort: {{ .Values.gateway.httpPort }}
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: {{ .Values.gateway.httpsPort }}
|
||||||
|
hostPort: {{ .Values.gateway.httpsPort }}
|
||||||
|
name: https
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: {{ .Values.gateway.readinessFailureThreshold }}
|
||||||
|
httpGet:
|
||||||
|
path: /healthz/ready
|
||||||
|
port: 15021
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: {{ .Values.gateway.readinessInitialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.gateway.readinessPeriodSeconds }}
|
||||||
|
successThreshold: {{ .Values.gateway.readinessSuccessThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.gateway.readinessTimeoutSeconds }}
|
||||||
|
{{- if not (or .Values.global.local .Values.global.kind) }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.gateway.resources | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- if eq (include "controller.jwtPolicy" .) "third-party-jwt" }}
|
||||||
|
- name: istio-token
|
||||||
|
mountPath: /var/run/secrets/tokens
|
||||||
|
readOnly: true
|
||||||
|
{{- end }}
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/istio/config
|
||||||
|
- name: istio-ca-root-cert
|
||||||
|
mountPath: /var/run/secrets/istio
|
||||||
|
- name: istio-data
|
||||||
|
mountPath: /var/lib/istio/data
|
||||||
|
- name: podinfo
|
||||||
|
mountPath: /etc/istio/pod
|
||||||
|
- name: proxy-socket
|
||||||
|
mountPath: /etc/istio/proxy
|
||||||
|
{{- if include "skywalking.enabled" . }}
|
||||||
|
- mountPath: /etc/istio/custom-bootstrap
|
||||||
|
name: custom-bootstrap-volume
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.global.volumeWasmPlugins }}
|
||||||
|
- mountPath: /opt/plugins
|
||||||
|
name: local-wasmplugins-volume
|
||||||
|
{{- end }}
|
||||||
|
{{- if $o11y.enabled }}
|
||||||
|
- mountPath: /var/log/proxy
|
||||||
|
name: log
|
||||||
|
{{- end }}
|
||||||
|
{{- if $o11y.enabled }}
|
||||||
|
{{- $config := $o11y.promtail }}
|
||||||
|
- name: promtail
|
||||||
|
image: {{ $config.image.repository }}:{{ $config.image.tag }}
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
args:
|
||||||
|
- -config.file=/etc/promtail/promtail.yaml
|
||||||
|
env:
|
||||||
|
- name: 'HOSTNAME'
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: 'spec.nodeName'
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ $config.port }}
|
||||||
|
name: http-metrics
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 3
|
||||||
|
httpGet:
|
||||||
|
path: /ready
|
||||||
|
port: {{ $config.port }}
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 1
|
||||||
|
volumeMounts:
|
||||||
|
- name: promtail-config
|
||||||
|
mountPath: "/etc/promtail"
|
||||||
|
- name: log
|
||||||
|
mountPath: /var/log/proxy
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.hostNetwork }}
|
||||||
|
hostNetwork: {{ .Values.gateway.hostNetwork }}
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.gateway.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.gateway.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.gateway.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
{{- if eq (include "controller.jwtPolicy" .) "third-party-jwt" }}
|
||||||
|
- name: istio-token
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- serviceAccountToken:
|
||||||
|
audience: istio-ca
|
||||||
|
expirationSeconds: 43200
|
||||||
|
path: istio-token
|
||||||
|
{{- end }}
|
||||||
|
- name: istio-ca-root-cert
|
||||||
|
configMap:
|
||||||
|
{{- if .Values.global.enableHigressIstio }}
|
||||||
|
name: istio-ca-root-cert
|
||||||
|
{{- else }}
|
||||||
|
name: higress-ca-root-cert
|
||||||
|
{{- end }}
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: higress-config
|
||||||
|
{{- if include "skywalking.enabled" . }}
|
||||||
|
- configMap:
|
||||||
|
defaultMode: 420
|
||||||
|
name: higress-custom-bootstrap
|
||||||
|
name: custom-bootstrap-volume
|
||||||
|
{{- end }}
|
||||||
|
- name: istio-data
|
||||||
|
emptyDir: {}
|
||||||
|
- name: proxy-socket
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if $o11y.enabled }}
|
||||||
|
- name: log
|
||||||
|
emptyDir: {}
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
- name: promtail-config
|
||||||
|
configMap:
|
||||||
|
name: higress-promtail
|
||||||
|
{{- end }}
|
||||||
|
- name: podinfo
|
||||||
|
downwardAPI:
|
||||||
|
defaultMode: 420
|
||||||
|
items:
|
||||||
|
- fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: metadata.labels
|
||||||
|
path: labels
|
||||||
|
- fieldRef:
|
||||||
|
apiVersion: v1
|
||||||
|
fieldPath: metadata.annotations
|
||||||
|
path: annotations
|
||||||
|
- path: cpu-request
|
||||||
|
resourceFieldRef:
|
||||||
|
containerName: higress-gateway
|
||||||
|
divisor: 1m
|
||||||
|
resource: requests.cpu
|
||||||
|
- path: cpu-limit
|
||||||
|
resourceFieldRef:
|
||||||
|
containerName: higress-gateway
|
||||||
|
divisor: 1m
|
||||||
|
resource: limits.cpu
|
||||||
|
{{- if .Values.global.volumeWasmPlugins }}
|
||||||
|
- name: local-wasmplugins-volume
|
||||||
|
hostPath:
|
||||||
|
path: /opt/plugins
|
||||||
|
type: Directory
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
@@ -6,10 +6,12 @@
|
|||||||
{{- if $kernelVersion }}
|
{{- if $kernelVersion }}
|
||||||
{{- $kernelVersion = regexFind "^(\\d+\\.\\d+\\.\\d+)" $kernelVersion }}
|
{{- $kernelVersion = regexFind "^(\\d+\\.\\d+\\.\\d+)" $kernelVersion }}
|
||||||
{{- if and $kernelVersion (semverCompare "<4.11.0" $kernelVersion) }}
|
{{- if and $kernelVersion (semverCompare "<4.11.0" $kernelVersion) }}
|
||||||
{{- $unprivilegedPortSupported = false }}
|
{{- $unprivilegedPortSupported = false }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- $_ := set .Values.gateway "unprivilegedPortSupported" $unprivilegedPortSupported -}}
|
||||||
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
@@ -23,310 +25,5 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "gateway.selectorLabels" . | nindent 6 }}
|
{{- include "gateway.selectorLabels" . | nindent 6 }}
|
||||||
template:
|
{{- include "gateway.podTemplate" $ | nindent 2 -}}
|
||||||
metadata:
|
|
||||||
annotations:
|
|
||||||
{{- if .Values.global.enableHigressIstio }}
|
|
||||||
"enableHigressIstio": "true"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.gateway.podAnnotations }}
|
|
||||||
{{- toYaml .Values.gateway.podAnnotations | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
labels:
|
|
||||||
sidecar.istio.io/inject: "false"
|
|
||||||
{{- with .Values.gateway.revision }}
|
|
||||||
istio.io/rev: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- include "gateway.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
{{- with .Values.gateway.imagePullSecrets }}
|
|
||||||
imagePullSecrets:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
serviceAccountName: {{ include "gateway.serviceAccountName" . }}
|
|
||||||
{{- if .Values.global.priorityClassName }}
|
|
||||||
priorityClassName: "{{ .Values.global.priorityClassName }}"
|
|
||||||
{{- end }}
|
|
||||||
securityContext:
|
|
||||||
{{- if .Values.gateway.securityContext }}
|
|
||||||
{{- toYaml .Values.gateway.securityContext | nindent 8 }}
|
|
||||||
{{- else if and $unprivilegedPortSupported (and (not .Values.gateway.hostNetwork) (semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion)) }}
|
|
||||||
# Safe since 1.22: https://github.com/kubernetes/kubernetes/pull/103326
|
|
||||||
sysctls:
|
|
||||||
- name: net.ipv4.ip_unprivileged_port_start
|
|
||||||
value: "0"
|
|
||||||
{{- end }}
|
|
||||||
containers:
|
|
||||||
{{- if $o11y.enabled }}
|
|
||||||
{{- $config := $o11y.promtail }}
|
|
||||||
- name: promtail
|
|
||||||
image: {{ $config.image.repository }}:{{ $config.image.tag }}
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
args:
|
|
||||||
- -config.file=/etc/promtail/promtail.yaml
|
|
||||||
env:
|
|
||||||
- name: 'HOSTNAME'
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: 'spec.nodeName'
|
|
||||||
ports:
|
|
||||||
- containerPort: {{ $config.port }}
|
|
||||||
name: http-metrics
|
|
||||||
protocol: TCP
|
|
||||||
readinessProbe:
|
|
||||||
failureThreshold: 3
|
|
||||||
httpGet:
|
|
||||||
path: /ready
|
|
||||||
port: {{ $config.port }}
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
volumeMounts:
|
|
||||||
- name: promtail-config
|
|
||||||
mountPath: "/etc/promtail"
|
|
||||||
- name: log
|
|
||||||
mountPath: /var/log/proxy
|
|
||||||
- name: tmp
|
|
||||||
mountPath: /tmp
|
|
||||||
{{- end }}
|
|
||||||
- name: higress-gateway
|
|
||||||
image: "{{ .Values.gateway.hub | default .Values.global.hub }}/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
|
||||||
args:
|
|
||||||
- proxy
|
|
||||||
- router
|
|
||||||
- --domain
|
|
||||||
- $(POD_NAMESPACE).svc.cluster.local
|
|
||||||
- --proxyLogLevel=warning
|
|
||||||
- --proxyComponentLogLevel=misc:error
|
|
||||||
- --log_output_level=all:info
|
|
||||||
- --serviceCluster=higress-gateway
|
|
||||||
securityContext:
|
|
||||||
{{- if .Values.gateway.containerSecurityContext }}
|
|
||||||
{{- toYaml .Values.gateway.containerSecurityContext | nindent 12 }}
|
|
||||||
{{- else if and $unprivilegedPortSupported (and (not .Values.gateway.hostNetwork) (semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion)) }}
|
|
||||||
# Safe since 1.22: https://github.com/kubernetes/kubernetes/pull/103326
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
privileged: false
|
|
||||||
# When enabling lite metrics, the configuration template files need to be replaced.
|
|
||||||
{{- if not .Values.global.liteMetrics }}
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
{{- end }}
|
|
||||||
runAsUser: 1337
|
|
||||||
runAsGroup: 1337
|
|
||||||
runAsNonRoot: true
|
|
||||||
{{- else }}
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
add:
|
|
||||||
- NET_BIND_SERVICE
|
|
||||||
runAsUser: 0
|
|
||||||
runAsGroup: 1337
|
|
||||||
runAsNonRoot: false
|
|
||||||
allowPrivilegeEscalation: true
|
|
||||||
{{- end }}
|
|
||||||
env:
|
|
||||||
- name: NODE_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: spec.nodeName
|
|
||||||
- name: POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.namespace
|
|
||||||
- name: INSTANCE_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: status.podIP
|
|
||||||
- name: HOST_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: status.hostIP
|
|
||||||
- name: SERVICE_ACCOUNT
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: spec.serviceAccountName
|
|
||||||
- name: PILOT_XDS_SEND_TIMEOUT
|
|
||||||
value: 60s
|
|
||||||
- name: PROXY_XDS_VIA_AGENT
|
|
||||||
value: "true"
|
|
||||||
- name: ENABLE_INGRESS_GATEWAY_SDS
|
|
||||||
value: "false"
|
|
||||||
- name: JWT_POLICY
|
|
||||||
value: {{ include "controller.jwtPolicy" . }}
|
|
||||||
- name: ISTIO_META_HTTP10
|
|
||||||
value: "1"
|
|
||||||
- name: ISTIO_META_CLUSTER_ID
|
|
||||||
value: "{{ $.Values.clusterName | default `Kubernetes` }}"
|
|
||||||
- name: INSTANCE_NAME
|
|
||||||
value: "higress-gateway"
|
|
||||||
{{- if .Values.global.liteMetrics }}
|
|
||||||
- name: LITE_METRICS
|
|
||||||
value: "on"
|
|
||||||
{{- end }}
|
|
||||||
{{- if include "skywalking.enabled" . }}
|
|
||||||
- name: ISTIO_BOOTSTRAP_OVERRIDE
|
|
||||||
value: /etc/istio/custom-bootstrap/custom_bootstrap.json
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.networkGateway }}
|
|
||||||
- name: ISTIO_META_REQUESTED_NETWORK_VIEW
|
|
||||||
value: "{{.}}"
|
|
||||||
{{- end }}
|
|
||||||
{{- range $key, $val := .Values.env }}
|
|
||||||
- name: {{ $key }}
|
|
||||||
value: {{ $val | quote }}
|
|
||||||
{{- end }}
|
|
||||||
ports:
|
|
||||||
- containerPort: 15090
|
|
||||||
protocol: TCP
|
|
||||||
name: http-envoy-prom
|
|
||||||
{{- if or .Values.global.local .Values.global.kind }}
|
|
||||||
- containerPort: {{ .Values.gateway.httpPort }}
|
|
||||||
hostPort: {{ .Values.gateway.httpPort }}
|
|
||||||
name: http
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: {{ .Values.gateway.httpsPort }}
|
|
||||||
hostPort: {{ .Values.gateway.httpsPort }}
|
|
||||||
name: https
|
|
||||||
protocol: TCP
|
|
||||||
{{- end }}
|
|
||||||
readinessProbe:
|
|
||||||
failureThreshold: {{ .Values.gateway.readinessFailureThreshold }}
|
|
||||||
httpGet:
|
|
||||||
path: /healthz/ready
|
|
||||||
port: 15021
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: {{ .Values.gateway.readinessInitialDelaySeconds }}
|
|
||||||
periodSeconds: {{ .Values.gateway.readinessPeriodSeconds }}
|
|
||||||
successThreshold: {{ .Values.gateway.readinessSuccessThreshold }}
|
|
||||||
timeoutSeconds: {{ .Values.gateway.readinessTimeoutSeconds }}
|
|
||||||
{{- if not (or .Values.global.local .Values.global.kind) }}
|
|
||||||
resources:
|
|
||||||
{{- toYaml .Values.gateway.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
volumeMounts:
|
|
||||||
{{- if eq (include "controller.jwtPolicy" .) "third-party-jwt" }}
|
|
||||||
- name: istio-token
|
|
||||||
mountPath: /var/run/secrets/tokens
|
|
||||||
readOnly: true
|
|
||||||
{{- end }}
|
|
||||||
- name: config
|
|
||||||
mountPath: /etc/istio/config
|
|
||||||
- name: istio-ca-root-cert
|
|
||||||
mountPath: /var/run/secrets/istio
|
|
||||||
- name: istio-data
|
|
||||||
mountPath: /var/lib/istio/data
|
|
||||||
- name: podinfo
|
|
||||||
mountPath: /etc/istio/pod
|
|
||||||
- name: proxy-socket
|
|
||||||
mountPath: /etc/istio/proxy
|
|
||||||
{{- if include "skywalking.enabled" . }}
|
|
||||||
- mountPath: /etc/istio/custom-bootstrap
|
|
||||||
name: custom-bootstrap-volume
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.global.volumeWasmPlugins }}
|
|
||||||
- mountPath: /opt/plugins
|
|
||||||
name: local-wasmplugins-volume
|
|
||||||
{{- end }}
|
|
||||||
{{- if $o11y.enabled }}
|
|
||||||
- mountPath: /var/log/proxy
|
|
||||||
name: log
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.gateway.hostNetwork }}
|
|
||||||
hostNetwork: {{ .Values.gateway.hostNetwork }}
|
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.nodeSelector }}
|
|
||||||
nodeSelector:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.affinity }}
|
|
||||||
affinity:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.tolerations }}
|
|
||||||
tolerations:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
volumes:
|
|
||||||
{{- if eq (include "controller.jwtPolicy" .) "third-party-jwt" }}
|
|
||||||
- name: istio-token
|
|
||||||
projected:
|
|
||||||
sources:
|
|
||||||
- serviceAccountToken:
|
|
||||||
audience: istio-ca
|
|
||||||
expirationSeconds: 43200
|
|
||||||
path: istio-token
|
|
||||||
{{- end }}
|
|
||||||
- name: istio-ca-root-cert
|
|
||||||
configMap:
|
|
||||||
{{- if .Values.global.enableHigressIstio }}
|
|
||||||
name: istio-ca-root-cert
|
|
||||||
{{- else }}
|
|
||||||
name: higress-ca-root-cert
|
|
||||||
{{- end }}
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: higress-config
|
|
||||||
{{- if include "skywalking.enabled" . }}
|
|
||||||
- configMap:
|
|
||||||
defaultMode: 420
|
|
||||||
name: higress-custom-bootstrap
|
|
||||||
name: custom-bootstrap-volume
|
|
||||||
{{- end }}
|
|
||||||
- name: istio-data
|
|
||||||
emptyDir: {}
|
|
||||||
- name: proxy-socket
|
|
||||||
emptyDir: {}
|
|
||||||
{{- if $o11y.enabled }}
|
|
||||||
- name: log
|
|
||||||
emptyDir: {}
|
|
||||||
- name: tmp
|
|
||||||
emptyDir: {}
|
|
||||||
- name: promtail-config
|
|
||||||
configMap:
|
|
||||||
name: higress-promtail
|
|
||||||
{{- end }}
|
|
||||||
- name: podinfo
|
|
||||||
downwardAPI:
|
|
||||||
defaultMode: 420
|
|
||||||
items:
|
|
||||||
- fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.labels
|
|
||||||
path: labels
|
|
||||||
- fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.annotations
|
|
||||||
path: annotations
|
|
||||||
- path: cpu-request
|
|
||||||
resourceFieldRef:
|
|
||||||
containerName: higress-gateway
|
|
||||||
divisor: 1m
|
|
||||||
resource: requests.cpu
|
|
||||||
- path: cpu-limit
|
|
||||||
resourceFieldRef:
|
|
||||||
containerName: higress-gateway
|
|
||||||
divisor: 1m
|
|
||||||
resource: limits.cpu
|
|
||||||
{{- if .Values.global.volumeWasmPlugins }}
|
|
||||||
- name: local-wasmplugins-volume
|
|
||||||
hostPath:
|
|
||||||
path: /opt/plugins
|
|
||||||
type: Directory
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
{{- if eq .Values.gateway.kind "Deployment" -}}
|
{{- if eq .Values.gateway.kind "Deployment" -}}
|
||||||
{{- $o11y := .Values.global.o11y }}
|
|
||||||
{{- $unprivilegedPortSupported := true }}
|
{{- $unprivilegedPortSupported := true }}
|
||||||
{{- range $index, $node := (lookup "v1" "Node" "default" "").items }}
|
{{- range $index, $node := (lookup "v1" "Node" "default" "").items }}
|
||||||
{{- $kernelVersion := $node.status.nodeInfo.kernelVersion }}
|
{{- $kernelVersion := $node.status.nodeInfo.kernelVersion }}
|
||||||
{{- if $kernelVersion }}
|
{{- if $kernelVersion }}
|
||||||
{{- $kernelVersion = regexFind "^(\\d+\\.\\d+\\.\\d+)" $kernelVersion }}
|
{{- $kernelVersion = regexFind "^(\\d+\\.\\d+\\.\\d+)" $kernelVersion }}
|
||||||
{{- if and $kernelVersion (semverCompare "<4.11.0" $kernelVersion) }}
|
{{- if and $kernelVersion (semverCompare "<4.11.0" $kernelVersion) }}
|
||||||
{{- $unprivilegedPortSupported = false }}
|
{{- $unprivilegedPortSupported = false }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
{{- $_ := set .Values.gateway "unprivilegedPortSupported" $unprivilegedPortSupported -}}
|
||||||
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@@ -38,311 +39,7 @@ spec:
|
|||||||
{{- else }}
|
{{- else }}
|
||||||
maxUnavailable: {{ .Values.gateway.rollingMaxUnavailable }}
|
maxUnavailable: {{ .Values.gateway.rollingMaxUnavailable }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
template:
|
|
||||||
metadata:
|
{{- include "gateway.podTemplate" $ | nindent 2 -}}
|
||||||
annotations:
|
|
||||||
{{- if .Values.global.enableHigressIstio }}
|
|
||||||
"enableHigressIstio": "true"
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.gateway.podAnnotations }}
|
|
||||||
{{- toYaml .Values.gateway.podAnnotations | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
labels:
|
|
||||||
sidecar.istio.io/inject: "false"
|
|
||||||
{{- with .Values.gateway.revision }}
|
|
||||||
istio.io/rev: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- include "gateway.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
{{- with .Values.gateway.imagePullSecrets }}
|
|
||||||
imagePullSecrets:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
serviceAccountName: {{ include "gateway.serviceAccountName" . }}
|
|
||||||
{{- if .Values.global.priorityClassName }}
|
|
||||||
priorityClassName: "{{ .Values.global.priorityClassName }}"
|
|
||||||
{{- end }}
|
|
||||||
securityContext:
|
|
||||||
{{- if .Values.gateway.securityContext }}
|
|
||||||
{{- toYaml .Values.gateway.securityContext | nindent 8 }}
|
|
||||||
{{- else if and $unprivilegedPortSupported (and (not .Values.gateway.hostNetwork) (semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion)) }}
|
|
||||||
# Safe since 1.22: https://github.com/kubernetes/kubernetes/pull/103326
|
|
||||||
sysctls:
|
|
||||||
- name: net.ipv4.ip_unprivileged_port_start
|
|
||||||
value: "0"
|
|
||||||
{{- end }}
|
|
||||||
containers:
|
|
||||||
{{- if $o11y.enabled }}
|
|
||||||
{{- $config := $o11y.promtail }}
|
|
||||||
- name: promtail
|
|
||||||
image: {{ $config.image.repository }}:{{ $config.image.tag }}
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
args:
|
|
||||||
- -config.file=/etc/promtail/promtail.yaml
|
|
||||||
env:
|
|
||||||
- name: 'HOSTNAME'
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: 'spec.nodeName'
|
|
||||||
ports:
|
|
||||||
- containerPort: {{ $config.port }}
|
|
||||||
name: http-metrics
|
|
||||||
protocol: TCP
|
|
||||||
readinessProbe:
|
|
||||||
failureThreshold: 3
|
|
||||||
httpGet:
|
|
||||||
path: /ready
|
|
||||||
port: {{ $config.port }}
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
timeoutSeconds: 1
|
|
||||||
volumeMounts:
|
|
||||||
- name: promtail-config
|
|
||||||
mountPath: "/etc/promtail"
|
|
||||||
- name: log
|
|
||||||
mountPath: /var/log/proxy
|
|
||||||
- name: tmp
|
|
||||||
mountPath: /tmp
|
|
||||||
{{- end }}
|
|
||||||
- name: higress-gateway
|
|
||||||
image: "{{ .Values.gateway.hub | default .Values.global.hub }}/{{ .Values.gateway.image | default "gateway" }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
|
||||||
args:
|
|
||||||
- proxy
|
|
||||||
- router
|
|
||||||
- --domain
|
|
||||||
- $(POD_NAMESPACE).svc.cluster.local
|
|
||||||
- --proxyLogLevel=warning
|
|
||||||
- --proxyComponentLogLevel=misc:error
|
|
||||||
- --log_output_level=all:info
|
|
||||||
- --serviceCluster=higress-gateway
|
|
||||||
securityContext:
|
|
||||||
{{- if .Values.gateway.containerSecurityContext }}
|
|
||||||
{{- toYaml .Values.gateway.containerSecurityContext | nindent 12 }}
|
|
||||||
{{- else if and $unprivilegedPortSupported (and (not .Values.gateway.hostNetwork) (semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion)) }}
|
|
||||||
# Safe since 1.22: https://github.com/kubernetes/kubernetes/pull/103326
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
privileged: false
|
|
||||||
# When enabling lite metrics, the configuration template files need to be replaced.
|
|
||||||
{{- if not .Values.global.liteMetrics }}
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
{{- end }}
|
|
||||||
runAsUser: 1337
|
|
||||||
runAsGroup: 1337
|
|
||||||
runAsNonRoot: true
|
|
||||||
{{- else }}
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
add:
|
|
||||||
- NET_BIND_SERVICE
|
|
||||||
runAsUser: 0
|
|
||||||
runAsGroup: 1337
|
|
||||||
runAsNonRoot: false
|
|
||||||
allowPrivilegeEscalation: true
|
|
||||||
{{- end }}
|
|
||||||
env:
|
|
||||||
- name: NODE_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: spec.nodeName
|
|
||||||
- name: POD_NAME
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.name
|
|
||||||
- name: POD_NAMESPACE
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.namespace
|
|
||||||
- name: INSTANCE_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: status.podIP
|
|
||||||
- name: HOST_IP
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: status.hostIP
|
|
||||||
- name: SERVICE_ACCOUNT
|
|
||||||
valueFrom:
|
|
||||||
fieldRef:
|
|
||||||
fieldPath: spec.serviceAccountName
|
|
||||||
- name: PROXY_XDS_VIA_AGENT
|
|
||||||
value: "true"
|
|
||||||
- name: ENABLE_INGRESS_GATEWAY_SDS
|
|
||||||
value: "false"
|
|
||||||
- name: JWT_POLICY
|
|
||||||
value: {{ include "controller.jwtPolicy" . }}
|
|
||||||
- name: ISTIO_META_HTTP10
|
|
||||||
value: "1"
|
|
||||||
- name: ISTIO_META_CLUSTER_ID
|
|
||||||
value: "{{ $.Values.clusterName | default `Kubernetes` }}"
|
|
||||||
- name: INSTANCE_NAME
|
|
||||||
value: "higress-gateway"
|
|
||||||
{{- if .Values.global.liteMetrics }}
|
|
||||||
- name: LITE_METRICS
|
|
||||||
value: "on"
|
|
||||||
{{- end }}
|
|
||||||
{{- if include "skywalking.enabled" . }}
|
|
||||||
- name: ISTIO_BOOTSTRAP_OVERRIDE
|
|
||||||
value: /etc/istio/custom-bootstrap/custom_bootstrap.json
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.networkGateway }}
|
|
||||||
- name: ISTIO_META_REQUESTED_NETWORK_VIEW
|
|
||||||
value: "{{.}}"
|
|
||||||
{{- end }}
|
|
||||||
{{- range $key, $val := .Values.env }}
|
|
||||||
- name: {{ $key }}
|
|
||||||
value: {{ $val | quote }}
|
|
||||||
{{- end }}
|
|
||||||
ports:
|
|
||||||
- containerPort: 15020
|
|
||||||
protocol: TCP
|
|
||||||
name: istio-prom
|
|
||||||
- containerPort: 15090
|
|
||||||
protocol: TCP
|
|
||||||
name: http-envoy-prom
|
|
||||||
{{- if or .Values.global.local .Values.global.kind }}
|
|
||||||
- containerPort: {{ .Values.gateway.httpPort }}
|
|
||||||
hostPort: {{ .Values.gateway.httpPort }}
|
|
||||||
name: http
|
|
||||||
protocol: TCP
|
|
||||||
- containerPort: {{ .Values.gateway.httpsPort }}
|
|
||||||
hostPort: {{ .Values.gateway.httpsPort }}
|
|
||||||
name: https
|
|
||||||
protocol: TCP
|
|
||||||
{{- end }}
|
|
||||||
readinessProbe:
|
|
||||||
failureThreshold: {{ .Values.gateway.readinessFailureThreshold }}
|
|
||||||
httpGet:
|
|
||||||
path: /healthz/ready
|
|
||||||
port: 15021
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: {{ .Values.gateway.readinessInitialDelaySeconds }}
|
|
||||||
periodSeconds: {{ .Values.gateway.readinessPeriodSeconds }}
|
|
||||||
successThreshold: {{ .Values.gateway.readinessSuccessThreshold }}
|
|
||||||
timeoutSeconds: {{ .Values.gateway.readinessTimeoutSeconds }}
|
|
||||||
{{- if not (or .Values.global.local .Values.global.kind) }}
|
|
||||||
resources:
|
|
||||||
{{- toYaml .Values.gateway.resources | nindent 12 }}
|
|
||||||
{{- end }}
|
|
||||||
volumeMounts:
|
|
||||||
{{- if eq (include "controller.jwtPolicy" .) "third-party-jwt" }}
|
|
||||||
- name: istio-token
|
|
||||||
mountPath: /var/run/secrets/tokens
|
|
||||||
readOnly: true
|
|
||||||
{{- end }}
|
|
||||||
- name: config
|
|
||||||
mountPath: /etc/istio/config
|
|
||||||
- name: istio-ca-root-cert
|
|
||||||
mountPath: /var/run/secrets/istio
|
|
||||||
- name: istio-data
|
|
||||||
mountPath: /var/lib/istio/data
|
|
||||||
- name: podinfo
|
|
||||||
mountPath: /etc/istio/pod
|
|
||||||
- name: proxy-socket
|
|
||||||
mountPath: /etc/istio/proxy
|
|
||||||
{{- if include "skywalking.enabled" . }}
|
|
||||||
- mountPath: /etc/istio/custom-bootstrap
|
|
||||||
name: custom-bootstrap-volume
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.global.volumeWasmPlugins }}
|
|
||||||
- mountPath: /opt/plugins
|
|
||||||
name: local-wasmplugins-volume
|
|
||||||
{{- end }}
|
|
||||||
{{- if $o11y.enabled }}
|
|
||||||
- mountPath: /var/log/proxy
|
|
||||||
name: log
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.gateway.hostNetwork }}
|
|
||||||
hostNetwork: {{ .Values.gateway.hostNetwork }}
|
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.nodeSelector }}
|
|
||||||
nodeSelector:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.affinity }}
|
|
||||||
affinity:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.gateway.tolerations }}
|
|
||||||
tolerations:
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
volumes:
|
|
||||||
{{- if eq (include "controller.jwtPolicy" .) "third-party-jwt" }}
|
|
||||||
- name: istio-token
|
|
||||||
projected:
|
|
||||||
sources:
|
|
||||||
- serviceAccountToken:
|
|
||||||
audience: istio-ca
|
|
||||||
expirationSeconds: 43200
|
|
||||||
path: istio-token
|
|
||||||
{{- end }}
|
|
||||||
- name: istio-ca-root-cert
|
|
||||||
configMap:
|
|
||||||
{{- if .Values.global.enableHigressIstio }}
|
|
||||||
name: istio-ca-root-cert
|
|
||||||
{{- else }}
|
|
||||||
name: higress-ca-root-cert
|
|
||||||
{{- end }}
|
|
||||||
- name: config
|
|
||||||
configMap:
|
|
||||||
name: higress-config
|
|
||||||
{{- if include "skywalking.enabled" . }}
|
|
||||||
- configMap:
|
|
||||||
defaultMode: 420
|
|
||||||
name: higress-custom-bootstrap
|
|
||||||
name: custom-bootstrap-volume
|
|
||||||
{{- end }}
|
|
||||||
- name: istio-data
|
|
||||||
emptyDir: {}
|
|
||||||
- name: proxy-socket
|
|
||||||
emptyDir: {}
|
|
||||||
{{- if $o11y.enabled }}
|
|
||||||
- name: log
|
|
||||||
emptyDir: {}
|
|
||||||
- name: tmp
|
|
||||||
emptyDir: {}
|
|
||||||
- name: promtail-config
|
|
||||||
configMap:
|
|
||||||
name: higress-promtail
|
|
||||||
{{- end }}
|
|
||||||
- name: podinfo
|
|
||||||
downwardAPI:
|
|
||||||
defaultMode: 420
|
|
||||||
items:
|
|
||||||
- fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.labels
|
|
||||||
path: labels
|
|
||||||
- fieldRef:
|
|
||||||
apiVersion: v1
|
|
||||||
fieldPath: metadata.annotations
|
|
||||||
path: annotations
|
|
||||||
- path: cpu-request
|
|
||||||
resourceFieldRef:
|
|
||||||
containerName: higress-gateway
|
|
||||||
divisor: 1m
|
|
||||||
resource: requests.cpu
|
|
||||||
- path: cpu-limit
|
|
||||||
resourceFieldRef:
|
|
||||||
containerName: higress-gateway
|
|
||||||
divisor: 1m
|
|
||||||
resource: limits.cpu
|
|
||||||
{{- if .Values.global.volumeWasmPlugins }}
|
|
||||||
- name: local-wasmplugins-volume
|
|
||||||
hostPath:
|
|
||||||
path: /opt/plugins
|
|
||||||
type: Directory
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
45
helm/core/templates/podmonitor.yaml
Normal file
45
helm/core/templates/podmonitor.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{{- if .Values.gateway.metrics.enabled }}
|
||||||
|
{{- include "gateway.podMonitor.gvk" . }}
|
||||||
|
metadata:
|
||||||
|
name: {{ printf "%s-metrics" (include "gateway.name" .) | trunc 63 | trimSuffix "-" }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "gateway.labels" . | nindent 4}}
|
||||||
|
annotations:
|
||||||
|
{{- .Values.gateway.annotations | toYaml | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
jobLabel: "app.kubernetes.io/name"
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "gateway.selectorLabels" . | nindent 6 }}
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- {{ .Release.Namespace }}
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: istio-prom
|
||||||
|
path: /stats/prometheus
|
||||||
|
{{- if .Values.gateway.metrics.interval }}
|
||||||
|
interval: {{ .Values.gateway.metrics.interval }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.metrics.scrapeTimeout }}
|
||||||
|
scrapeTimeout: {{ .Values.gateway.metrics.scrapeTimeout }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.metrics.honorLabels }}
|
||||||
|
honorLabels: {{ .Values.gateway.metrics.honorLabels }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.metrics.metricRelabelings }}
|
||||||
|
metricRelabelings: {{ toYaml .Values.gateway.metrics.metricRelabelings | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.metrics.relabelings }}
|
||||||
|
relabelings: {{ toYaml .Values.gateway.metrics.relabelings | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.metrics.metricRelabelConfigs }}
|
||||||
|
metricRelabelings: {{ toYaml .Values.gateway.metrics.metricRelabelConfigs | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.gateway.metrics.relabelConfigs }}
|
||||||
|
relabelings: {{ toYaml .Values.gateway.metrics.relabelConfigs | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $.Values.gateway.metrics.rawSpec }}
|
||||||
|
{{- $.Values.gateway.metrics.rawSpec | toYaml | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -136,7 +136,6 @@ global:
|
|||||||
excludeInboundPorts: ""
|
excludeInboundPorts: ""
|
||||||
includeInboundPorts: "*"
|
includeInboundPorts: "*"
|
||||||
|
|
||||||
|
|
||||||
# istio egress capture allowlist
|
# istio egress capture allowlist
|
||||||
# https://istio.io/docs/tasks/traffic-management/egress.html#calling-external-services-directly
|
# https://istio.io/docs/tasks/traffic-management/egress.html#calling-external-services-directly
|
||||||
# example: includeIPRanges: "172.30.0.0/16,172.20.0.0/16"
|
# example: includeIPRanges: "172.30.0.0/16,172.20.0.0/16"
|
||||||
@@ -322,8 +321,8 @@ global:
|
|||||||
# Host:Port for submitting traces to the Datadog agent.
|
# Host:Port for submitting traces to the Datadog agent.
|
||||||
address: "$(HOST_IP):8126"
|
address: "$(HOST_IP):8126"
|
||||||
lightstep:
|
lightstep:
|
||||||
address: "" # example: lightstep-satellite:443
|
address: "" # example: lightstep-satellite:443
|
||||||
accessToken: "" # example: abcdefg1234567
|
accessToken: "" # example: abcdefg1234567
|
||||||
stackdriver:
|
stackdriver:
|
||||||
# enables trace output to stdout.
|
# enables trace output to stdout.
|
||||||
debug: false
|
debug: false
|
||||||
@@ -460,14 +459,14 @@ gateway:
|
|||||||
# Type of service. Set to "None" to disable the service entirely
|
# Type of service. Set to "None" to disable the service entirely
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
ports:
|
ports:
|
||||||
- name: http2
|
- name: http2
|
||||||
port: 80
|
port: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
- name: https
|
- name: https
|
||||||
port: 443
|
port: 443
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 443
|
targetPort: 443
|
||||||
annotations: {}
|
annotations: {}
|
||||||
loadBalancerIP: ""
|
loadBalancerIP: ""
|
||||||
loadBalancerClass: ""
|
loadBalancerClass: ""
|
||||||
@@ -500,6 +499,23 @@ gateway:
|
|||||||
# If specified, the gateway will act as a network gateway for the given network.
|
# If specified, the gateway will act as a network gateway for the given network.
|
||||||
networkGateway: ""
|
networkGateway: ""
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
# If true, create PodMonitor or VMPodScrape for gateway
|
||||||
|
enabled: false
|
||||||
|
# provider group name for CustomResourceDefinition, can be monitoring.coreos.com or operator.victoriametrics.com
|
||||||
|
provider: monitoring.coreos.com
|
||||||
|
interval: ""
|
||||||
|
scrapeTimeout: ""
|
||||||
|
honorLabels: false
|
||||||
|
# for monitoring.coreos.com/v1.PodMonitor
|
||||||
|
metricRelabelings: []
|
||||||
|
relabelings: []
|
||||||
|
# for operator.victoriametrics.com/v1beta1.VMPodScrape
|
||||||
|
metricRelabelConfigs: []
|
||||||
|
relabelConfigs: []
|
||||||
|
# some more raw podMetricsEndpoints spec
|
||||||
|
rawSpec: {}
|
||||||
|
|
||||||
controller:
|
controller:
|
||||||
name: "higress-controller"
|
name: "higress-controller"
|
||||||
replicas: 1
|
replicas: 1
|
||||||
@@ -511,15 +527,13 @@ controller:
|
|||||||
|
|
||||||
labels: {}
|
labels: {}
|
||||||
|
|
||||||
probe: {
|
probe:
|
||||||
httpGet: {
|
{
|
||||||
path: /ready,
|
httpGet: { path: /ready, port: 8888 },
|
||||||
port: 8888,
|
initialDelaySeconds: 1,
|
||||||
},
|
periodSeconds: 3,
|
||||||
initialDelaySeconds: 1,
|
timeoutSeconds: 5,
|
||||||
periodSeconds: 3,
|
}
|
||||||
timeoutSeconds: 5
|
|
||||||
}
|
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
|
||||||
@@ -537,34 +551,27 @@ controller:
|
|||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
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",
|
||||||
},
|
"port": 8889,
|
||||||
{
|
"targetPort": 8889,
|
||||||
"name": "http-solver",
|
},
|
||||||
"protocol": "TCP",
|
{ "name": "grpc", "protocol": "TCP", "port": 15051, "targetPort": 15051 },
|
||||||
"port": 8889,
|
]
|
||||||
"targetPort": 8889,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "grpc",
|
|
||||||
"protocol": "TCP",
|
|
||||||
"port": 15051,
|
|
||||||
"targetPort": 15051,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|
||||||
securityContext: {}
|
securityContext:
|
||||||
|
{}
|
||||||
# capabilities:
|
# capabilities:
|
||||||
# drop:
|
# drop:
|
||||||
# - ALL
|
# - ALL
|
||||||
@@ -656,7 +663,6 @@ pilot:
|
|||||||
# Additional labels to apply to the deployment.
|
# Additional labels to apply to the deployment.
|
||||||
deploymentLabels: {}
|
deploymentLabels: {}
|
||||||
|
|
||||||
|
|
||||||
## Mesh config settings
|
## Mesh config settings
|
||||||
|
|
||||||
# Install the mesh config map, generated from values.yaml.
|
# Install the mesh config map, generated from values.yaml.
|
||||||
@@ -666,16 +672,15 @@ pilot:
|
|||||||
# Additional labels to apply on the pod level for monitoring and logging configuration.
|
# Additional labels to apply on the pod level for monitoring and logging configuration.
|
||||||
podLabels: {}
|
podLabels: {}
|
||||||
|
|
||||||
|
|
||||||
# Tracing config settings
|
# Tracing config settings
|
||||||
tracing:
|
tracing:
|
||||||
enable: false
|
enable: false
|
||||||
sampling: 100
|
sampling: 100
|
||||||
timeout: 500
|
timeout: 500
|
||||||
skywalking:
|
skywalking:
|
||||||
# access_token: ""
|
# access_token: ""
|
||||||
service: ""
|
service: ""
|
||||||
port: 11800
|
port: 11800
|
||||||
# zipkin:
|
# zipkin:
|
||||||
# service: ""
|
# service: ""
|
||||||
# port: 9411
|
# port: 9411
|
||||||
|
|||||||
Reference in New Issue
Block a user