Giter VIP home page Giter VIP logo

cluster-version-operator's Introduction

Cluster Version Operator

The Cluster Version Operator (CVO) is one of the Cluster Operators that run in every OpenShift cluster. CVO consumes an artifact called a "release payload image," which represents a specific version of OpenShift. The release payload image contains the resource manifests necessary for the cluster to function, like all Cluster Operator ones. CVO reconciles the resources within the cluster to match the manifests in the release payload image. As a result, CVO implements cluster upgrades. After being provided a release payload image for a newer OpenShift version, CVO reconciles all Cluster Operators to their updated versions, and Cluster Operators similarly update their operands.

OpenShift Upgrades

For information about upgrading OpenShift clusters, please see the respective documentation:

ClusterVersion Resource

Like other Cluster Operators, the Cluster Version Operator is configured by a Config API resource in the cluster: a ClusterVersion:

$ oc explain clusterversion
  KIND:     ClusterVersion
  VERSION:  config.openshift.io/v1

  DESCRIPTION:
       ClusterVersion is the configuration for the ClusterVersionOperator. This is
       where parameters related to automatic updates can be set. Compatibility
       level 1: Stable within a major release for a minimum of 12 months or 3
       minor releases (whichever is longer).

  FIELDS:
     ...
     spec	<Object> -required-
       spec is the desired state of the cluster version - the operator will work
       to ensure that the desired version is applied to the cluster.

     status	<Object>
       status contains information about the available updates and any in-progress
       updates.

ClusterVersion resource follows the established Kubernetes pattern where the spec property describes the desired state that CVO should achieve and maintain, and the status property is populated by the CVO to describe its status and the observed state.

In a typical OpenShift cluster, there will be a cluster-scoped ClusterVersion resource called version:

$ oc get clusterversion version
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.17   True        False         6d5h    Cluster version is 4.11.17

Note that as a user or a cluster administrator, you usually do not interact with the ClusterVersion resource directly but via either the oc adm upgrade CLI or the web console.

Understanding Upgrades

๐Ÿ’ก This section is only a high-level overview. See the Update Process and Reconciliation documents in the dev-guide for more details.

The Cluster Version Operator continuously fetches information about upgrade paths for the configured channel from the OpenShift Update Service (OSUS). It stores the recommended update options in the status.availableUpdates field of its ClusterVersion resource.

The intent to upgrade the cluster to another version is expressed by storing the desired version in the spec.desiredUpdate field. When spec.desiredUpdate does not match the current cluster version, CVO will start updating the cluster. It downloads the release payload image, validates it, and systematically reconciles the Cluster Operator resources to match the updated manifests delivered in the release payload image.

Troubleshooting

A typical OpenShift cluster will have a Deployment resource called cluster-version-operator in the openshift-cluster-version namespace, configured to run a single CVO replica. Confirm that its Pod is up and optionally inspect its log:

$ oc get deployment -n openshift-cluster-version cluster-version-operator
NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
cluster-version-operator   1/1     1            1           2y227d

$ oc get pods -n openshift-cluster-version -l k8s-app=cluster-version-operator
NAME                                       READY   STATUS    RESTARTS   AGE
cluster-version-operator-6885cc574-674n6   1/1     Running   0          6d5h

$ oc logs -n openshift-cluster-version -l k8s-app=cluster-version-operator
...

The CVO follows the Kubernetes API conventions and sets Conditions in the status of its ClusterVersion resource. These conditions are surfaced by both the OpenShift web console and the oc adm upgrade CLI.

Development

Contributions welcome! Please follow CONTRIBUTING.md and developer documentation.

cluster-version-operator's People

Contributors

abhinavdahiya avatar arjunrn avatar crawford avatar davoska avatar deads2k avatar derekwaynecarr avatar eggfoobar avatar enxebre avatar eparis avatar guillaumerose avatar jcpowermac avatar jottofar avatar lalatendumohanty avatar lucab avatar marun avatar openshift-ci[bot] avatar openshift-merge-bot[bot] avatar openshift-merge-robot avatar patrickdillon avatar paulfantom avatar petr-muller avatar qjkee avatar ravisantoshgudimetla avatar sdodson avatar smarterclayton avatar soltysh avatar sttts avatar vikaschoudhary16 avatar vrutkovs avatar wking 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.