...

Package configAutomount

Overview ▾

configAutomount package provides functions to work with automounted configuration resources (Configmap, Secret, PVC) Specified at https://github.com/devfile/devworkspace-operator/blob/main/docs/additional-configuration.adoc#automatically-mounting-volumes-configmaps-and-secrets

Package configAutomount is a generated GoMock package.

type AutomountInfo

type AutomountInfo struct {
    // VolumeType gives the type of the volume (PVC, Secret, ConfigMap)
    VolumeType VolumeType
    // VolumeName is the name of the resource to mount
    VolumeName string
    // MountPath indicates on which path to mount the volume (empty if MountAs is Env)
    MountPath string
    // MountAs indicates how to mount the volume
    // - File: by default
    // - Env: As environment variables (for Secret and Configmap)
    // - Subpath: As individual files in specific paths (For Secret and ConfigMap). Keys must be provided
    MountAs MountAs
    // ReadOnly indicates to mount the volume as Read-Only
    ReadOnly bool
    // Keys defines the list of keys to mount when MountAs is Subpath
    Keys []string
    // MountAccessMode indicates the access mode for configmap and secret mounted as files
    MountAccessMode *int32
}

type Client

type Client interface {
    GetAutomountingVolumes() ([]AutomountInfo, error)
}

type KubernetesClient

type KubernetesClient struct {
    // contains filtered or unexported fields
}

func NewKubernetesClient

func NewKubernetesClient(kubeClient kclient.ClientInterface) KubernetesClient

func (KubernetesClient) GetAutomountingVolumes

func (o KubernetesClient) GetAutomountingVolumes() ([]AutomountInfo, error)

type MockClient

MockClient is a mock of Client interface.

type MockClient struct {
    // contains filtered or unexported fields
}

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance.

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClient) GetAutomountingVolumes

func (m *MockClient) GetAutomountingVolumes() ([]AutomountInfo, error)

GetAutomountingVolumes mocks base method.

type MockClientMockRecorder

MockClientMockRecorder is the mock recorder for MockClient.

type MockClientMockRecorder struct {
    // contains filtered or unexported fields
}

func (*MockClientMockRecorder) GetAutomountingVolumes

func (mr *MockClientMockRecorder) GetAutomountingVolumes() *gomock.Call

GetAutomountingVolumes indicates an expected call of GetAutomountingVolumes.

type MountAs

type MountAs int
const (
    MountAsFile MountAs = iota + 1
    MountAsSubpath
    MountAsEnv
)

type VolumeType

type VolumeType int
const (
    VolumeTypePVC VolumeType = iota + 1
    VolumeTypeConfigmap
    VolumeTypeSecret
)