### Install Linkerd and Linkerd Viz Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/linkerd/README.md Installs Linkerd and its visualization components using the Linkerd CLI. Ensure Linkerd is installed before proceeding. ```shell linkerd install --crds | kubectl apply -f - linkerd install | kubectl apply -f - && linkerd check linkerd viz install | kubectl apply -f - && linkerd check ``` -------------------------------- ### Install Gateway APIs Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/kong/README.md Apply the standard installation manifest for the Gateway API. Ensure this is done before installing Kong. ```shell kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.7.1/standard-install.yaml ``` -------------------------------- ### Download and Install Istio Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Downloads the Istio CLI and installs Istio with the minimal profile. This profile ensures only 'istiod' is installed, relying on the Kubernetes Gateway API for traffic management. ```bash curl -L https://istio.io/downloadIstio | sh - cd istio-1.29.1 export PATH=$PWD/bin:$PATH istioctl install --set profile=minimal -y ``` -------------------------------- ### Install Plugin via ConfigMap (Specific Version) Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/installation.md Example ConfigMap for installing a specific version of the plugin for Linux/x86 architecture. Deploy this file using 'kubectl apply -f gateway-plugin.yml -n argo-rollouts'. ```yaml apiVersion: v1 kind: ConfigMap metadata: name: argo-rollouts-config # must be named like this namespace: argo-rollouts # must be in this namespace data: trafficRouterPlugins: |- - name: "argoproj-labs/gatewayAPI" location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/v0.4.0/gatewayapi-plugin-linux-amd64" ``` -------------------------------- ### Install Gateway API Plugin Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Apply the configuration and restart the Argo Rollouts controller to install the Gateway API plugin. Ensure necessary permissions are granted. ```bash kubectl apply -f configmap-gatewayapicontrollerforargo.yaml # Give Access to Argo Rollouts for the Gateway/HTTP Route. Do Note thatthese permissions are not very strict. You should lock them down according to your needs. kubectl create -f ClusterRoleForArgoGatewayAPI.yaml # Restart the Argo Rollout Controller kubectl rollout restart deployment -n argo-rollouts argo-rollouts ``` -------------------------------- ### Install Argo Rollouts CLI Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Installs the Argo Rollouts CLI using Homebrew. ```bash brew install argoproj/tap/kubectl-argo-rollouts ``` -------------------------------- ### Create Example Rollout Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/linkerd/README.md Deploys an initial Argo Rollouts resource to establish the baseline version for a canary deployment. ```shell kubectl apply -f rollout.yaml ``` -------------------------------- ### Install Plugin via Init Container (Helm) Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Install the plugin using init containers with the Argo Rollouts Helm chart for container-based deployment. This method avoids external downloads. ```yaml controller: initContainers: - name: copy-gwapi-plugin image: ghcr.io/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi:v0.5.0 command: ["/bin/sh", "-c"] args: - cp /bin/rollouts-plugin-trafficrouter-gatewayapi /plugins volumeMounts: - name: gwapi-plugin mountPath: /plugins trafficRouterPlugins: - name: argoproj-labs/gatewayAPI location: "file:///plugins/rollouts-plugin-trafficrouter-gatewayapi" volumes: - name: gwapi-plugin emptyDir: {} volumeMounts: - name: gwapi-plugin mountPath: /plugins ``` -------------------------------- ### Install Argo Rollouts Controller Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Creates the 'argo-rollouts' namespace and applies the Argo Rollouts controller installation manifest. ```bash kubectl create namespace argo-rollouts kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml ``` -------------------------------- ### Clone Repository and Navigate Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Clone the project repository and change the directory to the project root. Ensure you have Git installed. ```bash git clone https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi.git cd rollouts-plugin-trafficrouter-gatewayapi ``` -------------------------------- ### Install Argo Rollouts and Plugin Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/linkerd/README.md Installs Argo Rollouts and the associated traffic router plugin into a dedicated namespace. This setup is necessary for managing canary deployments. ```shell kubectl create namespace argo-rollouts kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml kubectl apply -k https://github.com/argoproj/argo-rollouts/manifests/crds?ref=stable kubectl apply -f argo-rollouts-plugin.yaml kubectl rollout restart deploy -n argo-rollouts ``` -------------------------------- ### Install Plugin via Init Containers (Helm) Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/installation.md Configure the Argo Rollouts Helm chart to install the plugin using init containers. This method copies the plugin binary into a shared volume. ```yaml controller: initContainers: - name: copy-gwapi-plugin image: ghcr.io/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi:v0.5.0 command: ["/bin/sh", "-c"] args: - cp /bin/rollouts-plugin-trafficrouter-gatewayapi /plugins volumeMounts: - name: gwapi-plugin mountPath: /plugins trafficRouterPlugins: - name: argoproj-labs/gatewayAPI location: "file:///plugins/rollouts-plugin-trafficrouter-gatewayapi" volumes: - name: gwapi-plugin emptyDir: {} volumeMounts: - name: gwapi-plugin mountPath: /plugins ``` -------------------------------- ### Install Envoy Gateway with Helm Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/quick-start.md Installs Envoy Gateway using Helm. This is a one-time setup for the cluster, typically handled by infrastructure operators. ```bash helm install eg oci://docker.io/envoyproxy/gateway-helm --version v0.5.0 -n envoy-gateway-system --create-namespace ``` -------------------------------- ### Install agentgateway Helm Chart Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/agentgateway/README.md Installs the agentgateway controller using its Helm chart. Ensure the CRDs are installed prior to this step. ```shell helm upgrade -i -n agentgateway-system agentgateway oci://cr.agentgateway.dev/charts/agentgateway \ --version v1.0.1 ``` -------------------------------- ### Install Plugin via ConfigMap (HTTP) Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/installation.md Use this ConfigMap to install the plugin by downloading it from a URL. Ensure the ConfigMap is named 'argo-rollouts-config' and placed in the 'argo-rollouts' namespace. ```yaml apiVersion: v1 kind: ConfigMap metadata: name: argo-rollouts-config # must be named like this namespace: argo-rollouts # must be in this namespace data: trafficRouterPlugins: |- - name: "argoproj-labs/gatewayAPI" location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download//gatewayapi-plugin-" ``` -------------------------------- ### Install kgateway Helm Chart Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/kgateway/README.md Deploy the kgateway Helm chart to your cluster. Ensure the namespace kgateway-system exists. ```shell helm upgrade -i -n kgateway-system kgateway oci://cr.kgateway.dev/kgateway-dev/charts/kgateway \ --version v2.2.2 ``` -------------------------------- ### Install Plugin via ConfigMap Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Install the Gateway API plugin by creating a ConfigMap that specifies the plugin's name and download location from GitHub releases. ```yaml apiVersion: v1 kind: ConfigMap metadata: name: argo-rollouts-config namespace: argo-rollouts data: trafficRouterPlugins: |- - name: "argoproj-labs/gatewayAPI" location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/v0.4.0/gatewayapi-plugin-linux-amd64" ``` -------------------------------- ### Install Gateway API Resources Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/agentgateway/README.md Applies the standard resources for the Kubernetes Gateway API version 1.5.0. Ensure the Gateway API is installed before proceeding. ```shell kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.0/standard-install.yaml ``` -------------------------------- ### Install Gateway API Resources Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/kgateway/README.md Apply the standard Kubernetes Gateway API resources. Ensure you are using the correct version. ```shell kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml ``` -------------------------------- ### Install Gateway API Controller using Helm Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Installs the AWS Gateway API controller using Helm, configuring it with specific cluster details and logging level. ```bash aws ecr-public get-login-password --region us-east-1 | helm registry login --username AWS --password-stdin public.ecr.aws helm install gateway-api-controller \ oci://public.ecr.aws/aws-application-networking-k8s/aws-gateway-controller-chart \ --version=v1.1.2 \ --set=serviceAccount.create=false --namespace aws-application-networking-system \ --set=log.level=info \ --set=awsRegion=$AWS_REGION \ --set=clusterVpcId=$EKSVPC \ --set=awsAccountId=$ACCOUNT \ --set=clusterName=$CLUSTER_NAME \ --set=defaultServiceNetwork=$LATTICE_SVC_NET ``` -------------------------------- ### HTTPRoute Rollout Example Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/RELEASE_NOTES.md This integration test demonstrates the new header-based routing behavior for HTTPRoutes with the Gateway API plugin. ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: example-rollout spec: template: metadata: labels: app: myapp strategy: canary: steps: - setWeight: 50 - pause: { duration: 10m } ingressRef: group: gateway.networking.k8s.io kind: HTTPRoute name: example-httproute # ... other rollout spec fields ``` -------------------------------- ### Create an Example Rollout with Gateway API Traffic Routing Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Define a Kubernetes Rollout resource that utilizes the Gateway API plugin for traffic routing. This example configures a canary strategy with multiple steps and specifies the HTTPRoute and namespace for traffic management. ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: rollouts-demo spec: replicas: 5 strategy: canary: canaryService: argo-rollouts-canary-service stableService: argo-rollouts-stable-service trafficRouting: plugins: argoproj-labs/gatewayAPI: httpRoute: argo-rollouts-http-route namespace: default steps: - setWeight: 30 - pause: {} - setWeight: 40 - pause: { duration: 10 } - setWeight: 60 - pause: { duration: 10 } - setWeight: 80 - pause: { duration: 10 } revisionHistoryLimit: 2 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 ``` -------------------------------- ### Install Traefik with Gateway Support Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/traefik/README.md Installs Traefik using Helm, enabling the Kubernetes Gateway API provider and the ingress route dashboard. Ensure Traefik is installed in the 'traefik' namespace. ```shell helm repo add traefik https://traefik.github.io/charts helm repo update helm install traefik traefik/traefik --set experimental.kubernetesGateway.enabled=true --set providers.kubernetesGateway.enabled=true --set ingressRoute.dashboard.enabled=true --version v32.0.0 --namespace=traefik --create-namespace ``` -------------------------------- ### Install Gateway API CRDs Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Installs the standard Gateway API Custom Resource Definitions required by Istio. Use the --server-side=true and --force-conflicts flags for proper installation. ```bash kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.4.0/standard-install.yaml --server-side=true --force-conflicts ``` -------------------------------- ### Setup IAM Permissions for VPC Lattice Controller Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Downloads a recommended inline policy, creates an IAM policy named VPCLatticeControllerIAMPolicy, and exports its ARN. ```bash curl https://raw.githubusercontent.com/aws/aws-application-networking-k8s/main/files/controller-installation/recommended-inline-policy.json -o recommended-inline-policy.json aws iam create-policy \ --policy-name VPCLatticeControllerIAMPolicy \ --policy-document file://recommended-inline-policy.json export VPCLatticeControllerIAMPolicyArn=$(aws iam list-policies --query 'Policies[?PolicyName==`VPCLatticeControllerIAMPolicy`].Arn' --output text) ``` -------------------------------- ### GRPCRoute Rollout Example Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/RELEASE_NOTES.md This integration test demonstrates the new header-based routing behavior for GRPCRoutes with the Gateway API plugin. ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: example-rollout spec: template: metadata: labels: app: myapp strategy: canary: steps: - setWeight: 50 - pause: { duration: 10m } ingressRef: group: gateway.networking.k8s.io kind: GRPCRoute name: example-grpcroute # ... other rollout spec fields ``` -------------------------------- ### Install Linkerd and Gateway API Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/linkerd-header-based/README.md Installs Linkerd and the Gateway API CRDs. Ensure Linkerd version compatibility with Gateway API APIVersion. ```shell export LINKERD2_VERSION=edge-25.9.4; curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install-edge | sh export PATH=$PATH:$HOME/.linkerd2/bin kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.1/standard-install.yaml # Gateway API CRDs must be installed prior to installing Linkerd linkerd install --crds | kubectl apply -f - linkerd install | kubectl apply -f - && linkerd check linkerd viz install | kubectl apply -f - && linkerd check ``` -------------------------------- ### Run Unit Tests Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Executes all unit tests for the project. Ensure you have the necessary build tools installed. ```bash make unit-tests ``` -------------------------------- ### Application Configuration File Format Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/features/advanced-deployments.md This is an example of the file format for application configuration, specifically RabbitMQ settings, as made available by the Kubernetes Downward API. The application code needs to read this file to adjust its behavior based on whether it's running as a canary or stable instance. ```text role="preview" rabbitHost=localhost rabbitPort=5672 rabbitQueue=myProductionQueue ``` -------------------------------- ### Deploy Kong Ingress with Helm Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/kong/README.md Install Kong Ingress using Helm, disabling CRD installation and enabling Gateway API support. ```shell helm repo add kong https://charts.konghq.com helm repo update # Helm 3 helm install kong/kong --generate-name --set ingressController.installCRDs=false -n kong --create-namespace ``` -------------------------------- ### Define HTTPRoute for Traffic Splitting Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium/README.md Create an HTTPRoute to define traffic routing rules. This example directs traffic for 'demo.example.com' to either a stable or canary service. ```yaml kind: HTTPRoute apiVersion: gateway.networking.k8s.io/v1beta1 metadata: name: argo-rollouts-http-route spec: parentRefs: - kind: Gateway name: cilium hostnames: - "demo.example.com" rules: - matches: - path: type: PathPrefix value: / backendRefs: - name: argo-rollouts-stable-service kind: Service port: 80 - name: argo-rollouts-canary-service kind: Service port: 80 ``` -------------------------------- ### Install Cilium with Gateway API Enabled Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium-header-based/README.md Installs Cilium using Helm, enabling the Gateway API integration. This command configures Cilium for Kubernetes IPAM and replaces kube-proxy. ```shell helm repo add cilium https://helm.cilium.io/ helm repo update helm install cilium cilium/cilium --version 1.18.2 \ --namespace kube-system \ --set image.pullPolicy=IfNotPresent \ --set ipam.mode=kubernetes \ --set cni.exclusive=false \ --set kubeProxyReplacement=true \ --set gatewayAPI.enabled=true \ --wait cilium status --wait ``` -------------------------------- ### Verify Istio Installation Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Checks if the Istio control plane ('istiod') is running in the 'istio-system' namespace. ```bash kubectl get pods -n istio-system ``` -------------------------------- ### Run Argo Rollouts Controller Locally Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Starts the Argo Rollouts controller locally. This is necessary for the controller to find and run your local plugin build. ```bash cd ~/go/src/github.com/argoproj/argo-rollouts go run ./cmd/rollouts-controller/main.go ``` -------------------------------- ### Set up Environment Variables for Lattice Gateway API Controller Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Configure essential environment variables required for the Lattice Gateway API Controller setup. Replace placeholders with your AWS account and cluster details. ```bash export AWS_REGION= export CLUSTER_NAME= export ACCOUNT_ID= export EKSVPC= export LATTICE_SVC_NET= ``` -------------------------------- ### Argo Rollouts Controller Log Output Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/installation.md Example log output from the Argo Rollouts controller indicating successful plugin download. This confirms the plugin is being loaded. ```text time="XXX" level=info msg="Downloading plugin argoproj-labs/gatewayAPI from: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/v0.4.0/gatewayapi-plugin-linux-amd64" time="YYY" level=info msg="Download complete, it took 7.792426599s" ``` -------------------------------- ### Create Gateway Object Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium/README.md Define a Gateway resource to manage network traffic. This example configures an HTTP listener that allows traffic from all namespaces. ```yaml kind: Gateway apiVersion: gateway.networking.k8s.io/v1beta1 metadata: name: cilium spec: gatewayClassName: cilium listeners: - name: http protocol: HTTP port: 80 allowedRoutes: namespaces: from: All ``` -------------------------------- ### Gateway API HTTPRoute Example Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/quick-start.md This snippet shows a typical Gateway API HTTPRoute configuration with two backend services, `argo-rollouts-stable-service` and `argo-rollouts-canary-service`, each receiving 50% of the traffic. It includes path matching for the root path. ```yaml [...snip...] spec: parentRefs: - group: gateway.networking.k8s.io kind: Gateway name: eg rules: - backendRefs: - group: "" kind: Service name: argo-rollouts-stable-service port: 80 weight: 50 - group: "" kind: Service name: argo-rollouts-canary-service port: 80 weight: 50 matches: - path: type: PathPrefix value: / [...snip...] ``` -------------------------------- ### Install Argo Rollouts with Gateway API Plugin Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium-header-based/README.md Deploys Argo Rollouts and configures it to use the Gateway API traffic router plugin. Ensure the plugin version and architecture match your cluster. ```shell helm repo add argo https://argoproj.github.io/argo-helm helm repo update helm install argo-rollouts argo/argo-rollouts --version 2.40.4 \ --namespace argo-rollouts \ --create-namespace \ --set 'controller.trafficRouterPlugins[0].location=https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/v0.8.0/gatewayapi-plugin-linux-amd64' \ --set 'controller.trafficRouterPlugins[0].name=argoproj-labs/gatewayAPI' ``` -------------------------------- ### Deploy kgateway CRDs with Helm Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/kgateway/README.md Install the kgateway Custom Resource Definitions using Helm. This command also creates the kgateway-system namespace. ```shell helm upgrade -i --create-namespace \ --namespace kgateway-system \ --version v2.2.2 kgateway-crds oci://cr.kgateway.dev/kgateway-dev/charts/kgateway-crds ``` -------------------------------- ### Run End-to-End Tests Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Executes end-to-end tests, which involve creating a temporary Kubernetes cluster, running tests, and then cleaning up. Requires kind and docker to be installed. ```bash make e2e-tests ``` -------------------------------- ### Watch Rollout Promotion Progress Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/agentgateway/README.md Monitor the progress of a rollout promotion in real-time using the Argo Rollouts kubectl plugin. Ensure the plugin is installed before running this command. ```shell kubectl argo rollouts get rollout rollouts-demo -n argo-rollouts --watch ``` -------------------------------- ### Argo Rollouts CLI Commands Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Common commands for managing Argo Rollouts using the kubectl plugin, including getting status, promoting, aborting, and retrying rollouts. ```bash # Get rollout status kubectl argo rollouts get rollout rollouts-demo ``` ```bash # Promote a paused rollout to the next step kubectl argo rollouts promote rollouts-demo ``` ```bash # Abort a rollout and revert to stable kubectl argo rollouts abort rollouts-demo ``` ```bash # Retry a failed rollout kubectl argo rollouts retry rollout rollouts-demo ``` ```bash # Watch rollout progress in real-time kubectl argo rollouts get rollout rollouts-demo --watch ``` ```bash # Verify HTTPRoute weights during canary kubectl get httproute argo-rollouts-http-route -o yaml ``` ```bash # Restart Argo Rollouts controller after plugin installation kubectl rollout restart deployment -n argo-rollouts argo-rollouts ``` ```bash # Verify discovered routes with label selector kubectl get httproutes -n default -l app=my-app,canary-enabled=true ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Builds and serves the project's documentation locally using Docker. This allows you to preview documentation changes before committing them. ```shell make serve-docs ``` -------------------------------- ### Deploy Gateway Class Configuration Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Downloads and applies the Gateway Class configuration file. ```bash wget https://raw.githubusercontent.com/aws/aws-application-networking-k8s/main/files/controller-installation/gatewayclass.yaml kubectl create -f gatewayclass.yaml ``` -------------------------------- ### Deploy Applications Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Deploy the frontend, product catalog, and proddetail rollout. Ensure the AGG_APP_URL variable in prodcatalogdep.yaml is set to the correct domain name. ```bash # Note: Take the domain name of latcan-app-default, as in output of $latcanFQDN and put into the variable of prodcatalogdep.yaml file AGG_APP_URL value kubectl create -f frontenddep.yaml kubectl create -f frontendsvc.yaml kubectl create -f prodcatalogdep.yaml kubectl create -f prodcatalogsvc.yaml kubectl create -f proddetail-rollout.yaml ``` -------------------------------- ### Promote Rollout Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/quick-start.md Execute this command to advance the canary deployment to the next stage, gradually shifting more traffic to the new version. ```bash kubectl argo rollouts promote rollouts-demo ``` -------------------------------- ### Continuously Test Traffic During Rollout Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/envoygateway/README.md Run this command in a loop to observe traffic distribution between v1 and v2 as the rollout progresses. You should see responses alternating between the two versions. ```shell while true; do curl -H "host: demo.example.com" $GATEWAY_IP/callme; done ``` -------------------------------- ### Apply HTTPRoute and Service Definitions Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/envoygateway/README.md Applies the httproute.yaml, stable.yaml, and canary.yaml files to create the HTTPRoute and backend Service resources. ```shell kubectl apply -f httproute.yaml kubectl apply -f stable.yaml kubectl apply -f canary.yaml ``` -------------------------------- ### Basic Rollout with HTTPRoute Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Configure a basic Argo Rollout resource to use the Gateway API plugin for canary deployments with weight-based traffic splitting. ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: rollouts-demo namespace: default spec: replicas: 10 strategy: canary: canaryService: argo-rollouts-canary-service stableService: argo-rollouts-stable-service trafficRouting: plugins: argoproj-labs/gatewayAPI: httpRoute: argo-rollouts-http-route namespace: default steps: - setWeight: 30 - pause: {} - setWeight: 60 - pause: { duration: 10 } - setWeight: 80 - pause: { duration: 10 } revisionHistoryLimit: 2 selector: matchLabels: app: rollouts-demo template: metadata: labels: app: rollouts-demo spec: containers: - name: rollouts-demo image: argoproj/rollouts-demo:blue ports: - name: http containerPort: 8080 protocol: TCP resources: requests: memory: 32Mi cpu: 5m ``` -------------------------------- ### Configure Plugin Arguments Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Configure Kubernetes client QPS and burst settings for large clusters by passing arguments to the plugin within the ConfigMap. ```yaml apiVersion: v1 kind: ConfigMap metadata: name: argo-rollouts-config namespace: argo-rollouts data: trafficRouterPlugins: |- - name: "argoproj-labs/gatewayAPI" location: "https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/releases/download/vX.X.X/gatewayapi-plugin-linux-amd64" args: - "-kubeClientQPS=40" - "-kubeClientBurst=80" ``` -------------------------------- ### Install Gateway API CRDs Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/grpcroute/README.md Apply the Gateway API CRDs using kubectl. Ensure you are using a compatible version. ```bash kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.6.1/standard-install.yaml ``` -------------------------------- ### Apply Gateway API CRDs Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/nginx/README.md Installs the Gateway API Custom Resource Definitions required for managing gateway resources. ```bash kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.0/standard-install.yaml ``` -------------------------------- ### Install Gateway API CRDs Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium/README.md Apply the necessary Custom Resource Definitions for the Gateway API. Ensure you are using a compatible version. ```shell kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v0.7.0/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v0.7.0/config/crd/standard/gateway.networking.k8s.io_gateways.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v0.7.0/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v0.7.0/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v0.7.0/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml ``` -------------------------------- ### TCPRoute for Canary Deployments Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Configure TCPRoute for canary deployments of TCP-based services. This example routes traffic to both stable and canary services. ```yaml apiVersion: gateway.networking.k8s.io/v1alpha2 kind: TCPRoute metadata: name: first-tcproute namespace: default spec: parentRefs: - name: traefik-gateway sectionName: tcp namespace: default kind: Gateway rules: - backendRefs: - name: argo-rollouts-stable-service port: 80 - name: argo-rollouts-canary-service port: 80 --- 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 namespace: default 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 ``` -------------------------------- ### Observe Rollout Status and HTTPRoute Rules Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium-header-based/README.md Promote a rollout and inspect the current status and the associated HTTPRoute rules. This helps in understanding how traffic is being split between stable and canary services. ```shell $ kubectl argo rollouts promote rollouts-demo # promote to Rollout step 1 $ kubectl argo rollouts get rollout rollouts-demo Name: rollouts-demo Namespace: default Status: ॥ Paused Message: CanaryPauseStep Strategy: Canary Step: 3/5 SetWeight: 0 ActualWeight: 0 Images: hashicorp/http-echo:1.0 (canary, stable) Replicas: Desired: 5 Current: 6 Updated: 1 Ready: 6 Available: 6 NAME KIND STATUS AGE INFO ⟳ rollouts-demo Rollout ॥ Paused 114s ├──# revision:2 │ └──⧉ rollouts-demo-7bd564d79f ReplicaSet ✔ Healthy 23s canary │ └──□ rollouts-demo-784858d6db-tshpg Pod ✔ Running 6s ready:1/1 └──# revision:1 └──⧉ rollouts-demo-784858d6db ReplicaSet ✔ Healthy 114s stable ├──□ rollouts-demo-784858d6db-d799l Pod ✔ Running 114s ready:1/1 ├──□ rollouts-demo-784858d6db-hh44q Pod ✔ Running 114s ready:1/1 ├──□ rollouts-demo-784858d6db-nf2wh Pod ✔ Running 114s ready:1/1 ├──□ rollouts-demo-784858d6db-qn7dc Pod ✔ Running 114s ready:1/1 └──□ rollouts-demo-784858d6db-ww2q5 Pod ✔ Running 114s ready:1/1 $ $ kubectl get httproute argo-rollouts-http-route -o yaml | yq .spec.rules - backendRefs: - group: "" kind: Service name: argo-rollouts-stable-service port: 80 weight: 100 - group: "" kind: Service name: argo-rollouts-canary-service port: 80 weight: 0 matches: - path: type: PathPrefix value: "/" - backendRefs: - group: "" kind: Service name: argo-rollouts-canary-service port: 80 weight: 0 matches: - headers: - name: X-Test type: Exact value: test path: type: PathPrefix value: "/" ``` -------------------------------- ### Get Gateway IP Address Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium/README.md Retrieve the IP address assigned to the created Gateway resource. This is useful for external access or further configuration. ```shell kubectl get gateway cilium -o=jsonpath="{.status.addresses[0].value}" ``` -------------------------------- ### Get Rollout Status Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/quick-start.md Use this command to check the current status of your rollout, particularly useful for observing when a canary deployment has paused. ```bash kubectl argo rollouts get rollout rollouts-demo ``` -------------------------------- ### Test Application via Browser Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/agentgateway/README.md Access the application locally through a web browser after port-forwarding the Gateway service. ```shell http://localhost:8080 ``` -------------------------------- ### Get HTTPRoute Configuration Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/agentgateway/README.md Retrieve the YAML configuration of the HTTPRoute resource associated with the rollout. This helps in inspecting the current traffic routing settings. ```shell kubectl get httproute argo-rollouts-http-route -o yaml -n argo-rollouts ``` -------------------------------- ### Monitor Rollout with Watch Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Continuously monitor the status of the `rollouts-demo` rollout using the `watch` command. This is useful for observing traffic shifts and rollout progress in real-time. ```bash watch kubectl argo rollouts get rollout rollouts-demo ``` -------------------------------- ### Create Pre-Release Tag Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Use this command to create a Git tag for a pre-release (release candidate). Ensure the tag format matches 'release-vX.Y.Z-rcN'. ```bash git tag release-v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ ``` -------------------------------- ### GatewayClass and Gateway Setup Source: https://context7.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/llms.txt Define the GatewayClass and Gateway resources required for the Argo Rollouts Gateway API Plugin to manage traffic routing. ```yaml apiVersion: gateway.networking.k8s.io/v1beta1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller --- apiVersion: gateway.networking.k8s.io/v1beta1 kind: Gateway metadata: name: eg namespace: default spec: gatewayClassName: eg listeners: - name: http protocol: HTTP port: 80 ``` -------------------------------- ### Create Gateway Resources Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/aws-gateway-api-controller-lattice/README.md Create Gateway, HTTPRoute, and related service resources for your application. The VPC Lattice generated DNS address for the HTTPRoute is outputted. ```bash kubectl create -f gateway.yaml kubectl create -f httproute.yaml kubectl create -f proddetails-lat-svc.yaml kubectl create -f proddetail-tgp.yaml # Check VPC Lattice generated DNS Address for HTTPRoute 'latcan-app-default'. Lattice provide the name of lattice service as httproutename-namespace, hence latcan-app-default latcanFQDN=$(kubectl get httproute latcan-app-default -o json | jq -r '.metadata.annotations."application-networking.k8s.aws/lattice-assigned-domain-name') echo $latcanFQDN ``` -------------------------------- ### Define HTTPRoute for Always New Version Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/features/advanced-deployments.md This HTTPRoute directs all traffic for 'new.example.com' to the canary service, allowing bleeding-edge users to access the new version immediately. ```yaml --- kind: HTTPRoute apiVersion: gateway.networking.k8s.io/v1beta1 metadata: name: always-new-version namespace: default spec: parentRefs: - name: eg hostnames: - new.example.com rules: - matches: - path: type: PathPrefix value: "/" backendRefs: - name: argo-rollouts-canary-service kind: Service port: 80 ``` -------------------------------- ### Define HTTPRoute for Traffic Splitting Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/envoygateway/README.md Creates an HTTPRoute resource that directs traffic for "demo.example.com/" to two backend services: argo-rollouts-stable-service and argo-rollouts-canary-service. This enables traffic splitting. ```yaml kind: HTTPRoute apiVersion: gateway.networking.k8s.io/v1beta1 metadata: name: argo-rollouts-http-route namespace: default spec: parentRefs: - name: eg hostnames: - "demo.example.com" rules: - matches: - path: type: PathPrefix value: / backendRefs: - name: argo-rollouts-stable-service kind: Service port: 80 - name: argo-rollouts-canary-service kind: Service port: 80 ``` -------------------------------- ### Get External IP of Istio Gateway Service Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Retrieve the external IP address of the `istio-gateway-istio` service. This IP can be used to access the deployed application in your browser. ```bash kubectl get svc istio-gateway-istio ``` -------------------------------- ### Promote Canary to Next Step Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Manually promote the `rollouts-demo` canary deployment to the next step in its defined strategy. This command is used to advance the rollout after manual verification or at a pause point. ```bash kubectl argo rollouts promote rollouts-demo ``` -------------------------------- ### Install Gateway API CRDs Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/cilium-header-based/README.md Applies the necessary Custom Resource Definitions for the Kubernetes Gateway API. Ensure you are using a compatible version of Cilium and Gateway API. ```shell kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.0/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.0/config/crd/standard/gateway.networking.k8s.io_gateways.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.0/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.0/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/v1.2.0/config/crd/standard/gateway.networking.k8s.io_grpcroutes.yaml ``` -------------------------------- ### Create Release Tag Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/CONTRIBUTING.md Use this command to create a Git tag for a stable release. Ensure the tag format matches 'release-vX.Y.Z'. ```bash git tag release-v[0-9]+.[0-9]+.[0-9]+ ``` -------------------------------- ### Restart Argo Rollouts Controller Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/installation.md Restart the Argo Rollouts controller deployment to apply the plugin configuration. This command ensures the controller detects the newly installed plugin. ```bash kubectl rollout restart deployment -n argo-rollouts argo-rollouts ``` -------------------------------- ### Apply the Rollout Manifest Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/examples/istio/README.md Use kubectl to apply the Rollout configuration to your Kubernetes cluster. Ensure the `rollout.yml` file is in your current directory. ```bash kubectl apply -f rollout.yml ``` -------------------------------- ### Define HTTPRoute for Always Stable Version Source: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/docs/features/advanced-deployments.md This HTTPRoute ensures that traffic to 'old.example.com' exclusively goes to the stable service, effectively pinning these users to the previous version. ```yaml --- kind: HTTPRoute apiVersion: gateway.networking.k8s.io/v1beta1 metadata: name: always-old-version namespace: default spec: parentRefs: - name: eg hostnames: - old.example.com rules: - matches: - path: type: PathPrefix value: "/" backendRefs: - name: argo-rollouts-stable-service kind: Service port: 80 ```