Documentation ¶
Index ¶
- Variables
- func Add(mgr manager.Manager, opts pmemcontroller.ControllerOptions) error
- func DeleteCRD(config *rest.Config) error
- func EnsureCRDInstalled(config *rest.Config) error
- func GetDeploymentCRD() *apiextensions.CustomResourceDefinition
- func NewReconcileDeployment(client client.Client, opts pmemcontroller.ControllerOptions) (reconcile.Reconciler, error)
- type PmemCSIDriver
- type ReconcileDeployment
- func (r *ReconcileDeployment) AddHook(h ReconcileHook)
- func (r *ReconcileDeployment) Create(obj runtime.Object) error
- func (r *ReconcileDeployment) Delete(obj runtime.Object) error
- func (r *ReconcileDeployment) EventBroadcaster() record.EventBroadcaster
- func (r *ReconcileDeployment) Get(obj runtime.Object) error
- func (r *ReconcileDeployment) Namespace() string
- func (r *ReconcileDeployment) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *ReconcileDeployment) RemoveHook(h ReconcileHook)
- func (r *ReconcileDeployment) Update(obj runtime.Object) error
- func (r *ReconcileDeployment) UpdateOrCreate(obj runtime.Object) error
- type ReconcileHook
Constants ¶
This section is empty.
Variables ¶
var AllObjectTypes = []schema.GroupVersionKind{ rbacv1.SchemeGroupVersion.WithKind("RoleList"), rbacv1.SchemeGroupVersion.WithKind("ClusterRoleList"), rbacv1.SchemeGroupVersion.WithKind("RoleBindingList"), rbacv1.SchemeGroupVersion.WithKind("ClusterRoleBindingList"), corev1.SchemeGroupVersion.WithKind("ServiceAccountList"), corev1.SchemeGroupVersion.WithKind("SecretList"), corev1.SchemeGroupVersion.WithKind("ServiceList"), corev1.SchemeGroupVersion.WithKind("ConfigMapList"), appsv1.SchemeGroupVersion.WithKind("DaemonSetList"), appsv1.SchemeGroupVersion.WithKind("StatefulSetList"), storagev1beta1.SchemeGroupVersion.WithKind("CSIDriverList"), }
A list of all object types potentially created by the operator, in this or any previous release. In other words, this list may grow, but never shrink, because a newer release needs to delete objects created by an older release. This list also must be kept in sync with the operator RBAC rules.
Functions ¶
func Add ¶
func Add(mgr manager.Manager, opts pmemcontroller.ControllerOptions) error
Add creates a new Deployment Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func DeleteCRD ¶
DeleteCRD deletes the PMEM-CSI Deployment CRD. Supposed to be called while existing the operator
func EnsureCRDInstalled ¶
func GetDeploymentCRD ¶
func GetDeploymentCRD() *apiextensions.CustomResourceDefinition
func NewReconcileDeployment ¶
func NewReconcileDeployment(client client.Client, opts pmemcontroller.ControllerOptions) (reconcile.Reconciler, error)
NewReconcileDeployment creates new deployment reconciler
Types ¶
type PmemCSIDriver ¶
type PmemCSIDriver struct { *api.Deployment // contains filtered or unexported fields }
func (*PmemCSIDriver) Reconcile ¶
func (d *PmemCSIDriver) Reconcile(r *ReconcileDeployment) (bool, error)
Reconcile reconciles the driver deployment
type ReconcileDeployment ¶
type ReconcileDeployment struct {
// contains filtered or unexported fields
}
ReconcileDeployment reconciles a Deployment object
func (*ReconcileDeployment) AddHook ¶ added in v0.8.0
func (r *ReconcileDeployment) AddHook(h ReconcileHook)
AddHook adds given reconcile hook to hooks list
func (*ReconcileDeployment) Create ¶
func (r *ReconcileDeployment) Create(obj runtime.Object) error
Create create new Kubernetes object
func (*ReconcileDeployment) Delete ¶
func (r *ReconcileDeployment) Delete(obj runtime.Object) error
Delete delete existing Kubernetes object
func (*ReconcileDeployment) EventBroadcaster ¶ added in v0.8.0
func (r *ReconcileDeployment) EventBroadcaster() record.EventBroadcaster
func (*ReconcileDeployment) Get ¶
func (r *ReconcileDeployment) Get(obj runtime.Object) error
Get tries to retrives the Kubernetes objects
func (*ReconcileDeployment) Namespace ¶
func (r *ReconcileDeployment) Namespace() string
func (*ReconcileDeployment) Reconcile ¶
Reconcile reads that state of the cluster for a Deployment object and makes changes based on the state read and what is in the Deployment.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
func (*ReconcileDeployment) RemoveHook ¶ added in v0.8.0
func (r *ReconcileDeployment) RemoveHook(h ReconcileHook)
RemoveHook removes previously added hook
func (*ReconcileDeployment) Update ¶
func (r *ReconcileDeployment) Update(obj runtime.Object) error
Update updates existing Kubernetes object. The object must be a modified copy of the existing object in the apiserver.
func (*ReconcileDeployment) UpdateOrCreate ¶
func (r *ReconcileDeployment) UpdateOrCreate(obj runtime.Object) error
UpdateOrCreate updates the spec of an existing object or, if it does not exist yet, creates it.
type ReconcileHook ¶ added in v0.8.0
type ReconcileHook *func(d *pmemcsiv1alpha1.Deployment)
ReconcileHook function to be invoked on reconciling a deployment.