Documentation ¶
Index ¶
- Constants
- func SupportedStorageMode() []string
- func WaitEtcdReplicasetInDesired(replicas int32, c *kubernetes.Clientset, namespace, selector string, ...) error
- func WaitPodReady(c *kubernetes.Clientset, namespace, selector string, timeout int) error
- type CommandInitOption
- func (i *CommandInitOption) AddNodeSelectorLabels() error
- func (i *CommandInitOption) Complete() error
- func (i *CommandInitOption) CreateControllerManagerRBAC() error
- func (i *CommandInitOption) CreateNamespace() error
- func (i *CommandInitOption) CreateSecret(secret *corev1.Secret) error
- func (i *CommandInitOption) CreateService(service *corev1.Service) error
- func (i *CommandInitOption) CreateServiceAccount() error
- func (i *CommandInitOption) RunInit(parentCommand string) error
- func (i *CommandInitOption) SecretFromSpec(name string, secretType corev1.SecretType, data map[string]string) *corev1.Secret
- func (i *CommandInitOption) ServiceAccountFromSpec(name []string) []corev1.ServiceAccount
- func (i *CommandInitOption) Validate(parentCommand string) error
Constants ¶
const (
// KubeConfigSecretAndMountName is the secret and volume mount name of karmada kubeconfig
KubeConfigSecretAndMountName = "kubeconfig"
)
Variables ¶
This section is empty.
Functions ¶
func SupportedStorageMode ¶ added in v1.3.0
func SupportedStorageMode() []string
SupportedStorageMode Return install etcd supported storage mode
func WaitEtcdReplicasetInDesired ¶
func WaitEtcdReplicasetInDesired(replicas int32, c *kubernetes.Clientset, namespace, selector string, timeout int) error
WaitEtcdReplicasetInDesired Wait Etcd Ready
func WaitPodReady ¶
func WaitPodReady(c *kubernetes.Clientset, namespace, selector string, timeout int) error
WaitPodReady wait pod ready
Types ¶
type CommandInitOption ¶
type CommandInitOption struct { KubeImageRegistry string KubeImageMirrorCountry string EtcdImage string EtcdReplicas int32 EtcdInitImage string EtcdStorageMode string EtcdHostDataPath string EtcdNodeSelectorLabels string EtcdPersistentVolumeSize string KarmadaAPIServerImage string KarmadaAPIServerReplicas int32 KarmadaAPIServerNodePort int32 KarmadaSchedulerImage string KarmadaSchedulerReplicas int32 KubeControllerManagerImage string KubeControllerManagerReplicas int32 KarmadaControllerManagerImage string KarmadaControllerManagerReplicas int32 KarmadaWebhookImage string KarmadaWebhookReplicas int32 KarmadaAggregatedAPIServerImage string KarmadaAggregatedAPIServerReplicas int32 Namespace string KubeConfig string Context string StorageClassesName string KarmadaDataPath string KarmadaPkiPath string CRDs string ExternalIP string ExternalDNS string KubeClientSet *kubernetes.Clientset CertAndKeyFileData map[string][]byte RestConfig *rest.Config KarmadaAPIServerIP []net.IP }
CommandInitOption holds all flags options for init.
func (*CommandInitOption) AddNodeSelectorLabels ¶
func (i *CommandInitOption) AddNodeSelectorLabels() error
AddNodeSelectorLabels When EtcdStorageMode is hostPath, and EtcdNodeSelectorLabels is empty. Select a healthy node to add labels, and schedule etcd to that node
func (*CommandInitOption) Complete ¶
func (i *CommandInitOption) Complete() error
Complete Initialize k8s client
func (*CommandInitOption) CreateControllerManagerRBAC ¶ added in v1.2.0
func (i *CommandInitOption) CreateControllerManagerRBAC() error
CreateControllerManagerRBAC karmada-controller-manager ClusterRole and ClusterRoleBinding
func (*CommandInitOption) CreateNamespace ¶
func (i *CommandInitOption) CreateNamespace() error
CreateNamespace namespace IfNotExist
func (*CommandInitOption) CreateSecret ¶
func (i *CommandInitOption) CreateSecret(secret *corev1.Secret) error
CreateSecret receive SecretFromSpec create secret
func (*CommandInitOption) CreateService ¶
func (i *CommandInitOption) CreateService(service *corev1.Service) error
CreateService create service
func (*CommandInitOption) CreateServiceAccount ¶
func (i *CommandInitOption) CreateServiceAccount() error
CreateServiceAccount receive ServiceAccountFromSpec create sa
func (*CommandInitOption) RunInit ¶
func (i *CommandInitOption) RunInit(parentCommand string) error
RunInit Deploy karmada in kubernetes
func (*CommandInitOption) SecretFromSpec ¶
func (i *CommandInitOption) SecretFromSpec(name string, secretType corev1.SecretType, data map[string]string) *corev1.Secret
SecretFromSpec secret spec
func (*CommandInitOption) ServiceAccountFromSpec ¶
func (i *CommandInitOption) ServiceAccountFromSpec(name []string) []corev1.ServiceAccount
ServiceAccountFromSpec sa spec
func (*CommandInitOption) Validate ¶
func (i *CommandInitOption) Validate(parentCommand string) error
Validate Check that there are enough flags to run the command.