Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
chore(gw-api): configure the service in order to create AWS NLB
Browse files Browse the repository at this point in the history
  • Loading branch information
Smana committed Aug 10, 2023
1 parent 36ee0d5 commit 0748e96
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
28 changes: 28 additions & 0 deletions apps/base/echo/cilium-clusterpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: mutate-cilium-gateway-echo-gateway
annotations:
policies.kyverno.io/title: Mutate echo gateway
policies.kyverno.io/severity: medium
policies.kyverno.io/description: >-
We need to mutate the echo gateway service in order to configure the AWS LB.
spec:
rules:
- name: mutate-svc-annotations
match:
any:
- resources:
kinds:
- Service
namespaces:
- echo
name: cilium-gateway-echo-gateway
mutate:
patchStrategicMerge:
metadata:
annotations:
external-dns.alpha.kubernetes.io/hostname: echo-${cluster_name}.${domain_name}
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb-ip"
10 changes: 10 additions & 0 deletions apps/base/echo/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: echo-gateway
spec:
gatewayClassName: cilium
listeners:
- name: http
protocol: HTTP
port: 80
2 changes: 2 additions & 0 deletions apps/base/echo/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- cilium-clusterpolicy.yaml
- gateway.yaml
- helmrelease-echo-1.yaml
- helmrelease-echo-2.yaml
- namespace.yaml
Expand Down

0 comments on commit 0748e96

Please sign in to comment.