Skip to content

Commit

Permalink
Update deploy-full-local-setup examples to use new resourceRef style
Browse files Browse the repository at this point in the history
Signed-off-by: Yury Tsarev <[email protected]>
  • Loading branch information
ytsarev committed Sep 15, 2024
1 parent b6577a0 commit e825c56
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 47 deletions.
39 changes: 26 additions & 13 deletions deploy/crds/k8gb.absa.oss_v1beta1_gslb_cr_failover_ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app: test-gslb-failover
name: failover-ingress
namespace: test-gslb
spec:
ingressClassName: nginx
rules:
- host: failover.cloud.example.com
http:
paths:
- backend:
service:
name: frontend-podinfo
port:
name: http
path: /
pathType: Prefix
---
apiVersion: k8gb.absa.oss/v1beta1
kind: Gslb
metadata:
name: failover-ingress
namespace: test-gslb
spec:
ingress:
ingressClassName: nginx
rules:
- host: failover.cloud.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontend-podinfo # Gslb should reflect Healthy status and create associated DNS records
port:
name: http
resourceRef:
apiVersion: networking.k8s.io/v1
kind: Ingress
matchLabels:
app: test-gslb-failover
strategy:
type: failover
primaryGeoTag: eu
81 changes: 47 additions & 34 deletions deploy/crds/k8gb.absa.oss_v1beta1_gslb_cr_roundrobin_ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,56 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
labels:
app: roundrobin-test-gslb
name: roundrobin-ingress
namespace: test-gslb
spec:
ingressClassName: nginx
rules:
- host: notfound.cloud.example.com
http:
paths:
- backend:
service:
name: non-existing-app
port:
name: http
path: /
pathType: Prefix
- host: unhealthy.cloud.example.com
http:
paths:
- backend:
service:
name: unhealthy-app
port:
name: http
path: /
pathType: Prefix
- host: roundrobin.cloud.example.com
http:
paths:
- backend:
service:
name: frontend-podinfo
port:
name: http
path: /
pathType: Prefix
---
apiVersion: k8gb.absa.oss/v1beta1
kind: Gslb
metadata:
name: roundrobin-ingress
namespace: test-gslb
spec:
ingress:
ingressClassName: nginx
rules:
- host: notfound.cloud.example.com # This is the GSLB enabled host that clients would use
http: # This section mirrors the same structure as that of an Ingress resource and will be used verbatim when creating the corresponding Ingress resource that will match the GSLB host
paths:
- path: /
pathType: Prefix
backend:
service:
name: non-existing-app # Gslb should reflect NotFound status
port:
name: http
- host: unhealthy.cloud.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: unhealthy-app # Gslb should reflect Unhealthy status
port:
name: http
- host: roundrobin.cloud.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontend-podinfo # Gslb should reflect Healthy status and create associated DNS records
port:
name: http
resourceRef:
apiVersion: networking.k8s.io/v1
kind: Ingress
matchLabels:
app: roundrobin-test-gslb
strategy:
type: roundRobin # Use a round robin load balancing strategy, when deciding which downstream clusters to route clients too
type: roundRobin # Use a round robin load balancing strategy, when deciding which downstream clusters to route clients to
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

0 comments on commit e825c56

Please sign in to comment.