kubernetes

package
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL