-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add GRPCRoute support Signed-off-by: Philipp Plotnikov <[email protected]> * refactor: fix linting Signed-off-by: Philipp Plotnikov <[email protected]> * docs: add GRPC Routes and write content for TCP Routes page Signed-off-by: Philipp Plotnikov <[email protected]> * docs: replace grpcroute to the tcproute in tcp.md Signed-off-by: Philipp Plotnikov <[email protected]> * docs: replace grpcRoute to the tcpRoute in tcp.md Signed-off-by: Philipp Plotnikov <[email protected]> --------- Signed-off-by: Philipp Plotnikov <[email protected]>
- Loading branch information
1 parent
182280f
commit 861af81
Showing
25 changed files
with
1,762 additions
and
152 deletions.
There are no files selected for viewing
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,71 @@ | ||
# GRPC routes | ||
|
||
!!! warning | ||
We tested grpc support only by looking at resources state as traffic providers didn't support grpc well at the moment of development but it would be great if you contribute a real example | ||
|
||
To use GRPCRoute: | ||
|
||
1. Install your traffic provider | ||
2. Install [GatewayAPI CRD](https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api) if your traffic provider doesn't do it by default | ||
3. Install [Argo Rollouts](https://argoproj.github.io/argo-rollouts/installation/) | ||
4. Install [Argo Rollouts GatewayAPI plugin](installation.md) | ||
5. Create stable and canary services | ||
6. Create GRPCRoute resource according to the GatewayAPI and your traffic provider documentation | ||
```yaml | ||
apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
kind: GRPCRoute | ||
metadata: | ||
name: first-grpcroute | ||
namespace: default | ||
spec: | ||
parentRefs: | ||
- name: traefik-gateway # read documentation of your traffic provider to understand what you need to specify here | ||
rules: | ||
- backendRefs: | ||
- name: argo-rollouts-stable-service # stable service you have created on the 5th step | ||
port: 80 | ||
- name: argo-rollouts-canary-service # canary service you have created on the 5th step | ||
port: 80 | ||
``` | ||
7. Create Rollout resource | ||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: rollouts-demo | ||
namespace: default | ||
spec: | ||
replicas: 2 | ||
strategy: | ||
canary: | ||
canaryService: argo-rollouts-canary-service | ||
stableService: argo-rollouts-stable-service | ||
trafficRouting: | ||
plugins: | ||
argoproj-labs/gatewayAPI: | ||
grpcRoute: first-grpcroute # grpcroute you have created on the 6th step | ||
namespace: default # namespace where your grpcroute is | ||
steps: | ||
- setWeight: 30 | ||
- pause: { duration: 2 } | ||
revisionHistoryLimit: 1 | ||
selector: | ||
matchLabels: | ||
app: rollouts-demo | ||
template: | ||
metadata: | ||
labels: | ||
app: rollouts-demo | ||
spec: | ||
containers: | ||
- name: rollouts-demo | ||
image: argoproj/rollouts-demo:red | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
protocol: TCP | ||
resources: | ||
requests: | ||
memory: 32Mi | ||
cpu: 5m | ||
``` |
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 |
---|---|---|
@@ -1,6 +1,71 @@ | ||
# Using TCP | ||
# TCP Routes | ||
|
||
!!! warning | ||
Page under construction. | ||
|
||
To be written | ||
To use TCPRoute: | ||
|
||
1. Install your traffic provider | ||
2. Install [GatewayAPI CRD](https://gateway-api.sigs.k8s.io/guides/#installing-gateway-api) if your traffic provider doesn't do it by default | ||
3. Install [Argo Rollouts](https://argoproj.github.io/argo-rollouts/installation/) | ||
4. Install [Argo Rollouts GatewayAPI plugin](installation.md) | ||
5. Create stable and canary services | ||
6. Create TCPRoute resource according to the GatewayAPI and your traffic provider documentation | ||
```yaml | ||
apiVersion: gateway.networking.k8s.io/v1alpha2 | ||
kind: TCPRoute | ||
metadata: | ||
name: first-tcproute | ||
namespace: default | ||
spec: | ||
parentRefs: | ||
- name: traefik-gateway # read documentation of your traffic provider to understand what you need to specify here | ||
sectionName: tcp | ||
namespace: default | ||
kind: Gateway | ||
rules: | ||
- backendRefs: | ||
- name: argo-rollouts-stable-service # stable service you have created on the 5th step | ||
port: 80 | ||
- name: argo-rollouts-canary-service # canary service you have created on the 5th step | ||
port: 80 | ||
``` | ||
7. Create Rollout resource | ||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Rollout | ||
metadata: | ||
name: rollouts-demo | ||
namespace: default | ||
spec: | ||
replicas: 2 | ||
strategy: | ||
canary: | ||
canaryService: argo-rollouts-canary-service | ||
stableService: argo-rollouts-stable-service | ||
trafficRouting: | ||
plugins: | ||
argoproj-labs/gatewayAPI: | ||
tcpRoute: first-tcproute # tcproute you have created on the 6th step | ||
namespace: default # namespace where your tcproute is | ||
steps: | ||
- setWeight: 30 | ||
- pause: { duration: 2 } | ||
revisionHistoryLimit: 1 | ||
selector: | ||
matchLabels: | ||
app: rollouts-demo | ||
template: | ||
metadata: | ||
labels: | ||
app: rollouts-demo | ||
spec: | ||
containers: | ||
- name: rollouts-demo | ||
image: argoproj/rollouts-demo:red | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
protocol: TCP | ||
resources: | ||
requests: | ||
memory: 32Mi | ||
cpu: 5m | ||
``` |
Oops, something went wrong.