Remove nessus app and fix envoy-gateway OCI chart bug

- Delete nessus Application CRD, manifests, and bootstrap script
- Vendor envoy-gateway Helm chart (v1.6.3) locally to work around
  ArgoCD v3.3.3 Docker Hub OCI resolution bug
- Re-enable auto-sync for envoy-gateway

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Scooby Husky
2026-03-10 19:41:36 -05:00
co-authored by Claude Opus 4.6
parent d304bd257d
commit 8bde33f4d1
39 changed files with 52300 additions and 461 deletions
+20
View File
@@ -0,0 +1,20 @@
**************************************************************************
*** PLEASE BE PATIENT: Envoy Gateway may take a few minutes to install ***
**************************************************************************
Envoy Gateway is an open source project for managing Envoy Proxy as a standalone or Kubernetes-based application gateway.
Thank you for installing Envoy Gateway! 🎉
Your release is named: {{ .Release.Name }}. 🎉
Your release is in namespace: {{ .Release.Namespace }}. 🎉
To learn more about the release, try:
$ helm status {{ .Release.Name }} -n {{ .Release.Namespace }}
$ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }}
To have a quickstart of Envoy Gateway, please refer to https://gateway.envoyproxy.io/latest/tasks/quickstart.
To get more details, please visit https://gateway.envoyproxy.io and https://github.com/envoyproxy/gateway.
+187
View File
@@ -0,0 +1,187 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "eg.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "eg.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "eg.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "eg.labels" -}}
helm.sh/chart: {{ include "eg.chart" . }}
{{ include "eg.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "eg.selectorLabels" -}}
app.kubernetes.io/name: {{ include "eg.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "eg.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "eg.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
The name of the Envoy Gateway image.
*/}}
{{- define "eg.image" -}}
{{/* if deployment-specific repository is defined, it takes precedence */}}
{{- if .Values.deployment.envoyGateway.image.repository -}}
{{/* if global.imageRegistry is defined, it takes precedence always */}}
{{- if .Values.global.imageRegistry -}}
{{- $repositoryParts := splitn "/" 2 .Values.deployment.envoyGateway.image.repository -}}
{{- $registryName := .Values.global.imageRegistry -}}
{{- $repositoryName := $repositoryParts._1 -}}
{{- $imageTag := default .Chart.AppVersion .Values.deployment.envoyGateway.image.tag -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $imageTag -}}
{{/* if global.imageRegistry is undefined, take repository as is */}}
{{- else -}}
{{- $imageTag := default .Chart.AppVersion .Values.deployment.envoyGateway.image.tag -}}
{{- printf "%s:%s" .Values.deployment.envoyGateway.image.repository $imageTag -}}
{{- end -}}
{{/* else, global image is used if defined */}}
{{- else if .Values.global.images.envoyGateway.image -}}
{{- $imageParts := splitn "/" 2 .Values.global.images.envoyGateway.image -}}
{{/* if global.imageRegistry is defined, it takes precedence always */}}
{{- $registryName := default $imageParts._0 .Values.global.imageRegistry -}}
{{- $repositoryTag := $imageParts._1 -}}
{{- $repositoryParts := splitn ":" 2 $repositoryTag -}}
{{- $repositoryName := $repositoryParts._0 -}}
{{- $imageTag := $repositoryParts._1 -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $imageTag -}}
{{- else -}}
docker.io/envoyproxy/gateway:{{ .Chart.Version }}
{{- end -}}
{{- end -}}
{{/*
Pull policy for the Envoy Gateway image.
*/}}
{{- define "eg.image.pullPolicy" -}}
{{- default .Values.deployment.envoyGateway.imagePullPolicy .Values.global.images.envoyGateway.pullPolicy -}}
{{- end }}
{{/*
Pull secrets for the Envoy Gateway image.
*/}}
{{- define "eg.image.pullSecrets" -}}
{{- if .Values.global.imagePullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets }}
{{- else if .Values.deployment.envoyGateway.imagePullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.deployment.envoyGateway.imagePullSecrets }}
{{- else if .Values.global.images.envoyGateway.pullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.global.images.envoyGateway.pullSecrets }}
{{- else -}}
imagePullSecrets: {{ toYaml list }}
{{- end }}
{{- end }}
{{/*
The name of the Envoy Ratelimit image.
*/}}
{{- define "eg.ratelimit.image" -}}
{{- $imageParts := splitn "/" 2 .Values.global.images.ratelimit.image -}}
{{/* if global.imageRegistry is defined, it takes precedence always */}}
{{- $registryName := default $imageParts._0 .Values.global.imageRegistry -}}
{{- $repositoryTag := $imageParts._1 -}}
{{- $repositoryParts := splitn ":" 2 $repositoryTag -}}
{{- $repositoryName := $repositoryParts._0 -}}
{{- $imageTag := default "master" $repositoryParts._1 -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $imageTag -}}
{{- end -}}
{{/*
Pull secrets for the Envoy Ratelimit image.
*/}}
{{- define "eg.ratelimit.image.pullSecrets" -}}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.global.imagePullSecrets }}
{{- else if .Values.global.images.ratelimit.pullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.global.images.ratelimit.pullSecrets }}
{{- else }}
imagePullSecrets: {{ toYaml list }}
{{- end }}
{{- end }}
{{/*
The default Envoy Gateway configuration.
*/}}
{{- define "eg.default-envoy-gateway-config" -}}
provider:
type: Kubernetes
kubernetes:
rateLimitDeployment:
container:
image: {{ include "eg.ratelimit.image" . }}
{{- if (or .Values.global.imagePullSecrets .Values.global.images.ratelimit.pullSecrets) }}
pod:
{{- include "eg.ratelimit.image.pullSecrets" . | nindent 8 }}
{{- end }}
{{- with .Values.global.images.ratelimit.pullPolicy }}
patch:
type: StrategicMerge
value:
spec:
template:
spec:
containers:
- name: envoy-ratelimit
imagePullPolicy: {{ . }}
{{- end }}
shutdownManager:
image: {{ include "eg.image" . }}
{{- with .Values.config.envoyGateway.extensionApis }}
extensionApis:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- if not .Values.topologyInjector.enabled }}
proxyTopologyInjector:
disabled: true
{{- end }}
{{- end }}
+251
View File
@@ -0,0 +1,251 @@
{{/*
All namespaced resources for Envoy Gateway RBAC.
*/}}
{{- define "eg.rbac.namespaced" -}}
- {{ include "eg.rbac.namespaced.basic" . | nindent 2 | trim }}
- {{ include "eg.rbac.namespaced.apps" . | nindent 2 | trim }}
- {{ include "eg.rbac.namespaced.discovery" . | nindent 2 | trim }}
- {{ include "eg.rbac.namespaced.gateway.envoyproxy" . | nindent 2 | trim }}
- {{ include "eg.rbac.namespaced.gateway.envoyproxy.status" . | nindent 2 | trim }}
- {{ include "eg.rbac.namespaced.gateway.networking" . | nindent 2 | trim }}
- {{ include "eg.rbac.namespaced.gateway.networking.status" . | nindent 2 | trim }}
{{- if .Values.topologyInjector.enabled }}
- {{ include "eg.rbac.namespaced.topologyinjector" . | nindent 2 | trim }}
{{- end }}
{{- end }}
{{/*
All cluster scoped resources for Envoy Gateway RBAC.
*/}}
{{- define "eg.rbac.cluster" -}}
- {{ include "eg.rbac.cluster.basic" . | nindent 2 | trim }}
- {{ include "eg.rbac.cluster.gateway.networking" . | nindent 2 | trim }}
- {{ include "eg.rbac.cluster.gateway.networking.status" . | nindent 2 | trim }}
- {{ include "eg.rbac.cluster.multiclusterservices" . | nindent 2 | trim }}
{{- end }}
{{/*
Namespaced
*/}}
{{- define "eg.rbac.namespaced.basic" -}}
apiGroups:
- ""
resources:
- configmaps
- secrets
- services
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.namespaced.topologyinjector" -}}
apiGroups:
- ""
resources:
- pods
- pods/binding
verbs:
- get
- list
- patch
- update
- watch
{{- end }}
{{- define "eg.rbac.namespaced.apps" -}}
apiGroups:
- apps
resources:
- deployments
- daemonsets
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.namespaced.discovery" -}}
apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.namespaced.gateway.envoyproxy" -}}
apiGroups:
- gateway.envoyproxy.io
resources:
- envoyproxies
- envoypatchpolicies
- clienttrafficpolicies
- backendtrafficpolicies
- securitypolicies
- envoyextensionpolicies
- backends
- httproutefilters
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.namespaced.gateway.envoyproxy.status" -}}
apiGroups:
- gateway.envoyproxy.io
resources:
- envoypatchpolicies/status
- clienttrafficpolicies/status
- backendtrafficpolicies/status
- securitypolicies/status
- envoyextensionpolicies/status
- backends/status
verbs:
- update
{{- end }}
{{- define "eg.rbac.namespaced.gateway.networking" -}}
apiGroups:
- gateway.networking.k8s.io
resources:
- gateways
- grpcroutes
- httproutes
- referencegrants
- tcproutes
- tlsroutes
- udproutes
- backendtlspolicies
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.namespaced.gateway.networking.status" -}}
apiGroups:
- gateway.networking.k8s.io
resources:
- gateways/status
- grpcroutes/status
- httproutes/status
- tcproutes/status
- tlsroutes/status
- udproutes/status
- backendtlspolicies/status
verbs:
- update
{{- end }}
{{/*
Cluster scope
*/}}
{{- define "eg.rbac.cluster.basic" -}}
apiGroups:
- ""
resources:
- nodes
- namespaces
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.cluster.gateway.networking" -}}
apiGroups:
- gateway.networking.k8s.io
resources:
- gatewayclasses
verbs:
- get
- list
- patch
- update
- watch
{{- end }}
{{- define "eg.rbac.cluster.multiclusterservices" -}}
apiGroups:
- multicluster.x-k8s.io
resources:
- serviceimports
verbs:
- get
- list
- watch
{{- end }}
{{- define "eg.rbac.cluster.gateway.networking.status" -}}
apiGroups:
- gateway.networking.k8s.io
resources:
- gatewayclasses/status
verbs:
- update
{{- end }}
{{- define "eg.rbac.infra.basic" -}}
- apiGroups:
- ""
resources:
- serviceaccounts
- services
- configmaps
verbs:
- create
- get
- list
- delete
- deletecollection
- patch
- apiGroups:
- apps
resources:
- deployments
- daemonsets
verbs:
- create
- get
- delete
- deletecollection
- patch
- apiGroups:
- autoscaling
- policy
resources:
- horizontalpodautoscalers
- poddisruptionbudgets
verbs:
- create
- get
- list
- delete
- deletecollection
- patch
- apiGroups:
- certificates.k8s.io
resources:
- clustertrustbundles
verbs:
- list
- get
- watch
{{- end }}
{{- define "eg.rbac.infra.tokenreview" -}}
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
{{- end }}
@@ -0,0 +1,127 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "eg.fullname" . }}-certgen
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
{{- if .Values.certgen.rbac.labels }}
{{- toYaml .Values.certgen.rbac.labels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-weight": "-1" # Ensure rbac is created before the certgen job when using ArgoCD.
{{- if .Values.certgen.rbac.annotations }}
{{- toYaml .Values.certgen.rbac.annotations | nindent 4 -}}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "eg.fullname" . }}-certgen
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
{{- if .Values.certgen.rbac.labels }}
{{- toYaml .Values.certgen.rbac.labels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-weight": "-1" # Ensure rbac is created before the certgen job when using ArgoCD.
{{- if .Values.certgen.rbac.annotations }}
{{- toYaml .Values.certgen.rbac.annotations | nindent 4 -}}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- create
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "eg.fullname" . }}-certgen
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
{{- if .Values.certgen.rbac.labels }}
{{- toYaml .Values.certgen.rbac.labels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-weight": "-1" # Ensure rbac is created before the certgen job when using ArgoCD.
{{- if .Values.certgen.rbac.annotations }}
{{- toYaml .Values.certgen.rbac.annotations | nindent 4 -}}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: '{{ include "eg.fullname" . }}-certgen'
subjects:
- kind: ServiceAccount
name: '{{ include "eg.fullname" . }}-certgen'
namespace: '{{ .Release.Namespace }}'
---
{{- if .Values.topologyInjector.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: '{{ include "eg.fullname" . }}-certgen:{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
{{- if .Values.certgen.rbac.labels }}
{{- toYaml .Values.certgen.rbac.labels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-weight": "-1" # Ensure rbac is created before the certgen job when using ArgoCD.
{{- if .Values.certgen.rbac.annotations }}
{{- toYaml .Values.certgen.rbac.annotations | nindent 4 -}}
{{- end }}
rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
verbs:
- get
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
resourceNames:
- 'envoy-gateway-topology-injector.{{ .Release.Namespace }}'
verbs:
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: '{{ include "eg.fullname" . }}-certgen:{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
{{- if .Values.certgen.rbac.labels }}
{{- toYaml .Values.certgen.rbac.labels | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-weight": "-1" # Ensure rbac is created before the certgen job when using ArgoCD.
{{- if .Values.certgen.rbac.annotations }}
{{- toYaml .Values.certgen.rbac.annotations | nindent 4 -}}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: '{{ include "eg.fullname" . }}-certgen:{{ .Release.Namespace }}'
subjects:
- kind: ServiceAccount
name: '{{ include "eg.fullname" . }}-certgen'
namespace: '{{ .Release.Namespace }}'
{{- end }}
@@ -0,0 +1,79 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "eg.fullname" . }}-certgen
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-install, pre-upgrade
{{- if .Values.certgen.job.annotations }}
{{- toYaml .Values.certgen.job.annotations | nindent 4 -}}
{{- end }}
spec:
backoffLimit: 1
completions: 1
parallelism: 1
template:
metadata:
labels:
app: certgen
{{- if .Values.certgen.job.pod.labels }}
{{- toYaml .Values.certgen.job.pod.labels | nindent 8 -}}
{{- end }}
{{- if .Values.certgen.job.pod.annotations }}
annotations:
{{- toYaml .Values.certgen.job.pod.annotations | nindent 8 -}}
{{- end }}
spec:
containers:
{{- $args := .Values.certgen.job.args }}
{{- if not .Values.topologyInjector.enabled }}
{{- $args = append $args "--disable-topology-injector" }}
{{- end }}
{{- if $args }}
- args:
{{- toYaml $args | nindent 8 }}
command:
- envoy-gateway
- certgen
{{- else }}
- command:
- envoy-gateway
- certgen
{{- end }}
env:
- name: ENVOY_GATEWAY_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ .Values.kubernetesClusterDomain }}
image: {{ include "eg.image" . }}
imagePullPolicy: {{ include "eg.image.pullPolicy" . }}
name: envoy-gateway-certgen
{{- with .Values.certgen.job.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
securityContext:
{{- toYaml .Values.certgen.job.securityContext | nindent 10 }}
{{- include "eg.image.pullSecrets" . | nindent 6 }}
{{- with .Values.certgen.job.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.certgen.job.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.certgen.job.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
restartPolicy: Never
serviceAccountName: {{ include "eg.fullname" . }}-certgen
{{- if not ( kindIs "invalid" .Values.certgen.job.ttlSecondsAfterFinished) }}
ttlSecondsAfterFinished: {{ .Values.certgen.job.ttlSecondsAfterFinished }}
{{- end }}
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: envoy-gateway-config
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
data:
envoy-gateway.yaml: |
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyGateway
{{- $baseEnvoyGatewayConfig := include "eg.default-envoy-gateway-config" . | fromYaml }}
{{- $userEnvoyGatewayConfig := .Values.config.envoyGateway }}
{{- $mergedEnvoyGatewayConfig := merge $userEnvoyGatewayConfig $baseEnvoyGatewayConfig }}
{{- toYaml $mergedEnvoyGatewayConfig | nindent 4 }}
@@ -0,0 +1,108 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: envoy-gateway
namespace: '{{ .Release.Namespace }}'
{{- with .Values.deployment.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
control-plane: envoy-gateway
{{- include "eg.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.deployment.replicas }}
selector:
matchLabels:
control-plane: envoy-gateway
{{- include "eg.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.deployment.pod.annotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
control-plane: envoy-gateway
{{- include "eg.selectorLabels" . | nindent 8 }}
{{- with .Values.deployment.pod.labels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.deployment.pod.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.pod.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.deployment.pod.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.deployment.pod.tolerations }}
tolerations:
{{- toYaml . | nindent 6 }}
{{- end }}
containers:
- args:
- server
- --config-path=/config/envoy-gateway.yaml
env:
- name: ENVOY_GATEWAY_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ .Values.kubernetesClusterDomain }}
image: {{ include "eg.image" . }}
imagePullPolicy: {{ include "eg.image.pullPolicy" . }}
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
name: envoy-gateway
ports:
{{- range .Values.deployment.ports }}
- containerPort: {{ .port }}
name: {{ .name }}
{{- end}}
{{- if .Values.topologyInjector.enabled }}
- name: webhook
containerPort: 9443
{{- end }}
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
{{- toYaml .Values.deployment.envoyGateway.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.deployment.envoyGateway.securityContext | nindent 10 }}
volumeMounts:
- mountPath: /config
name: envoy-gateway-config
readOnly: true
- mountPath: /certs
name: certs
readOnly: true
{{- include "eg.image.pullSecrets" . | nindent 6 }}
{{- with .Values.deployment.priorityClassName }}
priorityClassName: {{ . | quote }}
{{- end }}
serviceAccountName: envoy-gateway
terminationGracePeriodSeconds: 10
volumes:
- configMap:
defaultMode: 420
name: envoy-gateway-config
name: envoy-gateway-config
- name: certs
secret:
secretName: envoy-gateway
@@ -0,0 +1,24 @@
{{- if .Values.hpa.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: envoy-gateway
namespace: '{{ $.Release.Namespace }}'
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: envoy-gateway
{{- if .Values.hpa.minReplicas }}
minReplicas: {{ .Values.hpa.minReplicas }}
{{- end }}
maxReplicas: {{ required ".Values.hps.maxReplicas is required when hpa is enabled" .Values.hpa.maxReplicas }}
{{- if .Values.hpa.behavior }}
behavior:
{{ toYaml .Values.hpa.behavior | indent 4 }}
{{- end }}
{{- if .Values.hpa.metrics }}
metrics:
{{ toYaml .Values.hpa.metrics | indent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,18 @@
{{- if or (and .Values.podDisruptionBudget.minAvailable (ge (int .Values.podDisruptionBudget.minAvailable) 1) ) (and .Values.podDisruptionBudget.maxUnavailable (ge (int .Values.podDisruptionBudget.maxUnavailable) 1) )}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: envoy-gateway
namespace: '{{ .Release.Namespace }}'
spec:
{{- if and .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
control-plane: envoy-gateway
{{- include "eg.selectorLabels" . | nindent 6 }}
{{- end }}
@@ -0,0 +1,82 @@
{{ $watchedNamespaces := list }}
{{ if .Values.config.envoyGateway.provider.kubernetes }}
{{ $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{ if $kube.watch }}
{{ if $kube.watch.namespaces }}
{{ if gt (len $kube.watch.namespaces) 0 }}
{{ $watchedNamespaces = $kube.watch.namespaces }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ if gt (len $watchedNamespaces) 0 }}
{{ range $_, $ns := $watchedNamespaces }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: {{ include "eg.fullname" $ }}-envoy-gateway-role
namespace: {{ $ns | quote }}
rules:
{{ include "eg.rbac.namespaced" $ }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "eg.fullname" $ }}-envoy-gateway-rolebinding
namespace: {{ $ns | quote }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "eg.fullname" $ }}-envoy-gateway-role
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ $.Release.Namespace }}'
{{ end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: {{ include "eg.fullname" . }}-envoy-gateway-role
rules:
{{ include "eg.rbac.cluster" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "eg.fullname" . }}-envoy-gateway-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "eg.fullname" . }}-envoy-gateway-role
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ .Release.Namespace }}'
{{ else }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: {{ include "eg.fullname" . }}-envoy-gateway-role
rules:
{{ include "eg.rbac.cluster" . }}
{{ include "eg.rbac.namespaced" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "eg.fullname" . }}-envoy-gateway-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "eg.fullname" . }}-envoy-gateway-role
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ .Release.Namespace }}'
{{ end }}
@@ -0,0 +1,27 @@
apiVersion: v1
kind: Service
metadata:
name: envoy-gateway
namespace: '{{ .Release.Namespace }}'
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
control-plane: envoy-gateway
{{- include "eg.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
selector:
control-plane: envoy-gateway
{{- include "eg.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.deployment.ports | toYaml | nindent 2 -}}
{{- if .Values.topologyInjector.enabled }}
- name: webhook
port: 9443
targetPort: 9443
{{- end }}
{{- with .Values.service.trafficDistribution }}
trafficDistribution: {{ . }}
{{- end }}
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: envoy-gateway
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
@@ -0,0 +1,63 @@
{{- if .Values.topologyInjector.enabled }}
{{ $watchedNamespaces := list }}
{{ $gatewayNamespaceMode := false}}
{{- if .Values.config.envoyGateway.provider.kubernetes }}
{{- $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{- $gatewayNamespaceMode = and ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
{{- if $kube.watch }}
{{- if $kube.watch.namespaces }}
{{- if gt (len $kube.watch.namespaces) 0 }}
{{- $watchedNamespaces = $kube.watch.namespaces }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
name: 'envoy-gateway-topology-injector.{{ .Release.Namespace }}'
annotations:
"helm.sh/hook": pre-install, pre-upgrade
"helm.sh/hook-weight": "-1"
{{- if .Values.topologyInjector.annotations }}
{{- toYaml .Values.topologyInjector.annotations | nindent 4 -}}
{{- end }}
labels:
app.kubernetes.io/component: topology-injector
{{- include "eg.labels" . | nindent 4 }}
webhooks:
- name: topology.webhook.gateway.envoyproxy.io
admissionReviewVersions: ["v1"]
sideEffects: None
clientConfig:
service:
name: envoy-gateway
namespace: '{{ .Release.Namespace }}'
path: "/inject-pod-topology"
port: 9443
failurePolicy: Ignore
rules:
- operations: ["CREATE"]
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods/binding"]
{{- if not $gatewayNamespaceMode }}
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- {{ .Release.Namespace }}
{{- else if gt (len $watchedNamespaces) 0 }}
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
{{- range $watchedNamespaces }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- end }}
@@ -0,0 +1,56 @@
{{ if .Values.config.envoyGateway.provider.kubernetes }}
{{ $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{ if and (not $kube.watch) ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "eg.fullname" $ }}-cluster-infra-manager
labels:
{{- include "eg.labels" $ | nindent 4 }}
rules:
{{ include "eg.rbac.infra.basic" . }}
{{ include "eg.rbac.infra.tokenreview" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "eg.fullname" $ }}-cluster-infra-manager
labels:
{{- include "eg.labels" $ | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: '{{ include "eg.fullname" $ }}-cluster-infra-manager'
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ $.Release.Namespace }}'
---
{{ end }}
{{ end }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "eg.fullname" . }}-infra-manager
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
rules:
{{ include "eg.rbac.infra.basic" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "eg.fullname" . }}-infra-manager
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: '{{ include "eg.fullname" . }}-infra-manager'
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ .Release.Namespace }}'
@@ -0,0 +1,55 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "eg.fullname" . }}-leader-election-role
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "eg.fullname" . }}-leader-election-rolebinding
namespace: '{{ .Release.Namespace }}'
labels:
{{- include "eg.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: '{{ include "eg.fullname" . }}-leader-election-role'
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ .Release.Namespace }}'
@@ -0,0 +1,6 @@
{{ if .Values.createNamespace }}
apiVersion: v1
kind: Namespace
metadata:
name: '{{ .Release.Namespace }}'
{{ end }}
@@ -0,0 +1,66 @@
{{ $watchedNamespaces := list }}
{{ if .Values.config.envoyGateway.provider.kubernetes }}
{{ $kube := .Values.config.envoyGateway.provider.kubernetes }}
{{ if and ($kube.watch) ($kube.deploy) (eq $kube.deploy.type "GatewayNamespace") }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "eg.fullname" $ }}-infra-manager-tokenreview
labels:
{{- include "eg.labels" $ | nindent 4 }}
rules:
{{ include "eg.rbac.infra.tokenreview" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "eg.fullname" $ }}-infra-manager-tokenreview
labels:
{{- include "eg.labels" $ | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: '{{ include "eg.fullname" $ }}-infra-manager-tokenreview'
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ $.Release.Namespace }}'
{{ if $kube.watch.namespaces }}
{{ if gt (len $kube.watch.namespaces) 0 }}
{{ $watchedNamespaces = $kube.watch.namespaces }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ if gt (len $watchedNamespaces) 0 }}
{{ range $_, $ns := $watchedNamespaces }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "eg.fullname" $ }}-namespaced-infra-manager
namespace: {{ $ns | quote }}
labels:
{{- include "eg.labels" $ | nindent 4 }}
rules:
{{ include "eg.rbac.infra.basic" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "eg.fullname" $ }}-namespaced-infra-manager
namespace: {{ $ns | quote }}
labels:
{{- include "eg.labels" $ | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: '{{ include "eg.fullname" $ }}-namespaced-infra-manager'
subjects:
- kind: ServiceAccount
name: 'envoy-gateway'
namespace: '{{ $.Release.Namespace }}'
---
{{- end }}
{{- end }}