Documentation ¶
Index ¶
- 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) ClusterRoleBindingFromSpec(clusterRoleBindingName, clusterRoleName, saName string) *rbacv1.ClusterRoleBinding
- func (i *CommandInitOption) ClusterRoleFromSpec(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole
- func (i *CommandInitOption) Complete() error
- func (i *CommandInitOption) CreateClusterRole() error
- func (i *CommandInitOption) CreateClusterRoleBinding(clusterRole *rbacv1.ClusterRoleBinding) 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(_ io.Writer, 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 { 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 StorageClassesName string KarmadaDataPath 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) ClusterRoleBindingFromSpec ¶
func (i *CommandInitOption) ClusterRoleBindingFromSpec(clusterRoleBindingName, clusterRoleName, saName string) *rbacv1.ClusterRoleBinding
ClusterRoleBindingFromSpec ClusterRoleBinding spec
func (*CommandInitOption) ClusterRoleFromSpec ¶
func (i *CommandInitOption) ClusterRoleFromSpec(name string, rules []rbacv1.PolicyRule) *rbacv1.ClusterRole
ClusterRoleFromSpec ClusterRole spec
func (*CommandInitOption) Complete ¶
func (i *CommandInitOption) Complete() error
Complete Initialize k8s client
func (*CommandInitOption) CreateClusterRole ¶
func (i *CommandInitOption) CreateClusterRole() error
CreateClusterRole receive ClusterRoleFromSpec ClusterRole
func (*CommandInitOption) CreateClusterRoleBinding ¶
func (i *CommandInitOption) CreateClusterRoleBinding(clusterRole *rbacv1.ClusterRoleBinding) error
CreateClusterRoleBinding receive ClusterRoleBindingFromSpec 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(_ io.Writer, 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.