Documentation
¶
Index ¶
- Variables
- func GetDeletableResources(tcp *stewardv1alpha1.TenantControlPlane, ...) []resources.DeletableResource
- func GetExternalKonnectivityResources(c client.Client) []resources.Resource
- func GetExternalTCPProxyResources(c client.Client) []resources.Resource
- func GetResources(ctx context.Context, config GroupResourceBuilderConfiguration) []resources.Resource
- type CertificateLifecycle
- func (s *CertificateLifecycle) EnqueueForKubeconfigGenerator(secret *corev1.Secret)
- func (s *CertificateLifecycle) EnqueueForTenantControlPlane(secret *corev1.Secret)
- func (s *CertificateLifecycle) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- func (s *CertificateLifecycle) SetupWithManager(mgr controllerruntime.Manager) error
- type DataStore
- type GroupDeletableResourceBuilderConfiguration
- type GroupResourceBuilderConfiguration
- type KubeconfigGeneratorReconciler
- type KubeconfigGeneratorWatcher
- type TenantControlPlaneReconciler
- func (r *TenantControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TenantControlPlaneReconciler) RemoveFinalizer(ctx context.Context, tenantControlPlane *stewardv1alpha1.TenantControlPlane) error
- func (r *TenantControlPlaneReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error
- type TenantControlPlaneReconcilerConfig
Constants ¶
This section is empty.
Variables ¶
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 ¶
func GetDeletableResources(tcp *stewardv1alpha1.TenantControlPlane, config GroupDeletableResourceBuilderConfiguration) []resources.DeletableResource
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 GetExternalTCPProxyResources ¶
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 ¶
func GetResources(ctx context.Context, config GroupResourceBuilderConfiguration) []resources.Resource
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) 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) 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) SetupWithManager ¶
func (r *KubeconfigGeneratorReconciler) SetupWithManager(mgr manager.Manager) error
type KubeconfigGeneratorWatcher ¶
type KubeconfigGeneratorWatcher struct {
Client client.Client
GeneratorChan chan event.GenericEvent
}
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) 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.