Skip to content

Latest commit

 

History

History
101 lines (83 loc) · 2.98 KB

File metadata and controls

101 lines (83 loc) · 2.98 KB

About Openshift Route

An OpenShift Container Platform route exposes a service at a host name, such as www.example.com, so that external clients can reach it by name.

Routes can be either secured or unsecured. Secure routes provide the ability to use several types of TLS termination to serve certificates to the client.

How to integrate Openshift Routes with Argo Rollouts

NOTES:

1. The file as follows (and the codes in it) just for illustrative purposes only, please do not use directly!!!

2. The argo-rollouts >= v1.7.0-rc1

Steps:

  1. Run the yaml/rbac.yaml to add the role for operate on the Openshift Route.
  2. Build this plugin.
  3. Put the plugin somewhere & mount on to the argo-rollouts container (please refer to the example YAML below to modify the deployment):
apiVersion: apps/v1
kind: Deployment
metadata:
  name: argo-rollouts
  namespace: argo-rollouts
spec:
  template:
    spec:
      ...
      volumes:
        ...
         - name: openshift-route-plugin
           hostPath:
             path: /CHANGE-ME/rollouts-plugin-trafficrouter-openshift
             type: ''
      containers:
        - name: argo-rollouts
        ...
          volumeMounts:
             - name: openshift-route-plugin
               mountPath: /CHANGE-ME/rollouts-plugin-trafficrouter-openshift
  1. Create a ConfigMap to let argo-rollouts know the plugin's location:
apiVersion: v1
kind: ConfigMap
metadata:
  name: argo-rollouts-config
  namespace: argo-rollouts
data:
  trafficRouterPlugins: |-
    - name: "argoproj-labs/openshift"
      location: "file://CHANGE-ME/rollouts-trafficrouter-openshift/openshift-route-plugin"
binaryData: {}
  1. Create the CR/Rollout and put it into the operated services` namespace:
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
  namespace: rollouts-demo
spec:
    replicas: 2
    selector:
        matchLabels:
        app.kubernetes.io/instance: rollouts-demo
    strategy:
        canary:
        canaryService: canaryService
        stableService: stableService
        steps:
            - setWeight: 30
            - pause:
                duration: 10
        trafficRouting:
            plugins:
            argoproj-labs/openshift:
                routes:
                - rollouts-demo
                namespace: rollouts-demo
    workloadRef:
        apiVersion: apps/v1
        kind: Deployment
        name: canary
  1. Enjoy It.

Contributing

Thanks for taking the time to join our community and start contributing!