forked from kubernetes-sigs/gateway-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes-sigs#46 from GoogleCloudPlatform/update…
…-docs-reference-manifests updating YAMLs referenced by Gateway controller docs pages
- Loading branch information
Showing
11 changed files
with
245 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
15 changes: 15 additions & 0 deletions
15
gateway/gke-gateway-controller/multi-cluster-gateway/internal-http-gateway.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
kind: Gateway | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: internal-http | ||
namespace: store | ||
spec: | ||
gatewayClassName: gke-l7-rilb-mc | ||
listeners: | ||
- protocol: HTTP | ||
port: 80 | ||
routes: | ||
kind: HTTPRoute | ||
selector: | ||
matchLabels: | ||
gateway: internal-http |
29 changes: 29 additions & 0 deletions
29
gateway/gke-gateway-controller/multi-cluster-gateway/internal-route-stage-1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
kind: HTTPRoute | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: internal-store-route | ||
namespace: store | ||
labels: | ||
gateway: internal-http | ||
spec: | ||
hostnames: | ||
- "store.example.internal" | ||
rules: | ||
# Matches for env=canary and sends it to store-west-2 ServiceImport | ||
- matches: | ||
- headers: | ||
values: | ||
env: canary | ||
forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-2 | ||
port: 8080 | ||
# All other traffic goes to store-west-1 ServiceImport | ||
- forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-1 | ||
port: 8080 |
27 changes: 27 additions & 0 deletions
27
gateway/gke-gateway-controller/multi-cluster-gateway/internal-route-stage-2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
kind: HTTPRoute | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: internal-store-route | ||
namespace: store | ||
labels: | ||
gateway: internal-http | ||
spec: | ||
hostnames: | ||
- "store.example.internal" | ||
rules: | ||
# Sends all traffic to store-west-1 ServiceImport | ||
- forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-1 | ||
port: 8080 | ||
# Also mirrors all traffic to store-west-2 ServiceImport | ||
filters: | ||
- type: RequestMirror | ||
requestMirror: | ||
backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-2 | ||
port: 8080 |
26 changes: 26 additions & 0 deletions
26
gateway/gke-gateway-controller/multi-cluster-gateway/internal-route-stage-3.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
kind: HTTPRoute | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: internal-store-route | ||
namespace: store | ||
labels: | ||
gateway: internal-http | ||
spec: | ||
hostnames: | ||
- "store.example.internal" | ||
rules: | ||
# 90% of traffic to store-west-1 ServiceImport | ||
- forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-1 | ||
port: 8080 | ||
weight: 90 | ||
# 10% of traffic to store-west-2 ServiceImport | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-2 | ||
port: 8080 | ||
weight: 10 |
26 changes: 26 additions & 0 deletions
26
gateway/gke-gateway-controller/multi-cluster-gateway/internal-route-stage-4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
kind: HTTPRoute | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: internal-store-route | ||
namespace: store | ||
labels: | ||
gateway: internal-http | ||
spec: | ||
hostnames: | ||
- "store.example.internal" | ||
rules: | ||
# No traffic to store-west-1 ServiceImport | ||
- forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-1 | ||
port: 8080 | ||
weight: 0 | ||
# All traffic to store-west-2 ServiceImport | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-2 | ||
port: 8080 | ||
weight: 100 |
15 changes: 15 additions & 0 deletions
15
gateway/gke-gateway-controller/multi-cluster-gateway/private-store-route.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
kind: Gateway | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: internal-http | ||
namespace: store | ||
spec: | ||
gatewayClassName: gke-l7-rilb-mc | ||
listeners: | ||
- protocol: HTTP | ||
port: 80 | ||
routes: | ||
kind: HTTPRoute | ||
selector: | ||
matchLabels: | ||
gateway: internal-http |
37 changes: 37 additions & 0 deletions
37
gateway/gke-gateway-controller/multi-cluster-gateway/public-store-route.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
kind: HTTPRoute | ||
apiVersion: networking.x-k8s.io/v1alpha1 | ||
metadata: | ||
name: public-store-route | ||
namespace: store | ||
labels: | ||
gateway: external-http | ||
spec: | ||
hostnames: | ||
- "store.example.com" | ||
rules: | ||
- forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store | ||
port: 8080 | ||
- matches: | ||
- path: | ||
type: Prefix | ||
value: /west | ||
forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-west-1 | ||
port: 8080 | ||
- matches: | ||
- path: | ||
type: Prefix | ||
value: /east | ||
forwardTo: | ||
- backendRef: | ||
group: net.gke.io | ||
kind: ServiceImport | ||
name: store-east-1 | ||
port: 8080 |
Empty file.
35 changes: 35 additions & 0 deletions
35
gateway/gke-gateway-controller/multi-cluster-gateway/store-west-1-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: store | ||
namespace: store | ||
spec: | ||
selector: | ||
app: store | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
--- | ||
kind: ServiceExport | ||
apiVersion: net.gke.io/v1 | ||
metadata: | ||
name: store | ||
namespace: store | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: store-west-1 | ||
namespace: store | ||
spec: | ||
selector: | ||
app: store | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
--- | ||
kind: ServiceExport | ||
apiVersion: net.gke.io/v1 | ||
metadata: | ||
name: store-west-1 | ||
namespace: store |
35 changes: 35 additions & 0 deletions
35
gateway/gke-gateway-controller/multi-cluster-gateway/store-west-2-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: store | ||
namespace: store | ||
spec: | ||
selector: | ||
app: store | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
--- | ||
kind: ServiceExport | ||
apiVersion: net.gke.io/v1 | ||
metadata: | ||
name: store | ||
namespace: store | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: store-west-2 | ||
namespace: store | ||
spec: | ||
selector: | ||
app: store | ||
ports: | ||
- port: 8080 | ||
targetPort: 8080 | ||
--- | ||
kind: ServiceExport | ||
apiVersion: net.gke.io/v1 | ||
metadata: | ||
name: store-west-2 | ||
namespace: store |