Documentation
¶
Index ¶
- func KopyReconcile(k Kopier, req ctrl.Request) (ctrl.Result, error)
- type ConfigMapReconciler
- type Kopier
- type KopyConfigMap
- func (ks *KopyConfigMap) AddFinalizer() error
- func (ks *KopyConfigMap) Copy(s *corev1.ConfigMap, namespace string) error
- func (ks *KopyConfigMap) Fetch(req ctrl.Request) error
- func (ks *KopyConfigMap) GetClient() client.Client
- func (ks *KopyConfigMap) GetContext() context.Context
- func (ks *KopyConfigMap) GetObject() client.Object
- func (ks *KopyConfigMap) LabelSelector() labels.Selector
- func (ks *KopyConfigMap) MarkedForDeletion() bool
- func (ks *KopyConfigMap) SourceDeletion() error
- func (ks *KopyConfigMap) SyncDeletedCopy() error
- func (ks *KopyConfigMap) SyncOptions() bool
- func (ks *KopyConfigMap) SyncSource(namespace string) error
- type KopySecret
- func (ks *KopySecret) AddFinalizer() error
- func (ks *KopySecret) Copy(s *corev1.Secret, namespace string) error
- func (ks *KopySecret) Fetch(req ctrl.Request) error
- func (ks *KopySecret) GetClient() client.Client
- func (ks *KopySecret) GetContext() context.Context
- func (ks *KopySecret) GetObject() client.Object
- func (ks *KopySecret) LabelSelector() labels.Selector
- func (ks *KopySecret) MarkedForDeletion() bool
- func (ks *KopySecret) SourceDeletion() error
- func (ks *KopySecret) SyncDeletedCopy() error
- func (ks *KopySecret) SyncOptions() bool
- func (ks *KopySecret) SyncSource(namespace string) error
- type SecretReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigMapReconciler ¶
ConfigMapReconciler reconciles a ConfigMap object
func (*ConfigMapReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ConfigMap object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.4/pkg/reconcile
func (*ConfigMapReconciler) SetupWithManager ¶
func (r *ConfigMapReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type Kopier ¶
type Kopier interface { AddFinalizer() error Fetch(req ctrl.Request) error GetClient() client.Client GetContext() context.Context GetObject() client.Object LabelSelector() labels.Selector MarkedForDeletion() bool SyncOptions() bool SyncDeletedCopy() error SyncSource(namespace string) error SourceDeletion() error }
type KopyConfigMap ¶
func NewKopyConfigMap ¶
func NewKopyConfigMap(ctx context.Context, c client.Client) *KopyConfigMap
NewKopyConfigMap creates a new instance of KopyConfigMap
func (*KopyConfigMap) AddFinalizer ¶
func (ks *KopyConfigMap) AddFinalizer() error
AddFinalizer adds finalizer to ConfigMap object and updates object in kubernetes cluster
func (*KopyConfigMap) Copy ¶
func (ks *KopyConfigMap) Copy(s *corev1.ConfigMap, namespace string) error
Copy takes the ConfigMap Object and creates a copy in the provided target namespace
func (*KopyConfigMap) Fetch ¶
func (ks *KopyConfigMap) Fetch(req ctrl.Request) error
Fetch uses the event request to retrieve object from the cache
func (*KopyConfigMap) GetClient ¶
func (ks *KopyConfigMap) GetClient() client.Client
GetClient returns Reconciler client.Client
func (*KopyConfigMap) GetContext ¶
func (ks *KopyConfigMap) GetContext() context.Context
GetContext returns Reconciler context.Context
func (*KopyConfigMap) GetObject ¶
func (ks *KopyConfigMap) GetObject() client.Object
func (*KopyConfigMap) LabelSelector ¶
func (ks *KopyConfigMap) LabelSelector() labels.Selector
LabelSelector parses the sync annotations on ConfigMap to create a label selector
func (*KopyConfigMap) MarkedForDeletion ¶
func (ks *KopyConfigMap) MarkedForDeletion() bool
MarkedForDeletion returns true if the ConfigMap object is marked for deletion and contains the kopy sync finalizer field
func (*KopyConfigMap) SourceDeletion ¶
func (ks *KopyConfigMap) SourceDeletion() error
SourceDeletion will grab a list objects that are copies of the receiver ConfigMap object and remove the finalizer from the copies before removing the finalizer from the receiver ConfigMap object
func (*KopyConfigMap) SyncDeletedCopy ¶
func (ks *KopyConfigMap) SyncDeletedCopy() error
SyncDeletedCopy uses the labels on the receiver ConfigMap object to grab a copy of the original ConfigMap It will Remove the finalizer from the receiver ConfigMap object to allow kubernetes to delete object It will verify the receiver ConfigMap Object namespace still contains the sync labels first before syncing the ConfigMap back into namespace
func (*KopyConfigMap) SyncOptions ¶
func (ks *KopyConfigMap) SyncOptions() bool
SyncOptions returns true if the object annotations contains the sync key to be managed by the controller
func (*KopyConfigMap) SyncSource ¶
func (ks *KopyConfigMap) SyncSource(namespace string) error
type KopySecret ¶
func NewKopySecret ¶
func NewKopySecret(ctx context.Context, c client.Client) *KopySecret
NewKopySecret creates a new instance of KopySecret
func (*KopySecret) AddFinalizer ¶
func (ks *KopySecret) AddFinalizer() error
AddFinalizer adds finalizer to secret object and updates object in kubernetes cluster
func (*KopySecret) Copy ¶
func (ks *KopySecret) Copy(s *corev1.Secret, namespace string) error
Copy takes the Secret Object and creates a copy in the provided target namespace
func (*KopySecret) Fetch ¶
func (ks *KopySecret) Fetch(req ctrl.Request) error
Fetch uses the event request to retrieve object from the cache
func (*KopySecret) GetClient ¶
func (ks *KopySecret) GetClient() client.Client
GetClient returns Reconciler client.Client
func (*KopySecret) GetContext ¶
func (ks *KopySecret) GetContext() context.Context
GetContext returns Reconciler context.Context
func (*KopySecret) GetObject ¶
func (ks *KopySecret) GetObject() client.Object
func (*KopySecret) LabelSelector ¶
func (ks *KopySecret) LabelSelector() labels.Selector
LabelSelector parses the sync annotations on Secret to create a label selector
func (*KopySecret) MarkedForDeletion ¶
func (ks *KopySecret) MarkedForDeletion() bool
MarkedForDeletion returns true if the Secret object is marked for deletion and contains the kopy sync finalizer field
func (*KopySecret) SourceDeletion ¶
func (ks *KopySecret) SourceDeletion() error
SourceDeletion will grab a list objects that are copies of the receiver Secret object and remove the finalizer from the copies before removing the finalizer from the receiver Secret object
func (*KopySecret) SyncDeletedCopy ¶
func (ks *KopySecret) SyncDeletedCopy() error
SyncDeletedCopy uses the labels on the receiver Secret object to grab a copy of the original Secret It will Remove the finalizer from the receiver Secret object to allow kubernetes to delete object It will verify the receiver Secret Object namespace still contains the sync labels first before syncing the Secret back into namespace
func (*KopySecret) SyncOptions ¶
func (ks *KopySecret) SyncOptions() bool
SyncOptions returns true if the object annotations contains the sync key to be managed by the controller
func (*KopySecret) SyncSource ¶
func (ks *KopySecret) SyncSource(namespace string) error
type SecretReconciler ¶
SecretReconciler reconciles a Secret object
func (*SecretReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Secret object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.19.4/pkg/reconcile
func (*SecretReconciler) SetupWithManager ¶
func (r *SecretReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.