Documentation ¶
Index ¶
- func GetConfigDirectory() string
- func GetConfigPath() string
- func GetDriverDirectory() string
- func GetKubeconfigPath() string
- type OCIFlexvolumeDriver
- func (d OCIFlexvolumeDriver) Attach(logger *zap.SugaredLogger, opts flexvolume.Options, nodeName string) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) Detach(logger *zap.SugaredLogger, pvOrVolumeName, nodeName string) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) Init(logger *zap.SugaredLogger) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) IsAttached(logger *zap.SugaredLogger, opts flexvolume.Options, nodeName string) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) Mount(logger *zap.SugaredLogger, mountDir string, opts flexvolume.Options) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) MountDevice(logger *zap.SugaredLogger, mountDir, mountDevice string, ...) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) Unmount(logger *zap.SugaredLogger, mountDir string) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) UnmountDevice(logger *zap.SugaredLogger, mountPath string) flexvolume.DriverStatus
- func (d OCIFlexvolumeDriver) WaitForAttach(mountDevice string, _ flexvolume.Options) flexvolume.DriverStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigDirectory ¶
func GetConfigDirectory() string
GetConfigDirectory gets the path to where config files are stored.
func GetConfigPath ¶
func GetConfigPath() string
GetConfigPath gets the path to the OCI API credentials.
func GetDriverDirectory ¶
func GetDriverDirectory() string
GetDriverDirectory gets the ath for the flexvolume driver either from the env or default.
func GetKubeconfigPath ¶
func GetKubeconfigPath() string
GetKubeconfigPath gets the override path of the 'kubeconfig'. This override can be uses to explicitly set the name and location of the kubeconfig file via the OCI_FLEXD_KUBECONFIG_PATH environment variable. If this value is not specified then the default GetConfigDirectory mechanism is used.
Types ¶
type OCIFlexvolumeDriver ¶
type OCIFlexvolumeDriver struct { K kubernetes.Interface // contains filtered or unexported fields }
OCIFlexvolumeDriver implements the flexvolume.Driver interface for OCI.
func NewOCIFlexvolumeDriver ¶
func NewOCIFlexvolumeDriver(logger *zap.SugaredLogger) (fvd *OCIFlexvolumeDriver, err error)
NewOCIFlexvolumeDriver creates a new driver
func (OCIFlexvolumeDriver) Attach ¶
func (d OCIFlexvolumeDriver) Attach(logger *zap.SugaredLogger, opts flexvolume.Options, nodeName string) flexvolume.DriverStatus
Attach initiates the attachment of the given OCI volume to the k8s worker node.
func (OCIFlexvolumeDriver) Detach ¶
func (d OCIFlexvolumeDriver) Detach(logger *zap.SugaredLogger, pvOrVolumeName, nodeName string) flexvolume.DriverStatus
Detach detaches the volume from the worker node.
func (OCIFlexvolumeDriver) Init ¶
func (d OCIFlexvolumeDriver) Init(logger *zap.SugaredLogger) flexvolume.DriverStatus
Init checks that we have the appropriate credentials and metadata API access on driver initialisation.
func (OCIFlexvolumeDriver) IsAttached ¶
func (d OCIFlexvolumeDriver) IsAttached(logger *zap.SugaredLogger, opts flexvolume.Options, nodeName string) flexvolume.DriverStatus
IsAttached checks whether the volume is attached to the host. TODO(apryde): The documentation states that this is called from the Kubelet and KCM. Implementation requries credentials which won't be present on nodes but I've only ever seen it called by the KCM.
func (OCIFlexvolumeDriver) Mount ¶
func (d OCIFlexvolumeDriver) Mount(logger *zap.SugaredLogger, mountDir string, opts flexvolume.Options) flexvolume.DriverStatus
Mount is unimplemented as we use the --enable-controller-attach-detach flow and as such mount the drive in MountDevice().
func (OCIFlexvolumeDriver) MountDevice ¶
func (d OCIFlexvolumeDriver) MountDevice(logger *zap.SugaredLogger, mountDir, mountDevice string, opts flexvolume.Options) flexvolume.DriverStatus
MountDevice connects the iSCSI target on the k8s worker node before mounting and (if necessary) formatting the disk.
func (OCIFlexvolumeDriver) Unmount ¶
func (d OCIFlexvolumeDriver) Unmount(logger *zap.SugaredLogger, mountDir string) flexvolume.DriverStatus
Unmount is unimplemented as we use the --enable-controller-attach-detach flow and as such unmount the drive in UnmountDevice().
func (OCIFlexvolumeDriver) UnmountDevice ¶
func (d OCIFlexvolumeDriver) UnmountDevice(logger *zap.SugaredLogger, mountPath string) flexvolume.DriverStatus
UnmountDevice unmounts the disk, logs out the iscsi target, and deletes the iscsi node record.
func (OCIFlexvolumeDriver) WaitForAttach ¶
func (d OCIFlexvolumeDriver) WaitForAttach(mountDevice string, _ flexvolume.Options) flexvolume.DriverStatus
WaitForAttach searches for the the volume attachment created by Attach() and waits for its life cycle state to reach ATTACHED.