Coder Social home page Coder Social logo

rhrmo / cluster-storage-operator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/cluster-storage-operator

0.0 0.0 0.0 42.62 MB

Operator that sets OCP cluster wide storage defaults

License: Apache License 2.0

Shell 0.43% Go 98.38% Makefile 0.69% Dockerfile 0.50%

cluster-storage-operator's Introduction

cluster-storage-operator

Operator that sets OCP cluster-wide storage defaults.

Ensures a default storage class exists for OCP clusters, like the addon-manager does for kubernetes clusters. Supports AWS and OpenStack. No configuration is required. The created storage class can be made non-default by editing its annotation but cannot be deleted so long as the operator runs.

Will also ensure default CSI volume plugins are installed in a future release when CSI plugins replace in-tree ones (see csi-operator).

Quick start - running CSO from local workstation

Scale down current CVO and CSO

# Set kubeconfig for connection to existing cluster
export KUBECONFIG=<path-to-kubeconfig>

# Scale down CVO and CSO
oc scale --replicas=0 deploy/cluster-version-operator -n openshift-cluster-version  
oc scale --replicas=0 deploy/cluster-storage-operator -n openshift-cluster-storage-operator

Configure required environment variables

# Set operator and operand image version (this is just a marker for missing version, we assume that operators handle version detection themselves)
export OPERATOR_IMAGE_VERSION="0.0.1-snapshot"
export OPERAND_IMAGE_VERSION=$OPERATOR_IMAGE_VERSION

# Set common environment variables (CCMO and sidecars)
export CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE=quay.io/openshift/origin-cluster-cloud-controller-manager-operator:latest
export PROVISIONER_IMAGE=quay.io/openshift/origin-csi-external-provisioner:latest  
export ATTACHER_IMAGE=quay.io/openshift/origin-csi-external-attacher:latest 
export RESIZER_IMAGE=quay.io/openshift/origin-csi-external-resizer:latest  
export SNAPSHOTTER_IMAGE=quay.io/openshift/origin-csi-external-snapshotter:latest  
export NODE_DRIVER_REGISTRAR_IMAGE=quay.io/openshift/origin-csi-node-driver-registrar:latest  
export LIVENESS_PROBE_IMAGE=quay.io/openshift/origin-csi-livenessprobe:latest  
export KUBE_RBAC_PROXY_IMAGE=quay.io/openshift/origin-kube-rbac-proxy:latest  

Configure provider specific variables

Note that each provider requires different env variables to be set. Inspect their respective asset files to see what variables are needed and then find which env variables are used to replace them. Example with AWS EBS: see the asset file here and replacements here.

  • AWS EBS operator example:

    export AWS_EBS_DRIVER_IMAGE=quay.io/openshift/origin-aws-ebs-csi-driver
    export AWS_EBS_DRIVER_OPERATOR_IMAGE=quay.io/openshift/origin-aws-ebs-csi-driver-operator
  • Azure Disk and Azure File operator example:

    export AZURE_DISK_DRIVER_OPERATOR_IMAGE=quay.io/openshift/origin-azure-disk-csi-driver-operator:latest
    export AZURE_FILE_DRIVER_OPERATOR_IMAGE=quay.io/openshift/origin-azure-file-csi-driver-operator:latest
    export AZURE_DISK_DRIVER_IMAGE=quay.io/openshift/origin-azure-disk-csi-driver:latest
    export AZURE_FILE_DRIVER_IMAGE=quay.io/openshift/origin-azure-file-csi-driver:latest 

Build and run CSO locally

# Build the operator (can be run before exporting variables)
make

# OPTIONAL - delete existing CSO lock
oc -n openshift-cluster-storage-operator delete lease/cluster-storage-operator-lock

# Run the operator via CLI
./cluster-storage-operator start --kubeconfig $KUBECONFIG --namespace openshift-cluster-storage-operator

cluster-storage-operator's People

Contributors

openshift-merge-robot avatar jsafrane avatar gnufied avatar bertinatto avatar openshift-merge-bot[bot] avatar wongma7 avatar romanbednar avatar dobsonj avatar openshift-ci[bot] avatar huffmanca avatar csrwng avatar fedosin avatar mpatlasov avatar eggfoobar avatar sjenning avatar deads2k avatar coreydaley avatar elbehery avatar gabemontero avatar qjkee avatar smarterclayton avatar guillaumerose avatar mandre avatar tjungblu avatar vr4manta avatar xueqzhan avatar openshift-art-build-bot avatar ravisantoshgudimetla avatar openshift-bot avatar rcmadhankumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.