Documentation
¶
Index ¶
- Constants
- Variables
- func Add(mgr manager.Manager, context *clusterd.Context, ...) error
- func CreateCSISecrets(context *clusterd.Context, clusterInfo *client.ClusterInfo, ...) error
- func CreateCsiConfigMap(ctx context.Context, namespace string, clientset kubernetes.Interface, ...) error
- func CreateDefaultClientProfile(c client.Client, clusterInfo *cephclient.ClusterInfo) error
- func CreateUpdateCephConnection(c client.Client, clusterInfo *cephclient.ClusterInfo, ...) error
- func CreateUpdateClientProfileRadosNamespace(ctx context.Context, c client.Client, clusterInfo *cephclient.ClusterInfo, ...) error
- func CreateUpdateClientProfileSubVolumeGroup(ctx context.Context, c client.Client, clusterInfo *cephclient.ClusterInfo, ...) error
- func FormatCsiClusterConfig(clusterKey string, mons map[string]*cephclient.MonInfo) (string, error)
- func MonEndpoints(mons map[string]*cephclient.MonInfo, requireMsgr2 bool) []string
- func ReadAffinityEnabled(desiredEnabled bool, version cephver.CephVersion) bool
- type CSIClusterConfigEntry
- type ReconcileCSI
Constants ¶
const ( CsiRBDPlugin = "csi-rbdplugin" CsiCephFSPlugin = "csi-cephfsplugin" CsiNFSPlugin = "csi-nfsplugin" )
const ( CsiRBDNodeSecret = "rook-csi-rbd-node" CsiRBDProvisionerSecret = "rook-csi-rbd-provisioner" )
const ( CsiCephFSNodeSecret = "rook-csi-cephfs-node" CsiCephFSProvisionerSecret = "rook-csi-cephfs-provisioner" )
Variables ¶
var ( CephFSDriverName string NFSDriverName string RBDDriverName string ConfigName = "rook-ceph-csi-config" ConfigKey = "csi-cluster-config-json" )
Functions ¶
func Add ¶ added in v1.8.0
func Add(mgr manager.Manager, context *clusterd.Context, opManagerContext context.Context, opConfig opcontroller.OperatorConfig) error
Add creates a new Ceph CSI Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func CreateCSISecrets ¶ added in v1.1.3
func CreateCSISecrets(context *clusterd.Context, clusterInfo *client.ClusterInfo, clusterNamespaced types.NamespacedName) error
CreateCSISecrets creates all the Kubernetes CSI Secrets
func CreateCsiConfigMap ¶ added in v1.1.0
func CreateCsiConfigMap(ctx context.Context, namespace string, clientset kubernetes.Interface, ownerInfo *k8sutil.OwnerInfo) error
CreateCsiConfigMap creates an empty config map that will be later used to provide cluster configuration to ceph-csi. If a config map already exists, it will return it.
func CreateDefaultClientProfile ¶ added in v1.15.0
func CreateDefaultClientProfile(c client.Client, clusterInfo *cephclient.ClusterInfo) error
CreateDefaultClientProfile creates a default client profile for csi-operator to connect driver
func CreateUpdateCephConnection ¶ added in v1.15.0
func CreateUpdateCephConnection(c client.Client, clusterInfo *cephclient.ClusterInfo, clusterSpec cephv1.ClusterSpec) error
func CreateUpdateClientProfileRadosNamespace ¶ added in v1.15.0
func CreateUpdateClientProfileRadosNamespace(ctx context.Context, c client.Client, clusterInfo *cephclient.ClusterInfo, cephBlockPoolRadosNamespaceName, clusterID string) error
func CreateUpdateClientProfileSubVolumeGroup ¶ added in v1.15.0
func CreateUpdateClientProfileSubVolumeGroup(ctx context.Context, c client.Client, clusterInfo *cephclient.ClusterInfo, cephFilesystemSubVolumeGroupName, clusterID string, csiMetadataRadosNamespace string) error
func FormatCsiClusterConfig ¶ added in v1.1.0
func FormatCsiClusterConfig( clusterKey string, mons map[string]*cephclient.MonInfo, ) (string, error)
FormatCsiClusterConfig returns a json-formatted string containing the cluster-to-mon mapping required to configure ceph csi.
func MonEndpoints ¶ added in v1.8.3
func MonEndpoints(mons map[string]*cephclient.MonInfo, requireMsgr2 bool) []string
func ReadAffinityEnabled ¶ added in v1.18.9
func ReadAffinityEnabled(desiredEnabled bool, version cephver.CephVersion) bool
Types ¶
type CSIClusterConfigEntry ¶ added in v1.14.0
type CSIClusterConfigEntry struct {
cephcsi.ClusterInfo
Namespace string `json:"namespace"`
}
type ReconcileCSI ¶ added in v1.8.0
type ReconcileCSI struct {
// contains filtered or unexported fields
}
ReconcileCSI reconciles a ceph-csi driver
func (*ReconcileCSI) Reconcile ¶ added in v1.8.0
func (r *ReconcileCSI) Reconcile(context context.Context, request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the operator config map and makes changes based on the state read 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.