controllers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingDataStore = errors.New("the Tenant Control Plane doesn't have a DataStore assigned, and Steward is running with no default DataStore fallback")

Functions

func GetDeletableResources

GetDeletableResources returns a list of resources that have to be deleted when tenant control planes are deleted Currently there is only a default approach TODO: the idea of this function is to become a factory to return the group of deletable resources according to the given configuration.

func GetExternalKonnectivityResources

func GetExternalKonnectivityResources(c client.Client) []resources.Resource

func GetExternalTCPProxyResources

func GetExternalTCPProxyResources(c client.Client) []resources.Resource

GetExternalTCPProxyResources returns the ordered list of tcp-proxy resources to be reconciled inside the tenant cluster by the soot controller. Order: RBAC first (SA → ClusterRole → CRB), then Service, then Deployment.

func GetResources

GetResources returns a list of resources that will be used to provide tenant control planes Currently there is only a default approach TODO: the idea of this function is to become a factory to return the group of resources according to the given configuration.

Types

type CertificateLifecycle

type CertificateLifecycle struct {
	Channel   chan event.GenericEvent
	Deadline  time.Duration
	EnqueueFn func(secret *corev1.Secret)
	// contains filtered or unexported fields
}

func (*CertificateLifecycle) EnqueueForKubeconfigGenerator

func (s *CertificateLifecycle) EnqueueForKubeconfigGenerator(secret *corev1.Secret)

func (*CertificateLifecycle) EnqueueForTenantControlPlane

func (s *CertificateLifecycle) EnqueueForTenantControlPlane(secret *corev1.Secret)

func (*CertificateLifecycle) Reconcile

func (*CertificateLifecycle) SetupWithManager

func (s *CertificateLifecycle) SetupWithManager(mgr controllerruntime.Manager) error

type DataStore

type DataStore struct {
	Client client.Client
	// TenantControlPlaneTrigger is the channel used to communicate across the controllers:
	// if a Data Source is updated, we have to be sure that the reconciliation of the certificates content
	// for each Tenant Control Plane is put in place properly.
	TenantControlPlaneTrigger chan event.GenericEvent
}

func (*DataStore) Reconcile

func (r *DataStore) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

func (*DataStore) SetupWithManager

func (r *DataStore) SetupWithManager(mgr controllerruntime.Manager) error

type GroupDeletableResourceBuilderConfiguration

type GroupDeletableResourceBuilderConfiguration struct {
	// contains filtered or unexported fields
}

type GroupResourceBuilderConfiguration

type GroupResourceBuilderConfiguration struct {
	ExpirationThreshold           time.Duration
	Connection                    datastore.Connection
	DataStore                     stewardv1alpha1.DataStore
	DataStoreOverrides            []builder.DataStoreOverrides
	DataStoreOverriedsConnections map[string]datastore.Connection
	StewardNamespace              string
	StewardServiceAccount         string
	StewardService                string
	StewardMigrateImage           string
	DiscoveryClient               discovery.DiscoveryInterface
	// contains filtered or unexported fields
}

type KubeconfigGeneratorReconciler

type KubeconfigGeneratorReconciler struct {
	Client            client.Client
	NotValidThreshold time.Duration
	CertificateChan   chan event.GenericEvent
}

func (*KubeconfigGeneratorReconciler) Reconcile

func (*KubeconfigGeneratorReconciler) SetupWithManager

func (r *KubeconfigGeneratorReconciler) SetupWithManager(mgr manager.Manager) error

type KubeconfigGeneratorWatcher

type KubeconfigGeneratorWatcher struct {
	Client        client.Client
	GeneratorChan chan event.GenericEvent
}

func (*KubeconfigGeneratorWatcher) Reconcile

func (*KubeconfigGeneratorWatcher) SetupWithManager

func (r *KubeconfigGeneratorWatcher) SetupWithManager(mgr manager.Manager) error

type TenantControlPlaneReconciler

type TenantControlPlaneReconciler struct {
	Client                  client.Client
	APIReader               client.Reader
	Config                  TenantControlPlaneReconcilerConfig
	TriggerChan             chan event.GenericEvent
	StewardNamespace        string
	StewardServiceAccount   string
	StewardService          string
	StewardMigrateImage     string
	MaxConcurrentReconciles int
	ReconcileTimeout        time.Duration
	DiscoveryClient         discovery.DiscoveryInterface
	// CertificateChan is the channel used by the CertificateLifecycleController that is checking for
	// certificates and kubeconfig user certs validity: a generic event for the given TCP will be triggered
	// once the validity threshold for the given certificate is reached.
	CertificateChan chan event.GenericEvent
	// contains filtered or unexported fields
}

TenantControlPlaneReconciler reconciles a TenantControlPlane object.

func (*TenantControlPlaneReconciler) Reconcile

func (*TenantControlPlaneReconciler) RemoveFinalizer

func (r *TenantControlPlaneReconciler) RemoveFinalizer(ctx context.Context, tenantControlPlane *stewardv1alpha1.TenantControlPlane) error

func (*TenantControlPlaneReconciler) SetupWithManager

func (r *TenantControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TenantControlPlaneReconcilerConfig

type TenantControlPlaneReconcilerConfig struct {
	DefaultDataStoreName    string
	KineContainerImage      string
	TmpBaseDirectory        string
	CertExpirationThreshold time.Duration
}

TenantControlPlaneReconcilerConfig gives the necessary configuration for TenantControlPlaneReconciler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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