{"id":18637119,"url":"https://github.com/openshift/cluster-kube-controller-manager-operator","last_synced_at":"2025-04-04T07:06:51.283Z","repository":{"id":37451067,"uuid":"148497748","full_name":"openshift/cluster-kube-controller-manager-operator","owner":"openshift","description":"The kube-controller-manager operator installs and maintains the kube-controller-manager on a cluster","archived":false,"fork":false,"pushed_at":"2025-03-10T16:15:45.000Z","size":96900,"stargazers_count":43,"open_issues_count":4,"forks_count":129,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-28T06:07:30.139Z","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":null,"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}},"created_at":"2018-09-12T14:59:05.000Z","updated_at":"2025-03-10T15:49:19.000Z","dependencies_parsed_at":"2023-02-17T20:00:48.525Z","dependency_job_id":"6f2d898e-4092-4da6-886e-8fb0b3846515","html_url":"https://github.com/openshift/cluster-kube-controller-manager-operator","commit_stats":{"total_commits":826,"total_committers":84,"mean_commits":9.833333333333334,"dds":0.7917675544794189,"last_synced_commit":"ce2c021f23f5d178da6ea35d98a229137e5a81c4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-kube-controller-manager-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-kube-controller-manager-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-kube-controller-manager-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fcluster-kube-controller-manager-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openshift","download_url":"https://codeload.github.com/openshift/cluster-kube-controller-manager-operator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247135144,"owners_count":20889421,"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:33:33.870Z","updated_at":"2025-04-04T07:06:51.257Z","avatar_url":"https://github.com/openshift.png","language":"Go","readme":"# Kubernetes Controller Manager operator\n\nThe Kubernetes Controller Manager operator manages and updates the [Kubernetes Controller Manager](https://github.com/kubernetes/kubernetes) deployed on top of\n[OpenShift](https://openshift.io). The operator is based on OpenShift [library-go](https://github.com/openshift/library-go) framework and it\nis installed via [Cluster Version Operator](https://github.com/openshift/cluster-version-operator) (CVO).\n\nIt contains the following components:\n\n* Operator\n* Bootstrap manifest renderer\n* Installer based on static pods\n* Configuration observer\n\nBy default, the operator exposes [Prometheus](https://prometheus.io) metrics via `metrics` service.\nThe metrics are collected from following components:\n\n* Kubernetes Controller Manager operator\n\n\n## Configuration\n\nThe configuration for the Kubernetes Controller Manager is coming from:\n\n* a [default config](https://github.com/openshift/cluster-kube-controller-manager-operator/blob/master/bindata/assets/config/defaultconfig.yaml)\n\n\n## Debugging\n\nOperator also expose events that can help debugging issues. To get operator events, run following command:\n\n```\n$ oc get events -n  openshift-kube-controller-manager-operator\n```\n\nThis operator is configured via [`KubeControllerManager`](https://github.com/openshift/api/blob/master/operator/v1/types_kubecontrollermanager.go) custom resource:\n\n```\n$ oc describe kubecontrollermanager\n```\n```yaml\napiVersion: operator.openshift.io/v1\nkind: KubeControllerManager\nmetadata:\n  name: cluster\nspec:\n  managementState: Managed\n  ...\n```\nThe log level of individual kube-controller-manager instances can be increased by setting `.spec.logLevel` field:\n```\n$ oc explain KubeControllerManager.spec.logLevel\nKIND:     KubeControllerManager\nVERSION:  operator.openshift.io/v1\nFIELD:    logLevel \u003cstring\u003e\nDESCRIPTION:\n     logLevel is an intent based logging for an overall component. It does not\n     give fine grained control, but it is a simple way to manage coarse grained\n     logging choices that operators have to interpret for their operands. Valid\n     values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".\n```\nFor example:\n```yaml\napiVersion: operator.openshift.io/v1\nkind: KubeControllerManager\nmetadata:\n  name: cluster\nspec:\n  logLevel: Debug\n  ...\n```\n\nCurrently the log levels correspond to:\n\n| logLevel | log level |\n| -------- | --------- |\n| Normal   | 2         |\n| Debug    | 4         |\n| Trace    | 6         |\n| TraceAll | 10        |\n\n\nSimilarly, the log level of cluster-kube-controller-manager-operator can be increased by setting the `.spec.operatorLogLevel` field:\nFor example:\n```yaml\napiVersion: operator.openshift.io/v1\nkind: KubeControllerManager\nmetadata:\n  name: cluster\nspec:\n  operatorLogLevel: Debug\n  ...\n```\n\nCurrently the operator log levels correspond to:\n\n| logLevel | log level |\n| -------- | --------- |\n| Normal   | 2         |\n| Debug    | 4         |\n| Trace    | 6         |\n| TraceAll | 8         |\n\n\n```\n$ oc explain kubecontrollermanager\n```\nto learn more about the resource itself.\n\nThe current operator status is reported using the `ClusterOperator` resource. To get the current status you can run follow command:\n\n```\n$ oc get clusteroperator/kube-controller-manager\n```\n\n\n## Developing and debugging the operator\n\nIn the running cluster [cluster-version-operator](https://github.com/openshift/cluster-version-operator/) is responsible\nfor maintaining functioning and non-altered elements.  In that case to be able to use custom operator image one has to\nperform one of these operations:\n\n1. Set your operator in umanaged state, see [here](https://github.com/openshift/enhancements/blob/master/dev-guide/cluster-version-operator/dev/clusterversion.md) for details, in short:\n\n```\noc patch clusterversion/version --type='merge' -p \"$(cat \u003c\u003c- EOF\nspec:\n  overrides:\n  - group: apps\n    kind: Deployment\n    name: kube-controller-manager-operator\n    namespace: openshift-kube-controller-manager-operator\n    unmanaged: true\nEOF\n)\"\n```\n\n2. Scale down cluster-version-operator:\n\n```\noc scale --replicas=0 deploy/cluster-version-operator -n openshift-cluster-version\n```\n\nIMPORTANT: This apprach disables cluster-version-operator completly, whereas previous only tells it to not manage a kube-controller-manager-operator!\n\nAfter doing this you can now change the image of the operator to the desired one:\n\n```\noc patch deployment/kube-controller-manager-operator -n openshift-kube-controller-manager-operator -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"kube-controller-manager-operator\",\"image\":\"\u003cuser\u003e/cluster-kube-controller-manager-operator\",\"env\":[{\"name\":\"OPERATOR_IMAGE\",\"value\":\"\u003cuser\u003e/cluster-kube-controller-manager-operator\"}]}]}}}}'\n```\n\n\n## Developing and debugging the bootkube bootstrap phase\n\nThe operator image version used by the [installer](https://github.com/openshift/installer/blob/master/pkg/asset/ignition/bootstrap/) bootstrap phase can be overridden by creating a custom origin-release image pointing to the developer's operator `:latest` image:\n\n```\n$ IMAGE_ORG=\u003cuser\u003e make images\n$ docker push \u003cuser\u003e/origin-cluster-kube-controller-manager-operator\n\n$ cd ../cluster-kube-apiserver-operator\n$ IMAGES=cluster-kube-controller-manager-operator IMAGE_ORG=\u003cuser\u003e make origin-release\n$ docker push \u003cuser\u003e/origin-release:latest\n\n$ cd ../installer\n$ OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=docker.io/\u003cuser\u003e/origin-release:latest bin/openshift-install cluster ...\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fcluster-kube-controller-manager-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenshift%2Fcluster-kube-controller-manager-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fcluster-kube-controller-manager-operator/lists"}