cluster

package
v0.0.0-...-e2048a1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const StatusRequeueInterval = 2 * time.Minute

Variables

This section is empty.

Functions

func ReconcileHeadscaleUser

func ReconcileHeadscaleUser(ctx context.Context, recorder record.EventRecorder, cluster *greenhousev1alpha1.Cluster, headscaleGRPCClient headscalev1.HeadscaleServiceClient) error

ReconcileHeadscaleUser ensure a user for the cluster exists in the headscale coordination server.

func ReconcilePreAuthorizationKey

func ReconcilePreAuthorizationKey(ctx context.Context, cluster *greenhousev1alpha1.Cluster, headscaleGRPCClient headscalev1.HeadscaleServiceClient, HeadscalePreAuthenticationKeyMinValidity time.Duration) (*headscalev1.PreAuthKey, error)

ReconcilePreAuthorizationKey ensure a pre-authorization key exists for the given cluster.

Types

type BootstrapReconciler

type BootstrapReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

func (*BootstrapReconciler) Reconcile

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

func (*BootstrapReconciler) SetupWithManager

func (r *BootstrapReconciler) SetupWithManager(name string, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type ClusterPropagationReconciler

type ClusterPropagationReconciler struct {
	controllers.PropagationReconciler
}

func (*ClusterPropagationReconciler) ListObjectsAsReconcileRequests

func (r *ClusterPropagationReconciler) ListObjectsAsReconcileRequests(ctx context.Context, _ client.Object) []ctrl.Request

func (*ClusterPropagationReconciler) SetupWithManager

func (r *ClusterPropagationReconciler) SetupWithManager(name string, mgr ctrl.Manager) error

func (*ClusterPropagationReconciler) StripObject

type ClusterStatusReconciler

type ClusterStatusReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

ClusterStatusReconciler reconciles the overall status of a remote cluster

func (*ClusterStatusReconciler) Reconcile

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

func (*ClusterStatusReconciler) SetupWithManager

func (r *ClusterStatusReconciler) SetupWithManager(name string, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DirectAccessReconciler

type DirectAccessReconciler struct {
	client.Client

	RemoteClusterBearerTokenValidity   time.Duration
	RenewRemoteClusterBearerTokenAfter time.Duration
	// contains filtered or unexported fields
}

DirectAccessReconciler reconciles a Cluster object with accessMode=direct set.

func (*DirectAccessReconciler) Reconcile

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

func (*DirectAccessReconciler) SetupWithManager

func (r *DirectAccessReconciler) SetupWithManager(name string, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type HeadscaleAccessReconciler

type HeadscaleAccessReconciler struct {
	client.Client

	HeadscaleGRPCURL,
	HeadscaleAPIKey,
	TailscaleProxy string
	// HeadscalePreAuthenticationKeyMinValidity is the minimum duration a pre-authentication has to be valid for.
	HeadscalePreAuthenticationKeyMinValidity,
	RemoteClusterBearerTokenValidity,
	RenewRemoteClusterBearerTokenAfter time.Duration
	// contains filtered or unexported fields
}

func (*HeadscaleAccessReconciler) Reconcile

func (*HeadscaleAccessReconciler) SetupWithManager

func (r *HeadscaleAccessReconciler) SetupWithManager(name string, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type KubeConfigHelper

type KubeConfigHelper struct {
	Host           string
	CAData         []byte
	BearerToken    string
	Username       string
	Namespace      string
	TLSServerName  string
	ProxyURL       string
	ClientCertData []byte
	ClientKeyData  []byte
}

func (*KubeConfigHelper) RestConfigToAPIConfig

func (kubeconfig *KubeConfigHelper) RestConfigToAPIConfig(clusterName string) clientcmdapi.Config

RestConfigToAPIConfig converts a rest config to a clientcmdapi.Config

Jump to

Keyboard shortcuts

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