multicluster

package
v0.0.0-...-18e089f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultResyncPeriod    = 120 * time.Second
	DefaultHostClusterName = "host"

	ClusterRoleHost   = "host"
	ClusterRoleMember = "member"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Enable
	// Deprecated: this field will be removed in the future version, use ClusterRole instead.
	Enable bool `json:"enable" yaml:"enable"`

	// ProxyPublishService is the service name of multicluster component tower.
	//   If this field provided, apiserver going to use the ingress.ip of this service.
	// This field will be used when generating agent deployment yaml for joining clusters.
	ProxyPublishService string `json:"proxyPublishService,omitempty" yaml:"proxyPublishService,omitempty"`

	// ProxyPublishAddress is the public address of tower for all cluster agents.
	//   This field takes precedence over field ProxyPublishService.
	// If both field ProxyPublishService and ProxyPublishAddress are empty, apiserver will
	// return 404 Not Found for all cluster agent yaml requests.
	ProxyPublishAddress string `json:"proxyPublishAddress,omitempty" yaml:"proxyPublishAddress,omitempty"`

	// AgentImage is the image used when generating deployment for all cluster agents.
	AgentImage string `json:"agentImage,omitempty" yaml:"agentImage,omitempty"`

	// ClusterControllerResyncPeriod is the resync period used by cluster controller.
	ClusterControllerResyncPeriod time.Duration `json:"clusterControllerResyncPeriod,omitempty" yaml:"clusterControllerResyncPeriod,omitempty"`

	// HostClusterName is the name of the control plane cluster, default set to host.
	HostClusterName string `json:"hostClusterName,omitempty" yaml:"hostClusterName,omitempty"`

	// ClusterName is the name of the current cluster,
	// this value will be set by the cluster-controller and stored in the kubesphere-config configmap.
	ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"`

	// ClusterRole is the role of the current cluster,
	// available values: host, member.
	ClusterRole string `json:"clusterRole,omitempty" yaml:"clusterRole,omitempty"`
}

func NewOptions

func NewOptions() *Options

NewOptions returns a default nil options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet, s *Options)

func (*Options) Validate

func (o *Options) Validate() []error

Jump to

Keyboard shortcuts

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