Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 2.6 KB

getting_started.md

File metadata and controls

77 lines (53 loc) · 2.6 KB

Getting Started

Install the Operator

Install the operator using one of the two steps mentioned below.

Alternatively, if you are a developer looking to run operator locally or build a new version of operator for your changes, please follow the steps mentioned in developer guide.

Deploy RolloutManager

It is recommended to start with basic RolloutManager configuration.

Apply

kubectl apply -f examples/basic_rolloutmanager.yaml

This will create the rollout controller and related resources such as serviceaccount, roles, rolebinding, deployment, service, secret and others.

You can check if the above mentioned resources are created by running the below command.

kubectl get all

If you would like to understand the siginificance of each rollout controller resource created by the operator, please go through the official rollouts controller docs.

Namespace Scoped Rollouts Instance

A namespace-scoped Rollouts instance can manage Rollouts resources of same namespace it is deployed into. To deploy a namespace-scoped Rollouts instance set spec.namespaceScoped field to true.

apiVersion: argoproj.io/v1alpha1
kind: RolloutManager
metadata:
  name: argo-rollout
spec:
  namespaceScoped: true

Cluster Scoped Rollouts Instance

A cluster-scoped Rollouts instance can manage Rollouts resources from other namespaces as well. To install a cluster-scoped Rollouts instance first you need to add NAMESPACE_SCOPED_ARGO_ROLLOUTS and CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES environment variables in subscription resource. If NAMESPACE_SCOPED_ARGO_ROLLOUTS is set to false then only you are allowed to create a cluster-scoped instance and then you need to provide list of namespaces that are allowed host a cluster-scoped Rollouts instance via CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES environment variable.

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: argo-operator
spec:
  config:
   env: 
    - name: NAMESPACE_SCOPED_ARGO_ROLLOUTS
      value: 'false'   
    - name: CLUSTER_SCOPED_ARGO_ROLLOUTS_NAMESPACES
      value: <list of namespaces of cluster-scoped Argo CD instances>
  (...)

Now set spec.namespaceScoped field to false to create a Rollouts instance.

apiVersion: argoproj.io/v1alpha1
kind: RolloutManager
metadata:
  name: argo-rollout
spec:
  namespaceScoped: false