Skip to content

Commit

Permalink
docs: Update traefik example (#17)
Browse files Browse the repository at this point in the history
Update traefik example as it was missing a `namespace` setting in the
rollout plugin spec. Additionally, add missing RBAC configuration and
remove some erroneous creationTimestamp fields.

- Remove duplicate revisionHistoryLimit in google cloud rollout

Signed-off-by: Ian Delahorne <[email protected]>
  • Loading branch information
iandelahorne authored Jul 3, 2023
1 parent 9a56c1f commit 2c30283
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
1 change: 0 additions & 1 deletion examples/google-cloud/rollout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: rollouts-demo
namespace: default
spec:
revisionHistoryLimit: 1
replicas: 10
strategy:
canary:
Expand Down
19 changes: 16 additions & 3 deletions examples/traefik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: traefik-controller-role
namespace: aws-local-runtime
rules:
Expand Down Expand Up @@ -203,8 +202,21 @@ spec:
selector:
app: rollouts-demo
```
## Step 6 - Grant argo-rollouts permissions to view and modify Gateway HTTPRoute resources
## Step 6 - Create argo-rollouts resources
The argo-rollouts service account needs the ability to be able to view and mofiy HTTPRoutes as well as its existing permissions. Edit the `argo-rollouts` cluster role to add the following permissions:

```yaml
rules:
- apiGroups:
- gateway.networking.k8s.io
resources:
- httproutes
verbs:
- '*'
```

## Step 7 - Create argo-rollouts resources

We can finally create the definition of the application.

Expand All @@ -223,6 +235,7 @@ spec:
plugins:
argoproj-labs/gatewayAPI:
httpRoute: argo-rollouts-http-route # our created httproute
namespace: default # namespace where this rollout resides.
steps:
- setWeight: 30
- pause: {}
Expand Down Expand Up @@ -256,7 +269,7 @@ spec:

Apply all the yaml files to your cluster

## Step 7 - Test the canary
## Step 8 - Test the canary

Perform a deployment like any other Rollout and the Gateway plugin will split the traffic to your canary by instructing Traefik proxy via the Gateway API

Expand Down
2 changes: 0 additions & 2 deletions examples/traefik/cluster-role.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: traefik-controller-role
namespace: aws-local-runtime
rules:
- apiGroups:
- "*"
Expand Down
1 change: 1 addition & 0 deletions examples/traefik/httproute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
spec:
parentRefs:
- name: argo-rollouts-gateway
namespace: default
rules:
- backendRefs:
- name: argo-rollouts-stable-service
Expand Down
1 change: 1 addition & 0 deletions examples/traefik/rollout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
plugins:
argoproj-labs/gatewayAPI:
httpRoute: argo-rollouts-http-route # our created httproute
namespace: default # namespace where this rollout resides
steps:
- setWeight: 30
- pause: {}
Expand Down

0 comments on commit 2c30283

Please sign in to comment.