controllers

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// A finalizer that is added to the VCluster CR to ensure that helm delete is executed.
	CleanupFinalizer = "vcluster.loft.sh/cleanup"

	DefaultControlPlanePort = 443

	// KubeconfigDataName is the key used to store a Kubeconfig in the secret's data field.
	KubeconfigDataName = "value"
)

Variables

This section is empty.

Functions

func DiscoverHostFromService

func DiscoverHostFromService(ctx context.Context, client client.Client, vCluster *v1alpha1.VCluster) (string, error)

func EnsureFinalizer

func EnsureFinalizer(ctx context.Context, client client.Client, obj client.Object, finalizer string) error

func GetVClusterKubeConfig

func GetVClusterKubeConfig(ctx context.Context, clusterClient client.Client, vCluster *v1alpha1.VCluster) (*api.Config, error)

func RemoveFinalizer

func RemoveFinalizer(ctx context.Context, client client.Client, obj client.Object, finalizer string) error

Types

type ClientConfigGetter

type ClientConfigGetter interface {
	NewForConfig(restConfig *rest.Config) (kubernetes.Interface, error)
}

func NewClientConfigGetter

func NewClientConfigGetter() ClientConfigGetter

type Credentials

type Credentials struct {
	ClientCert []byte
	ClientKey  []byte
}

func GetVClusterCredentials

func GetVClusterCredentials(ctx context.Context, clusterClient client.Client, vCluster *v1alpha1.VCluster) (*Credentials, error)

type HTTPClientGetter

type HTTPClientGetter interface {
	ClientFor(r http.RoundTripper, timeout time.Duration) *http.Client
}

func NewHTTPClientGetter

func NewHTTPClientGetter() HTTPClientGetter

type VClusterReconciler

type VClusterReconciler struct {
	client.Client
	HelmClient         helm.Client
	HelmSecrets        *helm.Secrets
	Log                logr.Logger
	Scheme             *runtime.Scheme
	ClientConfigGetter ClientConfigGetter
	HTTPClientGetter   HTTPClientGetter
	// contains filtered or unexported fields
}

VClusterReconciler reconciles a VCluster object

func (*VClusterReconciler) Reconcile

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

func (*VClusterReconciler) SetupWithManager

func (r *VClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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