v1.14.1 Latest Latest

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 20 Imported by: 0




View Source
const (
	ClusterSetJoinConfigAPIVersion = ""
	ClusterSetJoinConfigKind       = "ClusterSetJoinConfig"

	CreateByAntctlAnnotation = ""

	DefaultMemberNamespace = "kube-system"
	DefaultLeaderNamespace = "antrea-multicluster"


This section is empty.


func Cleanup

func Cleanup(cmd *cobra.Command, cleanOpts *CleanOptions) error

func ConvertMemberTokenSecret added in v1.9.0

func ConvertMemberTokenSecret(secret *corev1.Secret) *corev1.Secret

ConvertMemberTokenSecret generates a token Secret manifest for creating the input Secret in a member cluster.

func CreateClusterSet

func CreateClusterSet(cmd *cobra.Command, k8sClient client.Client, namespace string, clusterset string,
	leaderServer string, secret string, memberClusterID string, leaderClusterID string, leaderClusterNamespace string, createdRes *[]map[string]interface{}) error

func CreateMemberToken

func CreateMemberToken(cmd *cobra.Command, k8sClient client.Client, name string, namespace string, createdRes *[]map[string]interface{}) error

func DeleteMemberToken added in v1.9.0

func DeleteMemberToken(cmd *cobra.Command, k8sClient client.Client, name string, namespace string) error

func NewClient

func NewClient(cmd *cobra.Command) (client.Client, error)

func OutputJoinConfig added in v1.9.0

func OutputJoinConfig(cmd *cobra.Command, writer io.Writer, clusterSetID, leaderClusterID, leaderNamespace string, tokenSecret *corev1.Secret) error

func OutputMemberTokenSecret added in v1.10.0

func OutputMemberTokenSecret(tokenSecret *corev1.Secret, writer io.Writer) error

func Rollback

func Rollback(cmd *cobra.Command, k8sClient client.Client, res []map[string]interface{}) error


type CleanOptions

type CleanOptions struct {
	Namespace  string
	ClusterSet string
	K8sClient  client.Client

type ClusterSetJoinConfig added in v1.9.0

type ClusterSetJoinConfig struct {
	APIVersion      string `yaml:"apiVersion"`
	Kind            string `yaml:"kind"`
	ClusterSetID    string `yaml:"clusterSetID"`
	ClusterID       string `yaml:"clusterID,omitempty"`
	Namespace       string `yaml:"namespace,omitempty"`
	LeaderClusterID string `yaml:"leaderClusterID"`
	LeaderNamespace string `yaml:"leaderNamespace"`
	LeaderAPIServer string `yaml:"leaderAPIServer"`
	TokenSecretName string `yaml:"tokenSecretName,omitempty"`
	TokenSecretFile string `yaml:"tokenSecretFile,omitempty"`

"omitempty" fields (clusterID, namespace, tokenSecretName, tokenSecretFile) can be populated by the corresponding command line options if not set in the config file.

type FakeCtrlRuntimeClient added in v1.9.0

type FakeCtrlRuntimeClient struct {
	ShouldError bool

func (FakeCtrlRuntimeClient) Create added in v1.9.0

func (FakeCtrlRuntimeClient) Delete added in v1.9.0

func (FakeCtrlRuntimeClient) Update added in v1.9.0

Jump to

Keyboard shortcuts

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