Skip to content

Commit ebade7a

Browse files
committed
RHDEVDOCS-5562: Creating content for Adding OpenShift Routes as a traffic manager for Argo Rollouts
1 parent 6baef80 commit ebade7a

4 files changed

+151
-0
lines changed

argo_rollouts/using-argo-rollouts-for-progressive-deployment-delivery.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ include::modules/gitops-creating-rolloutmanager-custom-resource.adoc[leveloffset
3636
// Deleting a RolloutManager custom resource
3737
include::modules/gitops-deleting-rolloutmanager-custom-resource.adoc[leveloffset=+1]
3838

39+
// Adding OpenShift Routes as a traffic manager for Argo Rollouts
40+
include::modules/con_adding-openshift-routes-as-a-traffic-manager-for-argo-rollouts.adoc[leveloffset=+1]
41+
42+
[role="_additional-resources"]
43+
[id="additional-resources_argo_rollouts"]
44+
== Additional resources
45+
xref:../argo_rollouts/proc_installing-the-rollout-manager-plugin.adoc#proc_installing-the-rollout-manager-plugin[Create a RolloutManager custom resource]
46+
47+
// Installing the rollout-manager Operator
48+
// include::modules/proc_installing-the-rollout-manager-operator.adoc[leveloffset=+2]
49+
50+
// Installing the rollout-manager plugin
51+
include::modules/proc_installing-the-rollout-manager-plugin.adoc[leveloffset=+2]
52+
3953
[role="_additional-resources"]
4054
[id="additional-resources_argo-rollouts-in-gitops"]
4155
== Additional resources
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id="adding-openshift-routes-as-a-traffic-manager-for-argo-rollouts_{context}"]
4+
= Adding OpenShift Routes as a traffic manager for Argo Rollouts
5+
6+
With traffic management, a user can modify the amount of traffic to direct it to various applications in a cluster environment. Users can choose to reduce or increase the traffic based on their requirements.
7+
8+
By enabling routes as traffic managers, a user using OpenShift in their environment ensures that new changes roll out adequately to all the cluster applications, enabling progressive delivery.
9+
10+
You can use Openshift Route as a plugin and automatically install the plugin with the `RolloutManager` custom resource (CR).
11+
12+
[discrete]
13+
== About OpenShift routes
14+
15+
An link:https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html[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.
16+
17+
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.
18+
19+
To install the rollout-manager, you must:
20+
21+
* Create a RolloutManager custom resource
22+
* Install the rollout-manager plugin
23+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="installing-the-rollout-manager-operator_{context}"]
3+
= Installing the rollout-manager Operator
4+
5+
You can install the `rollout-manager` Operator by defining the namespace and using the `Deploy` Operator.
6+
7+
.Prerequisites
8+
9+
* The `cluster-admin` cluster role must be assigned to the user.
10+
11+
.Procedure
12+
13+
. Defining the namespace - By default, the `rollout-manager` Operator is installed in the `argo-rollouts-manager-system` namespace. To modify the `rollout-manager` Operator, update the value of the `namespace` specified in the `config/default/kustomization.yaml` file.
14+
15+
. Using the `Deploy` Operator - Deploy the `rollout-manager`:
16+
+
17+
[source,terminal]
18+
----
19+
make deploy
20+
----
21+
22+
. After the `rollout-manager` Operator is installed, you can use this Operator with the following configuration.
23+
+
24+
[source,terminal]
25+
----
26+
apiVersion: argoproj.io/v1alpha1
27+
kind: RolloutManager
28+
metadata:
29+
name: rollout-manager
30+
labels:
31+
example: basic
32+
spec: {}
33+
----
34+
35+
. Add the following configuration to a YAML file:
36+
+
37+
[source,terminal]
38+
----
39+
kubectl apply -f <path_to_file>
40+
----
41+
+
42+
The rollout controller is created.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="installing-the-rollout-manager-plugin_{context}"]
3+
= Installing the rollout-manager plugin
4+
5+
Once the rollout controller is created, you must install the rollout-manager plugin.
6+
7+
.Prerequisites
8+
9+
* The `cluster-admin` cluster role must be assigned to the user.
10+
11+
.Procedure
12+
13+
. Run the `yaml/rbac.yaml` file to add the role for running the required operations on the Openshift Route and build this plugin.
14+
15+
. Save this plugin in your local system and mount it on the argo-rollouts container:
16+
17+
.. Apply the rbac permissions:
18+
+
19+
[source,terminal]
20+
----
21+
kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/rollouts-plugin-trafficrouter-openshift/main/yaml/rbac.yaml
22+
----
23+
24+
.. Optional: Update the ConfigMap argo-rollouts-config to provide an external location for the custom binary of the plugin.
25+
+
26+
[source,terminal]
27+
----
28+
apiVersion: v1
29+
kind: ConfigMap
30+
metadata:
31+
name: argo-rollouts-config
32+
namespace: argo-rollouts
33+
data:
34+
trafficRouterPlugins: |-
35+
- name: "argoproj-labs/openshift"
36+
location: "file://CHANGE-ME/rollouts-trafficrouter-openshift/openshift-route-plugin"
37+
binaryData: {}
38+
----
39+
40+
.. Create the CR/Rollout and add it into the operated services namespace:
41+
+
42+
[source,terminal]
43+
----
44+
apiVersion: argoproj.io/v1alpha1
45+
kind: Rollout
46+
metadata:
47+
name: rollouts-demo
48+
namespace: rollouts-demo
49+
spec:
50+
replicas: 2
51+
selector:
52+
matchLabels:
53+
app.kubernetes.io/instance: rollouts-demo
54+
strategy:
55+
canary:
56+
canaryService: canaryService
57+
stableService: stableService
58+
steps:
59+
- setWeight: 30
60+
- pause:
61+
duration: 10
62+
trafficRouting:
63+
plugins:
64+
argoproj-labs/openshift:
65+
routes:
66+
- rollouts-demo
67+
namespace: rollouts-demo
68+
workloadRef:
69+
apiVersion: apps/v1
70+
kind: Deployment
71+
name: canary
72+
----

0 commit comments

Comments
 (0)