Skip to content

Commit af214c9

Browse files
authored
Deploy envoy-gateway in prow clusters (gardener#5626)
* Deploy `envoy-gateway` * Adapt `oauth2_proxy` * Adapt `monitoring` * Adapt `prow` * Create dependencies to `envoy-gateway` for kustomizations which use `Gateway` and `envoy-gateway` objects * Address PR review feedback * Remove port 80 from trusted monitoring
1 parent 0a8b742 commit af214c9

34 files changed

+574
-23
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: kustomize.toolkit.fluxcd.io/v1
2+
kind: Kustomization
3+
metadata:
4+
name: envoy-gateway
5+
namespace: flux-system
6+
spec:
7+
interval: 30m
8+
path: ./deploy/envoy-gateway
9+
prune: true
10+
retryInterval: 2m
11+
timeout: 5m
12+
sourceRef:
13+
kind: GitRepository
14+
name: ci-infra
15+
wait: true

clusters/base/monitoring-kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ metadata:
44
name: monitoring
55
namespace: flux-system
66
spec:
7+
dependsOn:
8+
- name: envoy-gateway
79
interval: 30m
810
prune: true
911
retryInterval: 2m

clusters/prow-trusted/oauth2-proxy-kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ metadata:
44
name: oauth2-proxy
55
namespace: flux-system
66
spec:
7+
dependsOn:
8+
- name: envoy-gateway
79
interval: 30m
810
path: deploy/oauth2-proxy
911
prune: true

clusters/prow-trusted/prow-kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ metadata:
44
name: prow
55
namespace: flux-system
66
spec:
7+
dependsOn:
8+
- name: envoy-gateway
79
interval: 30m
810
path: ./deploy/prow
911
prune: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: source.toolkit.fluxcd.io/v1
2+
kind: HelmRepository
3+
metadata:
4+
name: envoy-gateway
5+
namespace: flux-system
6+
spec:
7+
type: oci
8+
interval: 30m
9+
url: oci://docker.io/envoyproxy
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: envoy-gateway-system
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apiVersion: autoscaling.k8s.io/v1
2+
kind: VerticalPodAutoscaler
3+
metadata:
4+
labels:
5+
app.kubernetes.io/name: envoy-gateway
6+
name: envoy-gateway
7+
namespace: envoy-gateway-system
8+
spec:
9+
resourcePolicy:
10+
containerPolicies:
11+
- containerName: '*'
12+
controlledValues: RequestsOnly
13+
targetRef:
14+
apiVersion: apps/v1
15+
kind: Deployment
16+
name: envoy-gateway
17+
updatePolicy:
18+
updateMode: InPlaceOrRecreate
19+
---
20+
apiVersion: autoscaling.k8s.io/v1
21+
kind: VerticalPodAutoscaler
22+
metadata:
23+
labels:
24+
app.kubernetes.io/name: envoy-gateway
25+
name: envoy-prow
26+
namespace: envoy-gateway-system
27+
spec:
28+
resourcePolicy:
29+
containerPolicies:
30+
- containerName: '*'
31+
controlledValues: RequestsOnly
32+
targetRef:
33+
apiVersion: apps/v1
34+
kind: Deployment
35+
name: envoy-prow
36+
updatePolicy:
37+
updateMode: InPlaceOrRecreate
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apiVersion: helm.toolkit.fluxcd.io/v2
2+
kind: HelmRelease
3+
metadata:
4+
name: envoy-gateway
5+
namespace: flux-system
6+
spec:
7+
interval: 5m
8+
chart:
9+
spec:
10+
chart: gateway-helm
11+
version: 'v1.6.x'
12+
sourceRef:
13+
kind: HelmRepository
14+
name: envoy-gateway
15+
namespace: flux-system
16+
interval: 1m
17+
releaseName: envoy-gateway
18+
targetNamespace: envoy-gateway-system
19+
values:
20+
# Check https://gateway.envoyproxy.io/docs/install/gateway-helm-api/ for all available values.
21+
config:
22+
envoyGateway:
23+
extensionApis:
24+
enableBackend: true
25+
enableEnvoyPatchPolicy: true
26+
27+
deployment:
28+
replicas: 2
29+
pod:
30+
affinity:
31+
nodeAffinity:
32+
requiredDuringSchedulingIgnoredDuringExecution:
33+
nodeSelectorTerms:
34+
- matchExpressions:
35+
- key: worker.gardener.cloud/system-components
36+
operator: In
37+
values:
38+
- "true"
39+
topologySpreadConstraints:
40+
- maxSkew: 1
41+
topologyKey: topology.kubernetes.io/zone
42+
whenUnsatisfiable: DoNotSchedule
43+
labelSelector:
44+
matchLabels:
45+
app.kubernetes.io/name: envoy-gateway
46+
app.kubernetes.io/instance: envoy-gateway
47+
48+
podDisruptionBudget:
49+
maxUnavailable: 1
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: gateway.envoyproxy.io/v1alpha1
2+
kind: EnvoyProxy
3+
metadata:
4+
name: high-availability-config
5+
namespace: envoy-gateway-system
6+
spec:
7+
ipFamily: DualStack
8+
provider:
9+
type: Kubernetes
10+
kubernetes:
11+
envoyDeployment:
12+
replicas: 3
13+
pod:
14+
affinity:
15+
nodeAffinity:
16+
requiredDuringSchedulingIgnoredDuringExecution:
17+
nodeSelectorTerms:
18+
- matchExpressions:
19+
- key: worker.gardener.cloud/system-components
20+
operator: In
21+
values:
22+
- "true"
23+
topologySpreadConstraints:
24+
- maxSkew: 1
25+
topologyKey: topology.kubernetes.io/zone
26+
whenUnsatisfiable: DoNotSchedule
27+
envoyPDB:
28+
maxUnavailable: 1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: gateway.networking.k8s.io/v1
2+
kind: GatewayClass
3+
metadata:
4+
name: prow
5+
spec:
6+
controllerName: gateway.envoyproxy.io/gatewayclass-controller
7+
parametersRef:
8+
group: gateway.envoyproxy.io
9+
kind: EnvoyProxy
10+
name: high-availability-config
11+
namespace: envoy-gateway-system

0 commit comments

Comments
 (0)