From 23cd129889a84151e475d5af571c4ba763f716e2 Mon Sep 17 00:00:00 2001 From: Maskym Vavilov Date: Thu, 11 Jan 2024 09:47:53 +0000 Subject: [PATCH] test --- docs/POCs/gslb.yaml | 23 +++++++++ docs/POCs/setup.yaml | 108 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 docs/POCs/gslb.yaml create mode 100644 docs/POCs/setup.yaml diff --git a/docs/POCs/gslb.yaml b/docs/POCs/gslb.yaml new file mode 100644 index 00000000..3fc29653 --- /dev/null +++ b/docs/POCs/gslb.yaml @@ -0,0 +1,23 @@ +apiVersion: k8gb.absa.oss/v1beta1 +kind: Gslb +metadata: + name: test-gslb + namespace: test-gslb +spec: + ingress: + ingressClassName: nginx + rules: + - host: boop.mv-custom.hcpapps.net + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: echo + port: + name: http + strategy: + type: roundRobin # Use a round robin load balancing strategy, when deciding which downstream clusters to route clients too + splitBrainThresholdSeconds: 300 # Threshold after which external cluster is filtered out from delegated zone when it doesn't look alive + dnsTtlSeconds: 30 # TTL value for automatically created DNS records diff --git a/docs/POCs/setup.yaml b/docs/POCs/setup.yaml new file mode 100644 index 00000000..6d925624 --- /dev/null +++ b/docs/POCs/setup.yaml @@ -0,0 +1,108 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: test-gslb + +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: Gateway +metadata: + name: prod-web + namespace: multi-cluster-gateways +spec: + gatewayClassName: kuadrant-multi-cluster-gateway-instance-per-cluster + listeners: + - allowedRoutes: + namespaces: + from: All + name: api + hostname: boop.mv-custom.hcpapps.net + port: 443 + protocol: HTTPS + tls: + mode: Terminate + certificateRefs: + - name: apps-hcpapps-tls + kind: Secret + +--- +apiVersion: kuadrant.io/v1alpha1 +kind: TLSPolicy +metadata: + name: prod-web + namespace: multi-cluster-gateways +spec: + targetRef: + name: prod-web + group: gateway.networking.k8s.io + kind: Gateway + issuerRef: + group: cert-manager.io + kind: ClusterIssuer + name: glbc-ca + +--- +apiVersion: kuadrant.io/v1alpha1 +kind: DNSPolicy +metadata: + name: prod-web + namespace: multi-cluster-gateways +spec: + targetRef: + name: prod-web + group: gateway.networking.k8s.io + kind: Gateway + +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: my-route +spec: + parentRefs: + - kind: Gateway + name: prod-web + namespace: kuadrant-multi-cluster-gateways + hostnames: + - boop.mv-custom.hcpapps.net + rules: + - backendRefs: + - name: echo + port: 8080 + +--- +apiVersion: v1 +kind: Service +metadata: + name: echo +spec: + ports: + - name: http-port + port: 8080 + targetPort: http-port + protocol: TCP + selector: + app: echo + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: echo +spec: + replicas: 1 + selector: + matchLabels: + app: echo + template: + metadata: + labels: + app: echo + spec: + containers: + - name: echo + image: docker.io/jmalloc/echo-server + ports: + - name: http-port + containerPort: 8080 + protocol: TCP \ No newline at end of file