From b8c706ce658323ee5257028d56e895968f805f7e Mon Sep 17 00:00:00 2001 From: Poor12 Date: Mon, 6 Mar 2023 16:05:41 +0800 Subject: [PATCH 1/2] add controllers Signed-off-by: Poor12 --- charts/karmada/README.md | 386 +++++++++--------- .../templates/karmada-controller-manager.yaml | 3 + charts/karmada/values.yaml | 1 + 3 files changed, 205 insertions(+), 185 deletions(-) diff --git a/charts/karmada/README.md b/charts/karmada/README.md index 01ac46b554be..7731aa11a19f 100644 --- a/charts/karmada/README.md +++ b/charts/karmada/README.md @@ -94,6 +94,7 @@ karmada-webhook-749f5f75df-4l5h4 1/1 Running 2 (67s ago) ``` ## Uninstalling the Chart + To uninstall/delete the `karmada` helm release in namespace `karmada-system`: ```console @@ -101,6 +102,7 @@ helm uninstall karmada -n karmada-system ``` The command removes all the Kubernetes components associated with the chart and deletes the release. + > **Note**: There are some RBAC resources that are used by the `preJob` that can not be deleted by the `uninstall` command above. You might have to clean them manually with tools like `kubectl`. You can clean them by commands: ```console @@ -111,8 +113,11 @@ kubectl delete ns karmada-system ``` ## Example + ### 1. Install agent + Edited values.yaml + ```YAML installMode: "agent" agent: @@ -134,13 +139,18 @@ agent: -----END RSA PRIVATE KEY----- server: "https://apiserver.karmada" ``` + Execute command (switch to the `root` directory of the repo, and sets the `current-context` in a kubeconfig file) + ```console kubectl config use-context member helm install karmada-agent -n karmada-system --create-namespace ./charts/karmada ``` + ### 2. Install component + Edited values.yaml for karmada-scheduler-estimator + ```YAML installMode: "component" components: [ @@ -164,7 +174,9 @@ schedulerEstimator: -----END RSA PRIVATE KEY----- server: "https://apiserver.member" ``` + Execute command (switch to the `root` directory of the repo, and sets the `current-context` in a kubeconfig file) + ```console kubectl config use-context host helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada @@ -174,6 +186,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada ### Global parameters + | Name | Description | Value | | ------------------------- | ----------------------------------------------- | ----- | | `global.imageRegistry` | Global Docker image registry | `""` | @@ -181,188 +194,191 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada ### Common parameters -| Name | Description | Value | -|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `installMode` | InstallMode "host", "agent" and "component" are provided, "host" means install karmada in the control-cluster, "agent" means install agent client in the member cluster, "component" means install selected components in the control-cluster | `"host"` | -| `clusterDomain` | Default cluster domain for karmada | `"cluster.local"` | -| `components` | Selected components list, selectable values: "schedulerEstimator" | `[]` | -| `kubectl.image.repository` | Image of the kubectl | `"bitnami/kubectl"` | -| `kubectl.image.tag` | Image tag of the kubectl | `"latest"` | -| `kubectl.image.pullPolicy` | Image pull policy of the kubectl | `"Always"` | -| `cfssl.image.repository` | Image of the cfssl | `"cfssl/cfssl"` | -| `cfssl.image.tag` | Image tag of the cfssl | `"latest"` | -| `cfssl.image.pullPolicy` | Image pull policy of the cfssl | `"Always"` | -| `certs.mode` | Mode "auto" and "custom" are provided, "auto" means auto generate certificate, "custom" means use user certificate | `"auto"` | -| `certs.auto.expiry` | Expiry of the certificate | `"43800h"` | -| `certs.auto.hosts` | Hosts of the certificate | `["kubernetes.default.svc","*.etcd.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}","*.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}","*.{{ .Release.Namespace }}.svc","localhost","127.0.0.1"]` | -| `certs.custom.caCrt` | CA CRT of the certificate | `""` | -| `certs.custom.crt` | CRT of the certificate | `""` | -| `certs.custom.key` | KEY of the certificate | `""` | -| `certs.custom.frontProxyCaCrt` | CA CRT of the front proxy certificate | `""` | -| `certs.custom.frontProxyCrt` | CRT of the front proxy certificate | `""` | -| `certs.custom.frontProxyKey` | KEY of the front proxy certificate | `""` | -| `etcd.affinity` | Affinity of the etcd pods | `{}` -| `etcd.labels` | Labels of etcd statefulset | `{"app": "etcd"}` | -| `etcd.podLabels` | Labels of etcd pods | `{}` | -| `etcd.mode` | Mode "external" and "internal" are provided, "external" means use external ectd, "internal" means install a etcd in the cluster | `"internal"` | -| `etcd.external.servers` | Servers of etcd | `""` | -| `etcd.external.registryPrefix` | Use to registry prefix of etcd | `"/registry/karmada"` | -| `etcd.external.certs.caCrt` | CA CRT of the etcd certificate | `""` | -| `etcd.external.certs.crt` | CRT of the etcd certificate | `""` | -| `etcd.external.certs.key` | KEY of the etcd certificate | `""` | -| `etcd.internal.replicaCount` | Target replicas of the etcd | `1` | -| `etcd.internal.image.repository` | Image of the etcd | `"registry.k8s.io/etcd"` | -| `etcd.internal.image.pullPolicy` | Image pull policy of the etcd | `"IfNotPresent"` | -| `etcd.internal.image.tag` | Image tag of the etcd | `"3.5.3-0"` | -| `etcd.internal.storageType` | StorageType of the etcd, accepts "hostPath", "pvc" | `"hostPath"` | -| `etcd.internal.pvc.storageClass` | StorageClass of the etcd, takes effect when `etcd.internal.storageType` is "pvc" | `""` | -| `etcd.internal.pvc.size` | Storage size of the etcd, takes effect when `etcd.internal.storageType` is "pvc" | `""` | -| `etcd.internal.nodeSelector` | Node selector of the karmada-apiserver | `{}` | -| `etcd.internal.resources` | Resource quota of the etcd | `{}` | -| `agent.clusterName` | Name of the member cluster | `""` | -| `agent.clusterEndpoint` | Server endpoint of the member cluster | `""` | -| `agent.kubeconfig.caCrt` | CA CRT of the karmada certificate | `""` | -| `agent.kubeconfig.crt` | CRT of the karmada certificate | `""` | -| `agent.kubeconfig.key` | KEY of the karmada certificate | `""` | -| `agent.kubeconfig.server` | API-server of the karmada | `""` | -| `agent.labels` | Labels of the agent deployment | `{"app": "karmada-agent"}` | -| `agent.replicaCount` | Target replicas of the agent | `1` | -| `agent.podLabels` | Labels of the agent pods | `{}` | -| `agent.podAnnotations` | Annotations of the agent pods | `{}` | -| `agent.imagePullSecrets` | Image pull secret of the agent | `[]` | -| `agent.image.repository` | Image of the agent | `"docker.io/karmada/karmada-agent"` | -| `agent.image.tag` | Image tag of the agent | `"latest"` | -| `agent.image.pullPolicy` | Image pull policy of the agent | `"Always"` | -| `agent.resources` | Resource quota of the agent | `{}` | -| `agent.nodeSelector` | Node selector of the agent | `{}` | -| `agent.affinity` | Affinity of the agent | `{}` | -| `agent.tolerations` | Tolerations of the agent | `[]` | -| `agent.strategy` | Strategy of the agent | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `scheduler.labels` | Labels of the schedeler deployment | `{"app": "karmada-scheduler"}` | -| `scheduler.replicaCount` | Target replicas of the scheduler | `1` | -| `scheduler.podLabels` | Labels of the scheduler pods | `{}` | -| `scheduler.podAnnotations` | Annotations of the scheduler pods | `{}` | -| `scheduler.imagePullSecrets` | Image pull secret of the scheduler | `[]` | -| `scheduler.image.repository` | Image of the scheduler | `"docker.io/karmada/karmada-scheduler"` | -| `scheduler.image.tag` | Image tag of the scheduler | `"latest"` | -| `scheduler.image.pullPolicy` | Image pull policy of the scheduler | `"Always"` | -| `scheduler.resources` | Resource quota of the scheduler | `{}` | -| `scheduler.nodeSelector` | Node selector of the scheduler | `{}` | -| `scheduler.affinity` | Affinity of the scheduler | `{}` | -| `scheduler.tolerations` | Tolerations of the scheduler | `[]` | -| `scheduler.strategy` | Strategy of the scheduler | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `webhook.labels` | Labels of the webhook deployment | `{"app": "karmada-webhook"}` | -| `webhook.replicaCount` | Target replicas of the webhook | `1` | -| `webhook.podLabels` | Labels of the webhook pods | `{}` | -| `webhook.podAnnotations` | Annotations of the webhook pods | `{}` | -| `webhook.imagePullSecrets` | Image pull secret of the webhook | `[]` | -| `webhook.image.repository` | Image of the webhook | `"docker.io/karmada/karmada-webhook"` | -| `webhook.image.tag` | Image tag of the webhook | `"latest"` | -| `webhook.image.pullPolicy` | Image pull policy of the webhook | `"Always"` | -| `webhook.resources` | Resource quota of the webhook | `{}` | -| `webhook.nodeSelector` | Node selector of the webhook | `{}` | -| `webhook.affinity` | Affinity of the webhook | `{}` | -| `webhook.tolerations` | Tolerations of the webhook | `[]` | -| `webhook.strategy` | Strategy of the webhook | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `controllerManager.labels` | Labels of the karmada-controller-manager deployment | `{"app": "karmada-controller-manager"}` | -| `controllerManager.replicaCount` | Target replicas of the karmada-controller-manager | `1` | -| `controllerManager.podLabels` | Labels of the karmada-controller-manager pods | `{}` | -| `controllerManager.podAnnotations` | Annotations of the karmada-controller-manager pods | `{}` | -| `controllerManager.imagePullSecrets` | Image pull secret of the karmada-controller-manager | `[]` | -| `controllerManager.image.repository` | Image of the karmada-controller-manager | `"docker.io/karmada/karmada-controller-manager"` | -| `controllerManager.image.tag` | Image tag of the karmada-controller-manager | `"latest"` | -| `controllerManager.image.pullPolicy` | Image pull policy of the karmada-controller-manager | `"Always"` | -| `controllerManager.resources` | Resource quota of the karmada-controller-manager | `{}` | -| `controllerManager.nodeSelector` | Node selector of the karmada-controller-manager | `{}` | -| `controllerManager.affinity` | Affinity of the karmada-controller-manager | `{}` | -| `controllerManager.tolerations` | Tolerations of the karmada-controller-manager | `[]` | -| `controllerManager.strategy` | Strategy of the karmada-controller-manager | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `apiServer.labels` | Labels of the karmada-apiserver deployment | `{"app": "karmada-apiserver"}` | -| `apiServer.replicaCount` | Target replicas of the karmada-apiserver | `1` | -| `apiServer.podLabels` | Labels of the karmada-apiserver pods | `{}` | -| `apiServer.podAnnotations` | Annotations of the karmada-apiserver pods | `{}` | -| `apiServer.imagePullSecrets` | Image pull secret of the karmada-apiserver | `[]` | -| `apiServer.image.repository` | Image of the karmada-apiserver | `"registry.k8s.io/kube-apiserver"` | -| `apiServer.image.tag` | Image tag of the karmada-apiserver | `"v1.25.2"` | -| `apiServer.image.pullPolicy` | Image pull policy of the karmada-apiserver | `"IfNotPresent"` | -| `apiServer.resources` | Resource quota of the karmada-apiserver | `{}` | -| `apiServer.hostNetwork` | Deploy karmada-apiserver with hostNetwork. If there are multiple karmadas in one cluster, you'd better set it to "false" | `"false"` | -| `apiServer.nodeSelector` | Node selector of the karmada-apiserver | `{}` | -| `apiServer.affinity` | Affinity of the karmada-apiserver | `{}` | -| `apiServer.tolerations` | Tolerations of the karmada-apiserver | `[]` | -| `apiServer.serviceType` | Service type of apiserver, accepts "ClusterIP", "NodePort", "LoadBalancer" | `"ClusterIP"` | -| `apiServer.nodePort` | Node port for apiserver, takes effect when `apiServer.serviceType` is "NodePort". If no port is specified, the nodePort will be automatically assigned. | `0` | -| `apiServer.strategy` | Strategy of the karmada-apiserver | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `aggregatedApiServer.labels` | Labels of the karmada-aggregated-apiserver deployment | `{"app": "karmada-aggregated-apiserver"}` | -| `aggregatedApiServer.replicaCount` | Target replicas of the karmada-aggregated-apiserver | `1` | -| `aggregatedApiServer.podLabels` | Labels of the karmada-aggregated-apiserver pods | `{}` | -| `aggregatedApiServer.podAnnotations` | Annotations of the karmada-aggregated-apiserver pods | `{}` | -| `aggregatedApiServer.imagePullSecrets` | Image pull secret of the karmada-aggregated-apiserver | `[]` | -| `aggregatedApiServer.image.repository` | Image of the karmada-aggregated-apiserver | `"docker.io/karmada/karmada-aggregated-apiserver"` | -| `aggregatedApiServer.image.tag` | Image tag of the karmada-aggregated-apiserver | `"latest"` | -| `aggregatedApiServer.image.pullPolicy` | Image pull policy of the karmada-aggregated-apiserver | `"Always"` | -| `aggregatedApiServer.resources` | Resource quota of the karmada-aggregated-apiserver | `{requests: {cpu: 100m}}` | -| `aggregatedApiServer.nodeSelector` | Node selector of the karmada-aggregated-apiserver | `{}` | -| `aggregatedApiServer.affinity` | Affinity of the karmada-aggregated-apiserver | `{}` | -| `aggregatedApiServer.tolerations` | Tolerations of the karmada-aggregated-apiserver | `[]` | -| `aggregatedApiServer.strategy` | Strategy of the karmada-aggregated-apiserver | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `kubeControllerManager.labels` | Labels of the kube-controller-manager deployment | `{"app": "kube-controller-manager"}` | -| `kubeControllerManager.replicaCount` | Target replicas of the kube-controller-manager | `1` | -| `kubeControllerManager.podLabels` | Labels of the kube-controller-manager pods | `{}` | -| `kubeControllerManager.podAnnotations` | Annotations of the kube-controller-manager pods | `{}` | -| `kubeControllerManager.imagePullSecrets` | Image pull secret of the kube-controller-manager | `[]` | -| `kubeControllerManager.image.repository` | Image of the kube-controller-manager | `"registry.k8s.io/kube-controller-manager"` | -| `kubeControllerManager.image.tag` | Image tag of the kube-controller-manager | `"v1.25.2"` | -| `kubeControllerManager.image.pullPolicy` | Image pull policy of the kube-controller-manager | `"IfNotPresent"` | -| `kubeControllerManager.resources` | Resource quota of the kube-controller-manager | `{}` | -| `kubeControllerManager.nodeSelector` | Node selector of the kube-controller-manager | `{}` | -| `kubeControllerManager.affinity` | Affinity of the kube-controller-manager | `{}` | -| `kubeControllerManager.tolerations` | Tolerations of the kube-controller-manager | `[]` | -| `kubeControllerManager.strategy` | Strategy of the kube-controller-manager | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `schedulerEstimator.clusterName` | Name of the member cluster | `""` | -| `schedulerEstimator.kubeconfig.caCrt` | CA CRT of the certificate | `""` | -| `schedulerEstimator.kubeconfig.crt` | CRT of the certificate | `""` | -| `schedulerEstimator.kubeconfig.key` | KEY of the certificate | `""` | -| `schedulerEstimator.kubeconfig.server` | API-server of the member cluster | `""` | -| `schedulerEstimator.labels` | Labels of the scheduler-estimator deployment | `{}` | -| `schedulerEstimator.replicaCount` | Target replicas of the scheduler-estimator | `1` | -| `schedulerEstimator.podLabels` | Labels of the scheduler-estimator pods | `{}` | -| `schedulerEstimator.podAnnotations` | Annotations of the scheduler-estimator pods | `{}` | -| `schedulerEstimator.imagePullSecrets` | Image pull secret of the scheduler-estimator | `[]` | -| `schedulerEstimator.image.repository` | Image of the scheduler-estimator | `"docker.io/karmada/karmada-scheduler-estimator"` | -| `schedulerEstimator.image.tag` | Image tag of the scheduler-estimator | `"latest"` | -| `schedulerEstimator.image.pullPolicy` | Image pull policy of the scheduler-estimator | `"Always"` | -| `schedulerEstimator.resources` | Resource quota of the scheduler-estimator | `{}` | -| `schedulerEstimator.nodeSelector` | Node selector of the scheduler-estimator | `{}` | -| `schedulerEstimator.affinity` | Affinity of the scheduler-estimator | `{}` | -| `schedulerEstimator.tolerations` | Tolerations of the scheduler-estimator | `[]` | -| `search.strategy` | Strategy of the scheduler-estimator | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `descheduler.labels` | Labels of the descheduler deployment | `karmada-descheduler` | -| `descheduler.replicaCount` | Target replicas of the descheduler | `2` | -| `descheduler.podAnnotations` | Annotations of the descheduler pods | `{}` | -| `descheduler.podLabels` | Labels of the descheduler pods | `{}` | -| `descheduler.imagePullSecrets` | Image pull secret of the descheduler | `[]` | -| `descheduler.image.repository` | Image of the descheduler | `docker.io/karmada/karmada-descheduler` | -| `descheduler.image.pullPolicy` | Image pull policy of the descheduler | `Always` | -| `descheduler.image.tag` | Overrides the image tag whose default is the latest | `latest` | -| `descheduler.resources` | Resource quota of the descheduler | `{}` | -| `descheduler.nodeSelector` | Node selector of the descheduler | `{}` | -| `descheduler.affinity` | Affinity of the descheduler | `{}` | -| `descheduler.tolerations` | Tolerations of the descheduler | `{}` | -| `descheduler.strategy` | Strategy of the descheduler | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `descheduler.kubeconfig` | Kubeconfig of the descheduler | `karmada-kubeconfig` | -| `search.labels` | Labels of the search deployment | `{"app": "karmada-search", "apiserver": "true"}` | -| `search.replicaCount` | Target replicas of the search | `2` | -| `search.podAnnotations` | Annotations of the search pods | `{}` | -| `search.podLabels` | Labels of the search pods | `{}` | -| `search.imagePullSecrets` | Image pull secret of the search | `[]` | -| `search.image.repository` | Image of the search | `docker.io/karmada/karmada-search` | -| `search.image.pullPolicy` | Image pull policy of the search | `Always` | -| `search.image.tag` | Overrides the image tag whose default is the latest | `latest` | -| `search.resources` | Resource quota of the search | `{}` | -| `search.nodeSelector` | Node selector of the search | `{}` | -| `search.affinity` | Affinity of the search | `{}` | -| `search.tolerations` | Tolerations of the search | `{}` | -| `search.strategy` | Strategy of the search | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | -| `search.certs` | Certs of the search | `karmada-cert` | -| `search.kubeconfig` | Kubeconfig of the search | `karmada-kubeconfig` | + +| Name | Description | Value | +| ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `installMode` | InstallMode "host", "agent" and "component" are provided, "host" means install karmada in the control-cluster, "agent" means install agent client in the member cluster, "component" means install selected components in the control-cluster | `"host"` | +| `clusterDomain` | Default cluster domain for karmada | `"cluster.local"` | +| `components` | Selected components list, selectable values: "schedulerEstimator" | `[]` | +| `kubectl.image.repository` | Image of the kubectl | `"bitnami/kubectl"` | +| `kubectl.image.tag` | Image tag of the kubectl | `"latest"` | +| `kubectl.image.pullPolicy` | Image pull policy of the kubectl | `"Always"` | +| `cfssl.image.repository` | Image of the cfssl | `"cfssl/cfssl"` | +| `cfssl.image.tag` | Image tag of the cfssl | `"latest"` | +| `cfssl.image.pullPolicy` | Image pull policy of the cfssl | `"Always"` | +| `certs.mode` | Mode "auto" and "custom" are provided, "auto" means auto generate certificate, "custom" means use user certificate | `"auto"` | +| `certs.auto.expiry` | Expiry of the certificate | `"43800h"` | +| `certs.auto.hosts` | Hosts of the certificate | `["kubernetes.default.svc","*.etcd.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}","*.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}","*.{{ .Release.Namespace }}.svc","localhost","127.0.0.1"]` | +| `certs.custom.caCrt` | CA CRT of the certificate | `""` | +| `certs.custom.crt` | CRT of the certificate | `""` | +| `certs.custom.key` | KEY of the certificate | `""` | +| `certs.custom.frontProxyCaCrt` | CA CRT of the front proxy certificate | `""` | +| `certs.custom.frontProxyCrt` | CRT of the front proxy certificate | `""` | +| `certs.custom.frontProxyKey` | KEY of the front proxy certificate | `""` | +| `etcd.affinity` | Affinity of the etcd pods | `{}` | +| `etcd.labels` | Labels of etcd statefulset | `{"app": "etcd"}` | +| `etcd.podLabels` | Labels of etcd pods | `{}` | +| `etcd.mode` | Mode "external" and "internal" are provided, "external" means use external ectd, "internal" means install a etcd in the cluster | `"internal"` | +| `etcd.external.servers` | Servers of etcd | `""` | +| `etcd.external.registryPrefix` | Use to registry prefix of etcd | `"/registry/karmada"` | +| `etcd.external.certs.caCrt` | CA CRT of the etcd certificate | `""` | +| `etcd.external.certs.crt` | CRT of the etcd certificate | `""` | +| `etcd.external.certs.key` | KEY of the etcd certificate | `""` | +| `etcd.internal.replicaCount` | Target replicas of the etcd | `1` | +| `etcd.internal.image.repository` | Image of the etcd | `"registry.k8s.io/etcd"` | +| `etcd.internal.image.pullPolicy` | Image pull policy of the etcd | `"IfNotPresent"` | +| `etcd.internal.image.tag` | Image tag of the etcd | `"3.5.3-0"` | +| `etcd.internal.storageType` | StorageType of the etcd, accepts "hostPath", "pvc" | `"hostPath"` | +| `etcd.internal.pvc.storageClass` | StorageClass of the etcd, takes effect when`etcd.internal.storageType` is "pvc" | `""` | +| `etcd.internal.pvc.size` | Storage size of the etcd, takes effect when`etcd.internal.storageType` is "pvc" | `""` | +| `etcd.internal.nodeSelector` | Node selector of the karmada-apiserver | `{}` | +| `etcd.internal.resources` | Resource quota of the etcd | `{}` | +| `agent.clusterName` | Name of the member cluster | `""` | +| `agent.clusterEndpoint` | Server endpoint of the member cluster | `""` | +| `agent.kubeconfig.caCrt` | CA CRT of the karmada certificate | `""` | +| `agent.kubeconfig.crt` | CRT of the karmada certificate | `""` | +| `agent.kubeconfig.key` | KEY of the karmada certificate | `""` | +| `agent.kubeconfig.server` | API-server of the karmada | `""` | +| `agent.labels` | Labels of the agent deployment | `{"app": "karmada-agent"}` | +| `agent.replicaCount` | Target replicas of the agent | `1` | +| `agent.podLabels` | Labels of the agent pods | `{}` | +| `agent.podAnnotations` | Annotations of the agent pods | `{}` | +| `agent.imagePullSecrets` | Image pull secret of the agent | `[]` | +| `agent.image.repository` | Image of the agent | `"docker.io/karmada/karmada-agent"` | +| `agent.image.tag` | Image tag of the agent | `"latest"` | +| `agent.image.pullPolicy` | Image pull policy of the agent | `"Always"` | +| `agent.resources` | Resource quota of the agent | `{}` | +| `agent.nodeSelector` | Node selector of the agent | `{}` | +| `agent.affinity` | Affinity of the agent | `{}` | +| `agent.tolerations` | Tolerations of the agent | `[]` | +| `agent.strategy` | Strategy of the agent | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `scheduler.labels` | Labels of the schedeler deployment | `{"app": "karmada-scheduler"}` | +| `scheduler.replicaCount` | Target replicas of the scheduler | `1` | +| `scheduler.podLabels` | Labels of the scheduler pods | `{}` | +| `scheduler.podAnnotations` | Annotations of the scheduler pods | `{}` | +| `scheduler.imagePullSecrets` | Image pull secret of the scheduler | `[]` | +| `scheduler.image.repository` | Image of the scheduler | `"docker.io/karmada/karmada-scheduler"` | +| `scheduler.image.tag` | Image tag of the scheduler | `"latest"` | +| `scheduler.image.pullPolicy` | Image pull policy of the scheduler | `"Always"` | +| `scheduler.resources` | Resource quota of the scheduler | `{}` | +| `scheduler.nodeSelector` | Node selector of the scheduler | `{}` | +| `scheduler.affinity` | Affinity of the scheduler | `{}` | +| `scheduler.tolerations` | Tolerations of the scheduler | `[]` | +| `scheduler.strategy` | Strategy of the scheduler | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `webhook.labels` | Labels of the webhook deployment | `{"app": "karmada-webhook"}` | +| `webhook.replicaCount` | Target replicas of the webhook | `1` | +| `webhook.podLabels` | Labels of the webhook pods | `{}` | +| `webhook.podAnnotations` | Annotations of the webhook pods | `{}` | +| `webhook.imagePullSecrets` | Image pull secret of the webhook | `[]` | +| `webhook.image.repository` | Image of the webhook | `"docker.io/karmada/karmada-webhook"` | +| `webhook.image.tag` | Image tag of the webhook | `"latest"` | +| `webhook.image.pullPolicy` | Image pull policy of the webhook | `"Always"` | +| `webhook.resources` | Resource quota of the webhook | `{}` | +| `webhook.nodeSelector` | Node selector of the webhook | `{}` | +| `webhook.affinity` | Affinity of the webhook | `{}` | +| `webhook.tolerations` | Tolerations of the webhook | `[]` | +| `webhook.strategy` | Strategy of the webhook | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `controllerManager.labels` | Labels of the karmada-controller-manager deployment | `{"app": "karmada-controller-manager"}` | +| `controllerManager.replicaCount` | Target replicas of the karmada-controller-manager | `1` | +| `controllerManager.podLabels` | Labels of the karmada-controller-manager pods | `{}` | +| `controllerManager.podAnnotations` | Annotations of the karmada-controller-manager pods | `{}` | +| `controllerManager.imagePullSecrets` | Image pull secret of the karmada-controller-manager | `[]` | +| `controllerManager.image.repository` | Image of the karmada-controller-manager | `"docker.io/karmada/karmada-controller-manager"` | +| `controllerManager.image.tag` | Image tag of the karmada-controller-manager | `"latest"` | +| `controllerManager.image.pullPolicy` | Image pull policy of the karmada-controller-manager | `"Always"` | +| `controllerManager.resources` | Resource quota of the karmada-controller-manager | `{}` | +| `controllerManager.nodeSelector` | Node selector of the karmada-controller-manager | `{}` | +| `controllerManager.affinity` | Affinity of the karmada-controller-manager | `{}` | +| `controllerManager.tolerations` | Tolerations of the karmada-controller-manager | `[]` | +| `controllerManager.strategy` | Strategy of the karmada-controller-manager | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `controllerManager.featureGates` | FeatureGates of the karmada-controller-manager | `{"PropagateDeps": "false"}` | +| `controllerManager.controllers` | Controllers of the karmada-controller-manager | `""` | +| `apiServer.labels` | Labels of the karmada-apiserver deployment | `{"app": "karmada-apiserver"}` | +| `apiServer.replicaCount` | Target replicas of the karmada-apiserver | `1` | +| `apiServer.podLabels` | Labels of the karmada-apiserver pods | `{}` | +| `apiServer.podAnnotations` | Annotations of the karmada-apiserver pods | `{}` | +| `apiServer.imagePullSecrets` | Image pull secret of the karmada-apiserver | `[]` | +| `apiServer.image.repository` | Image of the karmada-apiserver | `"registry.k8s.io/kube-apiserver"` | +| `apiServer.image.tag` | Image tag of the karmada-apiserver | `"v1.25.2"` | +| `apiServer.image.pullPolicy` | Image pull policy of the karmada-apiserver | `"IfNotPresent"` | +| `apiServer.resources` | Resource quota of the karmada-apiserver | `{}` | +| `apiServer.hostNetwork` | Deploy karmada-apiserver with hostNetwork. If there are multiple karmadas in one cluster, you'd better set it to "false" | `"false"` | +| `apiServer.nodeSelector` | Node selector of the karmada-apiserver | `{}` | +| `apiServer.affinity` | Affinity of the karmada-apiserver | `{}` | +| `apiServer.tolerations` | Tolerations of the karmada-apiserver | `[]` | +| `apiServer.serviceType` | Service type of apiserver, accepts "ClusterIP", "NodePort", "LoadBalancer" | `"ClusterIP"` | +| `apiServer.nodePort` | Node port for apiserver, takes effect when`apiServer.serviceType` is "NodePort". If no port is specified, the nodePort will be automatically assigned. | `0` | +| `apiServer.strategy` | Strategy of the karmada-apiserver | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `aggregatedApiServer.labels` | Labels of the karmada-aggregated-apiserver deployment | `{"app": "karmada-aggregated-apiserver"}` | +| `aggregatedApiServer.replicaCount` | Target replicas of the karmada-aggregated-apiserver | `1` | +| `aggregatedApiServer.podLabels` | Labels of the karmada-aggregated-apiserver pods | `{}` | +| `aggregatedApiServer.podAnnotations` | Annotations of the karmada-aggregated-apiserver pods | `{}` | +| `aggregatedApiServer.imagePullSecrets` | Image pull secret of the karmada-aggregated-apiserver | `[]` | +| `aggregatedApiServer.image.repository` | Image of the karmada-aggregated-apiserver | `"docker.io/karmada/karmada-aggregated-apiserver"` | +| `aggregatedApiServer.image.tag` | Image tag of the karmada-aggregated-apiserver | `"latest"` | +| `aggregatedApiServer.image.pullPolicy` | Image pull policy of the karmada-aggregated-apiserver | `"Always"` | +| `aggregatedApiServer.resources` | Resource quota of the karmada-aggregated-apiserver | `{requests: {cpu: 100m}}` | +| `aggregatedApiServer.nodeSelector` | Node selector of the karmada-aggregated-apiserver | `{}` | +| `aggregatedApiServer.affinity` | Affinity of the karmada-aggregated-apiserver | `{}` | +| `aggregatedApiServer.tolerations` | Tolerations of the karmada-aggregated-apiserver | `[]` | +| `aggregatedApiServer.strategy` | Strategy of the karmada-aggregated-apiserver | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `kubeControllerManager.labels` | Labels of the kube-controller-manager deployment | `{"app": "kube-controller-manager"}` | +| `kubeControllerManager.replicaCount` | Target replicas of the kube-controller-manager | `1` | +| `kubeControllerManager.podLabels` | Labels of the kube-controller-manager pods | `{}` | +| `kubeControllerManager.podAnnotations` | Annotations of the kube-controller-manager pods | `{}` | +| `kubeControllerManager.imagePullSecrets` | Image pull secret of the kube-controller-manager | `[]` | +| `kubeControllerManager.image.repository` | Image of the kube-controller-manager | `"registry.k8s.io/kube-controller-manager"` | +| `kubeControllerManager.image.tag` | Image tag of the kube-controller-manager | `"v1.25.2"` | +| `kubeControllerManager.image.pullPolicy` | Image pull policy of the kube-controller-manager | `"IfNotPresent"` | +| `kubeControllerManager.resources` | Resource quota of the kube-controller-manager | `{}` | +| `kubeControllerManager.nodeSelector` | Node selector of the kube-controller-manager | `{}` | +| `kubeControllerManager.affinity` | Affinity of the kube-controller-manager | `{}` | +| `kubeControllerManager.tolerations` | Tolerations of the kube-controller-manager | `[]` | +| `kubeControllerManager.strategy` | Strategy of the kube-controller-manager | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `schedulerEstimator.clusterName` | Name of the member cluster | `""` | +| `schedulerEstimator.kubeconfig.caCrt` | CA CRT of the certificate | `""` | +| `schedulerEstimator.kubeconfig.crt` | CRT of the certificate | `""` | +| `schedulerEstimator.kubeconfig.key` | KEY of the certificate | `""` | +| `schedulerEstimator.kubeconfig.server` | API-server of the member cluster | `""` | +| `schedulerEstimator.labels` | Labels of the scheduler-estimator deployment | `{}` | +| `schedulerEstimator.replicaCount` | Target replicas of the scheduler-estimator | `1` | +| `schedulerEstimator.podLabels` | Labels of the scheduler-estimator pods | `{}` | +| `schedulerEstimator.podAnnotations` | Annotations of the scheduler-estimator pods | `{}` | +| `schedulerEstimator.imagePullSecrets` | Image pull secret of the scheduler-estimator | `[]` | +| `schedulerEstimator.image.repository` | Image of the scheduler-estimator | `"docker.io/karmada/karmada-scheduler-estimator"` | +| `schedulerEstimator.image.tag` | Image tag of the scheduler-estimator | `"latest"` | +| `schedulerEstimator.image.pullPolicy` | Image pull policy of the scheduler-estimator | `"Always"` | +| `schedulerEstimator.resources` | Resource quota of the scheduler-estimator | `{}` | +| `schedulerEstimator.nodeSelector` | Node selector of the scheduler-estimator | `{}` | +| `schedulerEstimator.affinity` | Affinity of the scheduler-estimator | `{}` | +| `schedulerEstimator.tolerations` | Tolerations of the scheduler-estimator | `[]` | +| `search.strategy` | Strategy of the scheduler-estimator | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `descheduler.labels` | Labels of the descheduler deployment | `karmada-descheduler` | +| `descheduler.replicaCount` | Target replicas of the descheduler | `2` | +| `descheduler.podAnnotations` | Annotations of the descheduler pods | `{}` | +| `descheduler.podLabels` | Labels of the descheduler pods | `{}` | +| `descheduler.imagePullSecrets` | Image pull secret of the descheduler | `[]` | +| `descheduler.image.repository` | Image of the descheduler | `docker.io/karmada/karmada-descheduler` | +| `descheduler.image.pullPolicy` | Image pull policy of the descheduler | `Always` | +| `descheduler.image.tag` | Overrides the image tag whose default is the latest | `latest` | +| `descheduler.resources` | Resource quota of the descheduler | `{}` | +| `descheduler.nodeSelector` | Node selector of the descheduler | `{}` | +| `descheduler.affinity` | Affinity of the descheduler | `{}` | +| `descheduler.tolerations` | Tolerations of the descheduler | `{}` | +| `descheduler.strategy` | Strategy of the descheduler | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `descheduler.kubeconfig` | Kubeconfig of the descheduler | `karmada-kubeconfig` | +| `search.labels` | Labels of the search deployment | `{"app": "karmada-search", "apiserver": "true"}` | +| `search.replicaCount` | Target replicas of the search | `2` | +| `search.podAnnotations` | Annotations of the search pods | `{}` | +| `search.podLabels` | Labels of the search pods | `{}` | +| `search.imagePullSecrets` | Image pull secret of the search | `[]` | +| `search.image.repository` | Image of the search | `docker.io/karmada/karmada-search` | +| `search.image.pullPolicy` | Image pull policy of the search | `Always` | +| `search.image.tag` | Overrides the image tag whose default is the latest | `latest` | +| `search.resources` | Resource quota of the search | `{}` | +| `search.nodeSelector` | Node selector of the search | `{}` | +| `search.affinity` | Affinity of the search | `{}` | +| `search.tolerations` | Tolerations of the search | `{}` | +| `search.strategy` | Strategy of the search | `{"type": "RollingUpdate", "rollingUpdate": {"maxUnavailable": "0", "maxSurge": "50%"} }` | +| `search.certs` | Certs of the search | `karmada-cert` | +| `search.kubeconfig` | Kubeconfig of the search | `karmada-kubeconfig` | diff --git a/charts/karmada/templates/karmada-controller-manager.yaml b/charts/karmada/templates/karmada-controller-manager.yaml index 2abf7fbc5a01..94713f1f0bfe 100644 --- a/charts/karmada/templates/karmada-controller-manager.yaml +++ b/charts/karmada/templates/karmada-controller-manager.yaml @@ -57,6 +57,9 @@ spec: - --secure-port=10357 - --leader-elect-resource-namespace={{ include "karmada.namespace" . }} - --v=2 + {{- if .Values.controllerManager.controllers }} + - --controllers={{ .Values.controllerManager.controllers }} + {{- end }} {{- with (include "karmada.controllerManager.featureGates" .) }} - {{ . }} {{- end }} diff --git a/charts/karmada/values.yaml b/charts/karmada/values.yaml index a3458e322610..e1918a9999bf 100644 --- a/charts/karmada/values.yaml +++ b/charts/karmada/values.yaml @@ -296,6 +296,7 @@ controllerManager: featureGates: ## @param PropagateDeps is a feature gate for the controllerManager to allow propagate dependent respurce to workloads. PropagateDeps: false + controllers: "" ## karmada apiserver config apiServer: From f61123de5bc085207bd21f8f2c4e545ecaefe822 Mon Sep 17 00:00:00 2001 From: fredgate Date: Mon, 19 Sep 2022 20:02:21 +0200 Subject: [PATCH 2/2] Add helm variables to choose controllers of karmada and kubernetes manager Signed-off-by: fredgate --- charts/karmada/templates/karmada-controller-manager.yaml | 3 +++ charts/karmada/templates/kube-controller-manager.yaml | 2 +- charts/karmada/values.yaml | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/karmada/templates/karmada-controller-manager.yaml b/charts/karmada/templates/karmada-controller-manager.yaml index 94713f1f0bfe..1d042137770d 100644 --- a/charts/karmada/templates/karmada-controller-manager.yaml +++ b/charts/karmada/templates/karmada-controller-manager.yaml @@ -53,6 +53,9 @@ spec: - /bin/karmada-controller-manager - --kubeconfig=/etc/kubeconfig - --bind-address=0.0.0.0 + {{- if .Values.controllerManager.config.controllers }} + - --controllers={{ .Values.controllerManager.config.controllers }} + {{- end }} - --cluster-status-update-frequency=10s - --secure-port=10357 - --leader-elect-resource-namespace={{ include "karmada.namespace" . }} diff --git a/charts/karmada/templates/kube-controller-manager.yaml b/charts/karmada/templates/kube-controller-manager.yaml index 8f2b1599ff2e..285edc240b61 100644 --- a/charts/karmada/templates/kube-controller-manager.yaml +++ b/charts/karmada/templates/kube-controller-manager.yaml @@ -53,7 +53,7 @@ spec: - --cluster-name=karmada - --cluster-signing-cert-file=/etc/karmada/pki/server-ca.crt - --cluster-signing-key-file=/etc/karmada/pki/server-ca.key - - --controllers=namespace,garbagecollector,serviceaccount-token,ttl-after-finished,bootstrapsigner,csrapproving,csrcleaner,csrsigning + - --controllers={{ .Values.kubeControllerManager.config.controllers }} - --kubeconfig=/etc/kubeconfig - --leader-elect=true - --node-cidr-mask-size=24 diff --git a/charts/karmada/values.yaml b/charts/karmada/values.yaml index e1918a9999bf..3ca77d9c3060 100644 --- a/charts/karmada/values.yaml +++ b/charts/karmada/values.yaml @@ -268,6 +268,9 @@ controllerManager: ## - myRegistryKeySecretName ## pullSecrets: [] + ## @param controllerManager.config.controllers the controllers launched by the manager. + config: + controllers: "" ## @param controllerManager.resources resource quota of the karmada-controller-manager resources: {} # If you do want to specify resources, uncomment the following @@ -470,6 +473,9 @@ kubeControllerManager: ## - myRegistryKeySecretName ## pullSecrets: [] + ## @param kubeControllerManager.config.controllers the controllers launched by the kubernetes manager. + config: + controllers: namespace,garbagecollector,serviceaccount-token,ttl-after-finished,bootstrapsigner,csrapproving,csrcleaner,csrsigning ## @param kubeControllerManager.resources resource quota of the kube-controller-manager resources: # If you do want to specify resources, uncomment the following