cluster-kube-controller-manager-operator

所属分类:聚类算法
开发工具:GO
文件大小:16783KB
下载次数:0
上传日期:2023-05-11 20:06:48
上 传 者sh-1993
说明:  kube控制器管理器操作员在集群上安装和维护kube-控制器管理器
(The kube-controller-manager operator installs and maintains the kube- controller-manager on a cluster)

文件列表:
.ci-operator.yaml (106, 2023-06-27)
.travis.yml (133, 2023-06-27)
Dockerfile.rhel7 (1222, 2023-06-27)
LICENSE (11357, 2023-06-27)
Makefile (1463, 2023-06-27)
OWNERS (211, 2023-06-27)
bindata (0, 2023-06-27)
bindata\assets.go (418, 2023-06-27)
bindata\assets (0, 2023-06-27)
bindata\assets\config (0, 2023-06-27)
bindata\assets\config\default-cluster-policy-controller-config.yaml (392, 2023-06-27)
bindata\assets\config\defaultconfig.yaml (1798, 2023-06-27)
bindata\assets\kube-controller-manager (0, 2023-06-27)
bindata\assets\kube-controller-manager\cluster-policy-controller-cm.yaml (150, 2023-06-27)
bindata\assets\kube-controller-manager\cm.yaml (124, 2023-06-27)
bindata\assets\kube-controller-manager\csr_approver_clusterrole.yaml (737, 2023-06-27)
bindata\assets\kube-controller-manager\csr_approver_clusterrolebinding.yaml (457, 2023-06-27)
bindata\assets\kube-controller-manager\gce (0, 2023-06-27)
bindata\assets\kube-controller-manager\gce\cloud-provider-binding.yaml (360, 2023-06-27)
bindata\assets\kube-controller-manager\gce\cloud-provider-role.yaml (312, 2023-06-27)
bindata\assets\kube-controller-manager\kubeconfig-cert-syncer.yaml (882, 2023-06-27)
bindata\assets\kube-controller-manager\kubeconfig-cm.yaml (872, 2023-06-27)
bindata\assets\kube-controller-manager\leader-election-cluster-policy-controller-role.yaml (342, 2023-06-27)
bindata\assets\kube-controller-manager\leader-election-cluster-policy-controller-rolebinding.yaml (344, 2023-06-27)
bindata\assets\kube-controller-manager\leader-election-rolebinding.yaml (297, 2023-06-27)
bindata\assets\kube-controller-manager\localhost-recovery-client-crb.yaml (308, 2023-06-27)
bindata\assets\kube-controller-manager\localhost-recovery-sa.yaml (127, 2023-06-27)
bindata\assets\kube-controller-manager\localhost-recovery-token.yaml (248, 2023-06-27)
bindata\assets\kube-controller-manager\namespace-openshift-infra.yaml (286, 2023-06-27)
bindata\assets\kube-controller-manager\namespace-security-allocation-controller-clusterrole.yaml (587, 2023-06-27)
bindata\assets\kube-controller-manager\namespace-security-allocation-controller-clusterrolebinding.yaml (504, 2023-06-27)
bindata\assets\kube-controller-manager\ns.yaml (415, 2023-06-27)
bindata\assets\kube-controller-manager\pod-cm.yaml (180, 2023-06-27)
bindata\assets\kube-controller-manager\pod.yaml (6648, 2023-06-27)
bindata\assets\kube-controller-manager\podsecurity-admission-label-syncer-controller-clusterrole.yaml (813, 2023-06-27)
bindata\assets\kube-controller-manager\podsecurity-admission-label-syncer-controller-clusterrolebinding.yaml (520, 2023-06-27)
bindata\assets\kube-controller-manager\recycler-cm.yaml (1066, 2023-06-27)
... ...

# Kubernetes Controller Manager operator The Kubernetes Controller Manager operator manages and updates the [Kubernetes Controller Manager](https://github.com/kubernetes/kubernetes) deployed on top of [OpenShift](https://openshift.io). The operator is based on OpenShift [library-go](https://github.com/openshift/library-go) framework and it is installed via [Cluster Version Operator](https://github.com/openshift/cluster-version-operator) (CVO). It contains the following components: * Operator * Bootstrap manifest renderer * Installer based on static pods * Configuration observer By default, the operator exposes [Prometheus](https://prometheus.io) metrics via `metrics` service. The metrics are collected from following components: * Kubernetes Controller Manager operator ## Configuration The configuration for the Kubernetes Controller Manager is coming from: * a [default config](https://github.com/openshift/cluster-kube-controller-manager-operator/blob/master/bindata/assets/config/defaultconfig.yaml) ## Debugging Operator also expose events that can help debugging issues. To get operator events, run following command: ``` $ oc get events -n openshift-kube-controller-manager-operator ``` This operator is configured via [`KubeControllerManager`](https://github.com/openshift/api/blob/master/operator/v1/types_kubecontrollermanager.go) custom resource: ``` $ oc describe kubecontrollermanager ``` ```yaml apiVersion: operator.openshift.io/v1 kind: KubeControllerManager metadata: name: cluster spec: managementState: Managed ... ``` ``` $ oc explain kubecontrollermanager ``` to learn more about the resource itself. The current operator status is reported using the `ClusterOperator` resource. To get the current status you can run follow command: ``` $ oc get clusteroperator/kube-controller-manager ``` ## Developing and debugging the operator In the running cluster [cluster-version-operator](https://github.com/openshift/cluster-version-operator/) is responsible for maintaining functioning and non-altered elements. In that case to be able to use custom operator image one has to perform one of these operations: 1. 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: ``` oc patch clusterversion/version --type='merge' -p "$(cat <<- EOF spec: overrides: - group: apps kind: Deployment name: kube-controller-manager-operator namespace: openshift-kube-controller-manager-operator unmanaged: true EOF )" ``` 2. Scale down cluster-version-operator: ``` oc scale --replicas=0 deploy/cluster-version-operator -n openshift-cluster-version ``` IMPORTANT: This apprach disables cluster-version-operator completly, whereas previous only tells it to not manage a kube-controller-manager-operator! After doing this you can now change the image of the operator to the desired one: ``` oc patch deployment/kube-controller-manager-operator -n openshift-kube-controller-manager-operator -p '{"spec":{"template":{"spec":{"containers":[{"name":"kube-controller-manager-operator","image":"/cluster-kube-controller-manager-operator","env":[{"name":"OPERATOR_IMAGE","value":"/cluster-kube-controller-manager-operator"}]}]}}}}' ``` ## Developing and debugging the bootkube bootstrap phase The 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: ``` $ IMAGE_ORG= make images $ docker push /origin-cluster-kube-controller-manager-operator $ cd ../cluster-kube-apiserver-operator $ IMAGES=cluster-kube-controller-manager-operator IMAGE_ORG= make origin-release $ docker push /origin-release:latest $ cd ../installer $ OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=docker.io//origin-release:latest bin/openshift-install cluster ... ```

近期下载者

相关文件


收藏者