Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶
ValidateConfig validates the OCI Volume Provisioner config file.
Types ¶
type AuthConfig ¶
type AuthConfig struct { TenancyOCID string `yaml:"tenancy"` UserOCID string `yaml:"user"` // CompartmentOCID is DEPRECATED and should be set on the top level Config // struct. CompartmentOCID string `yaml:"compartment"` PrivateKey string `yaml:"key"` Fingerprint string `yaml:"fingerprint"` Region string `yaml:"region"` PrivateKeyPassphrase string `yaml:"passphrase"` }
AuthConfig holds the configuration required for communicating with the OCI API.
type BlockStorage ¶
type BlockStorage interface { CreateVolume(ctx context.Context, request core.CreateVolumeRequest) (response core.CreateVolumeResponse, err error) DeleteVolume(ctx context.Context, request core.DeleteVolumeRequest) (response core.DeleteVolumeResponse, err error) GetVolume(ctx context.Context, request core.GetVolumeRequest) (response core.GetVolumeResponse, err error) }
BlockStorage specifies the subset of the OCI core API utilised by the provisioner.
type Config ¶
type Config struct { Auth AuthConfig `yaml:"auth"` UseInstancePrincipals bool `yaml:"useInstancePrincipals"` // CompartmentOCID is the OCID of the Compartment within which the cluster // resides. CompartmentOCID string `yaml:"compartment"` }
Config holds the OCI cloud-provider config passed to Kubernetes compontents.
func LoadConfig ¶
LoadConfig consumes the config Reader and constructs a Config object.
type FSS ¶
type FSS interface { CreateFileSystem(ctx context.Context, request filestorage.CreateFileSystemRequest) (response filestorage.CreateFileSystemResponse, err error) GetFileSystem(ctx context.Context, request filestorage.GetFileSystemRequest) (response filestorage.GetFileSystemResponse, err error) ListFileSystems(ctx context.Context, request filestorage.ListFileSystemsRequest) (response filestorage.ListFileSystemsResponse, err error) DeleteFileSystem(ctx context.Context, request filestorage.DeleteFileSystemRequest) (response filestorage.DeleteFileSystemResponse, err error) CreateExport(ctx context.Context, request filestorage.CreateExportRequest) (response filestorage.CreateExportResponse, err error) ListExports(ctx context.Context, request filestorage.ListExportsRequest) (response filestorage.ListExportsResponse, err error) GetExport(ctx context.Context, request filestorage.GetExportRequest) (response filestorage.GetExportResponse, err error) DeleteExport(ctx context.Context, request filestorage.DeleteExportRequest) (response filestorage.DeleteExportResponse, err error) GetMountTarget(ctx context.Context, request filestorage.GetMountTargetRequest) (response filestorage.GetMountTargetResponse, err error) }
FSS specifies the subset of the OCI filestorage API utilised by the provisioner.
type Identity ¶
type Identity interface {
ListAvailabilityDomains(ctx context.Context, request identity.ListAvailabilityDomainsRequest) (response identity.ListAvailabilityDomainsResponse, err error)
}
Identity specifies the subset of the OCI identity API utilised by the provisioner.
type ProvisionerClient ¶
type ProvisionerClient interface { BlockStorage() BlockStorage Identity() Identity FSS() FSS VCN() VCN Timeout() time.Duration CompartmentOCID() string TenancyOCID() string }
ProvisionerClient is passed to all sub clients to provision a volume
func FromConfig ¶
func FromConfig(logger *zap.SugaredLogger, cfg *Config) (ProvisionerClient, error)
FromConfig creates an OCI client from the given configuration.
type VCN ¶
type VCN interface {
GetPrivateIp(ctx context.Context, request core.GetPrivateIpRequest) (response core.GetPrivateIpResponse, err error)
}
VCN specifies the subset of the OCI core API utilised by the provisioner.