{"id":18637026,"url":"https://github.com/openshift/cluster-version-operator","last_synced_at":"2025-05-15T15:07:06.925Z","repository":{"id":37548832,"uuid":"142336303","full_name":"openshift/cluster-version-operator","owner":"openshift","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-12T17:32:12.000Z","size":38235,"stargazers_count":87,"open_issues_count":13,"forks_count":194,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-05-12T18:23:30.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openshift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-25T18:04:04.000Z","updated_at":"2025-05-12T17:04:50.000Z","dependencies_parsed_at":"2023-12-21T09:11:10.993Z","dependency_job_id":"a5452b41-8f44-48ff-8d65-55b18e771771","html_url":"https://github.com/openshift/cluster-version-operator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-version-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-version-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-version-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-version-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openshift","download_url":"https://codeload.github.com/openshift/cluster-version-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T05:32:41.670Z","updated_at":"2025-05-15T15:07:01.909Z","avatar_url":"https://github.com/openshift.png","language":"Go","readme":"# Cluster Version Operator\n\nThe Cluster Version Operator (CVO) is one of the [Cluster Operators][dev-guide-operators] that run in every OpenShift\ncluster. CVO consumes an artifact called a _\"release payload image,\"_ which represents a specific version of OpenShift.\nThe release payload image contains the [resource manifests][kube-glossary-manifest] necessary for the cluster to\nfunction, like all Cluster Operator ones. CVO reconciles the resources within the cluster to match the manifests in the\nrelease payload image. As a result, CVO implements _cluster upgrades_. After being provided a release payload image for\na newer OpenShift version, CVO reconciles all Cluster Operators to their updated versions, and Cluster Operators\nsimilarly update their operands.\n\n## OpenShift Upgrades\n\nFor information about upgrading OpenShift clusters, please see the respective documentation:\n\n- [OKD Documentation: Updating clusters][okd-updating-clusters]\n- [Red Hat OpenShift Container Platform: Updating clusters][ocp-updating-clusters]\n\n## `ClusterVersion` Resource\n\nLike other Cluster Operators, the Cluster Version Operator is configured by a Config API resource in the cluster:\na [`ClusterVersion`][ocp-clusterversion]:\n\n```console\n$ oc explain clusterversion\n  KIND:     ClusterVersion\n  VERSION:  config.openshift.io/v1\n\n  DESCRIPTION:\n       ClusterVersion is the configuration for the ClusterVersionOperator. This is\n       where parameters related to automatic updates can be set. Compatibility\n       level 1: Stable within a major release for a minimum of 12 months or 3\n       minor releases (whichever is longer).\n\n  FIELDS:\n     ...\n     spec\t\u003cObject\u003e -required-\n       spec is the desired state of the cluster version - the operator will work\n       to ensure that the desired version is applied to the cluster.\n\n     status\t\u003cObject\u003e\n       status contains information about the available updates and any in-progress\n       updates.\n```\n\n`ClusterVersion` resource follows the established [Kubernetes pattern][kube-spec-and-status] where the `spec`\nproperty describes the desired state that CVO should achieve and maintain, and the `status` property is populated by the\nCVO to describe its status and the observed state.\n\nIn a typical OpenShift cluster, there will be a cluster-scoped `ClusterVersion` resource called `version`:\n\n```console\n$ oc get clusterversion version\nNAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS\nversion   4.11.17   True        False         6d5h    Cluster version is 4.11.17\n```\n\nNote that as a user or a cluster administrator, you usually do not interact with the `ClusterVersion` resource directly\nbut via either the [`oc adm upgrade`][ocp-oc-adm-upgrade] CLI or the [web console][ocp-webconsole-upgrades].\n\n## Understanding Upgrades\n\n\u003e :bulb: This section is only a high-level overview. See the [Update Process][dev-guide-upgrade-workflow] and\n\u003e [Reconciliation][dev-guide-reconciliation] documents in the [dev-guide][dev-guide] for more details.\n\nThe Cluster Version Operator continuously fetches information about upgrade paths for the configured channel from the\nOpenShift Update Service (OSUS). It stores the recommended update options in the `status.availableUpdates` field of\nits `ClusterVersion` resource.\n\nThe intent to upgrade the cluster to another version is expressed by storing the desired version in\nthe `spec.desiredUpdate` field. When `spec.desiredUpdate` does not match the current cluster version, CVO will start\nupdating the cluster. It downloads the release payload image, validates it,\nand [systematically reconciles][dev-guide-reconciliation] the Cluster Operator resources to match the updated manifests\ndelivered in the release payload image.\n\n## Troubleshooting\n\nA typical OpenShift cluster will have a `Deployment` resource called `cluster-version-operator` in\nthe `openshift-cluster-version` namespace, configured to run a single CVO replica. Confirm that its `Pod` is up and\noptionally inspect its log:\n\n```console\n$ oc get deployment -n openshift-cluster-version cluster-version-operator\nNAME                       READY   UP-TO-DATE   AVAILABLE   AGE\ncluster-version-operator   1/1     1            1           2y227d\n\n$ oc get pods -n openshift-cluster-version -l k8s-app=cluster-version-operator\nNAME                                       READY   STATUS    RESTARTS   AGE\ncluster-version-operator-6885cc574-674n6   1/1     Running   0          6d5h\n\n$ oc logs -n openshift-cluster-version -l k8s-app=cluster-version-operator\n...\n```\n\nThe CVO follows the [Kubernetes API conventions][kube-api-conventions-status] and sets `Conditions` in the status of\nits `ClusterVersion` resource. These conditions are surfaced by both the OpenShift web console and the `oc adm upgrade`\nCLI.\n\n## Development\n\nContributions welcome! Please follow [CONTRIBUTING.md](CONTRIBUTING.md) and [developer documentation](./docs/dev).\n\n[dev-guide]: https://github.com/openshift/enhancements/blob/master/dev-guide\n\n[dev-guide-operators]: https://github.com/openshift/enhancements/blob/master/dev-guide/operators.md#what-is-an-openshift-clusteroperator\n\n[dev-guide-reconciliation]: https://github.com/openshift/enhancements/blob/master/dev-guide/cluster-version-operator/user/reconciliation.md\n\n[dev-guide-upgrade-workflow]: https://github.com/openshift/enhancements/blob/master/dev-guide/cluster-version-operator/user/update-workflow.md\n\n[kube-api-conventions-status]: https://github.com/kubernetes/community/blob/4c9ef2d135294355e7ca33ec7a5e01d31438df12/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties\n\n[kube-spec-and-status]: https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#object-spec-and-status\n\n[kube-glossary-manifest]: https://kubernetes.io/docs/reference/glossary/?all=true#term-manifest\n\n[okd-updating-clusters]: https://docs.okd.io/latest/updating/index.html\n\n[ocp-updating-clusters]: https://docs.openshift.com/container-platform/latest/updating/index.html\n\n[ocp-clusterversion]: https://docs.openshift.com/container-platform/latest/rest_api/config_apis/clusterversion-config-openshift-io-v1.html\n\n[ocp-oc-adm-upgrade]: https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/administrator-cli-commands.html#oc-adm-upgrade\n\n[ocp-webconsole-upgrades]: https://docs.openshift.com/container-platform/latest/updating/updating-cluster-within-minor.html#update-upgrading-web_updating-cluster-within-minor\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fcluster-version-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenshift%2Fcluster-version-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fcluster-version-operator/lists"}