fleet

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterKind         = "Cluster"
	AttachedClusterKind = "AttachedCluster"
)
View Source
const (
	FleetFinalizer = "fleet.kurator.dev"

	RequeueAfter = 5 * time.Second
	// TODO: remove as we have `FleetNameLabel`
	FleetLabel = "fleet.kurator.dev/fleet-name"
)
View Source
const (
	MonitoringNamespace         = "monitoring"
	PrometheusThanosServiceName = "prometheus-prometheus-thanos"

	NoneClusterIP = "None"
)
View Source
const (
	AccessKey = "access-key"
	SecretKey = "secret-key"

	AWS         = "aws"
	HuaWeiCloud = "huaweicloud"
	GCP         = "gcp"
	Azure       = "azure"

	AWSObjStoreSecretNameSuffix         = "-velero-s3"
	HuaWeiCloudObjStoreSecretNameSuffix = "-velero-obs"
	GCPObjStoreSecretNameSuffix         = "-velero-gcs"
	AzureObjStoreSecretNameSuffix       = "-velero-abs"

	ObjStoreSecretNamespace = "velero"
)
View Source
const (
	FleetNameLabel  = "fleet.kurator.dev/name"
	FleetPluginName = "fleet.kurator.dev/plugin"

	ManagedByLabel        = "app.kubernetes.io/managed-by"
	ManagedByFleetManager = "fleet-manager"
)
View Source
const FleetWorkerClusterRoleBindingName = "fleet-worker"
View Source
const KarmadaCtlImage = "ghcr.io/kurator-dev/karmadactl:v0.1.0"
View Source
const ServiceAccountName = "fleet-manager-worker"

Variables

This section is empty.

Functions

func BuildFleetClusters added in v0.6.0

func BuildFleetClusters(ctx context.Context, client client.Client, fleet *fleetapi.Fleet) (map[ClusterKey]*FleetCluster, error)

func ClientForCluster added in v0.6.0

func ClientForCluster(client client.Client, ns string, cluster ClusterInterface) (*kclient.Client, error)

Types

type ClusterInterface added in v0.4.0

type ClusterInterface interface {
	IsReady() bool
	GetObject() client.Object
	GetSecretName() string
	GetSecretKey() string
}

TODO: rename to FleetCluster?

type ClusterKey added in v0.4.0

type ClusterKey struct {
	Kind string
	Name string
}

type FleetCluster added in v0.6.0

type FleetCluster struct {
	Secret    string
	SecretKey string
	Client    *kclient.Client
}

func (FleetCluster) GetRuntimeClient added in v0.6.0

func (cluster FleetCluster) GetRuntimeClient() client.Client

type FleetManager

type FleetManager struct {
	client.Client
	Scheme    *runtime.Scheme
	Manifests fs.FS
}

FleetManager reconciles a Cluster object

func (*FleetManager) Reconcile

func (f *FleetManager) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*FleetManager) SetupWithManager

func (f *FleetManager) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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