Documentation ¶
Index ¶
- type Config
- func (c *Config) GetAllInitContainers() []string
- func (c *Config) GetAllSideCars() []string
- func (c *Config) GetControllerEnvs() []corev1.EnvVar
- func (c *Config) GetControllerInitContainers() []string
- func (c *Config) GetControllerVolumeMounts() []corev1.VolumeMount
- func (c *Config) GetControllerVolumes() []corev1.Volume
- func (c *Config) GetDefaultImageTag(imageName string) (string, error)
- func (c *Config) GetDriverArgs() []string
- func (c *Config) GetDriverControllerTolerations() []corev1.Toleration
- func (c *Config) GetDriverNodeTolerations() []corev1.Toleration
- func (c *Config) GetInitContainerArgs(InitContainerType csiv1.ImageType) []string
- func (c *Config) GetInitContainerEnvs(InitContainerType csiv1.ImageType) []corev1.EnvVar
- func (c *Config) GetInitContainerVolMounts(InitContainerType csiv1.ImageType) []corev1.VolumeMount
- func (c *Config) GetMandatoryEnvNames(driverContainerType string) []string
- func (c *Config) GetMandatorySideCars() []string
- func (c *Config) GetMandatoryStorageClassParams() []string
- func (c *Config) GetNodeEnvs() []corev1.EnvVar
- func (c *Config) GetNodeInitContainers() []string
- func (c *Config) GetNodeVolumeMounts() []corev1.VolumeMount
- func (c *Config) GetNodeVolumes() []corev1.Volume
- func (c *Config) GetSideCarArgs(sidecarType csiv1.ImageType) []string
- func (c *Config) GetSideCarEnvs(sidecarType csiv1.ImageType) []corev1.EnvVar
- func (c *Config) GetSideCarVolMounts(sidecarType csiv1.ImageType) []corev1.VolumeMount
- func (c *Config) InitDriverConfig(configDirectory string) error
- func (c *Config) IsControllerHAEnabled(imageName string) bool
- func (c *Config) ValidateEnvironmentVarType(envFromSpec corev1.EnvVar) (bool, error)
- type ConfigVersionParams
- type ContainerApp
- type DriverConfig
- type DriverConfigMap
- type DriverConfigParams
- type DriverEnv
- type EnvDataType
- type ImageTag
- type InitContainerParams
- type OpConfig
- func (opConfig *OpConfig) GetDefaultImageTags(driverType csiv1.DriverType, configVersion string, k8sVersion csiv1.K8sVersion) (map[string]string, error)
- func (opConfig *OpConfig) GetSupportedK8sVersions() []csiv1.K8sVersion
- func (opConfig *OpConfig) IsSupportedVersion(driverType csiv1.DriverType, driverConfigVersion string, ...) error
- type SidecarParams
- type StorageClassAttr
- type StorageClassParam
- type SupportedVersionParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ConfigVersion string ConfigFileName string KubeAPIVersion csiv1.K8sVersion DriverType csiv1.DriverType DriverVersion string DriverConfig *DriverConfig StrictCheck bool Log logr.Logger IsOpenShift bool // contains filtered or unexported fields }
Config - Represents overall configuration including driver specific configuration
func (*Config) GetAllInitContainers ¶
GetAllInitContainers - Returns a slice of all init container names
func (*Config) GetAllSideCars ¶
GetAllSideCars - Returns a slice of all side car container names
func (*Config) GetControllerEnvs ¶
GetControllerEnvs - Returns an array of corev1.EnvVar
func (*Config) GetControllerInitContainers ¶
GetControllerInitContainers - Returns a slice of all init container names for controller
func (*Config) GetControllerVolumeMounts ¶
func (c *Config) GetControllerVolumeMounts() []corev1.VolumeMount
GetControllerVolumeMounts - Returns an array of corev1.VolumeMount for the Controller
func (*Config) GetControllerVolumes ¶
GetControllerVolumes - Returns an array of corev1.Volume for the Controller
func (*Config) GetDefaultImageTag ¶
GetDefaultImageTag - Returns the default image tag for a given image name
func (*Config) GetDriverArgs ¶
GetDriverArgs - Returns arguments for the driver container
func (*Config) GetDriverControllerTolerations ¶
func (c *Config) GetDriverControllerTolerations() []corev1.Toleration
GetDriverControllerTolerations - Returns tolerations for the controller
func (*Config) GetDriverNodeTolerations ¶
func (c *Config) GetDriverNodeTolerations() []corev1.Toleration
GetDriverNodeTolerations - Returns tolerations for the node
func (*Config) GetInitContainerArgs ¶
GetInitContainerArgs - Returns a slice of arguments (strings) for an Init Container
func (*Config) GetInitContainerEnvs ¶
GetInitContainerEnvs - Returns a slice of Envs for initContainer
func (*Config) GetInitContainerVolMounts ¶
func (c *Config) GetInitContainerVolMounts(InitContainerType csiv1.ImageType) []corev1.VolumeMount
GetInitContainerVolMounts - Returns a slice of volume mounts for a initContainers
func (*Config) GetMandatoryEnvNames ¶
GetMandatoryEnvNames - Returns a slice of mandatory environments for each type of driver container - controller/node
func (*Config) GetMandatorySideCars ¶
GetMandatorySideCars - Returns a slice of side car container names which are marked as default
func (*Config) GetMandatoryStorageClassParams ¶
GetMandatoryStorageClassParams - Returns a (string) slice of mandatory storage class parameters
func (*Config) GetNodeEnvs ¶
GetNodeEnvs - Returns an array of corev1.EnvVar for the Node
func (*Config) GetNodeInitContainers ¶
GetNodeInitContainers - Returns a slice of all init container names for nodes
func (*Config) GetNodeVolumeMounts ¶
func (c *Config) GetNodeVolumeMounts() []corev1.VolumeMount
GetNodeVolumeMounts - Returns an array of corev1.VolumeMount for the Node
func (*Config) GetNodeVolumes ¶
GetNodeVolumes - Returns an array of corev1.Volume for the Node
func (*Config) GetSideCarArgs ¶
GetSideCarArgs - Returns a slice of arguments (strings) for a side car
func (*Config) GetSideCarEnvs ¶
GetSideCarEnvs - Returns a slice of env variables for a side car
func (*Config) GetSideCarVolMounts ¶
func (c *Config) GetSideCarVolMounts(sidecarType csiv1.ImageType) []corev1.VolumeMount
GetSideCarVolMounts - Returns a slice of volume mounts for a side car
func (*Config) InitDriverConfig ¶
InitDriverConfig - Initializes driver config by reading files in a config directory
func (*Config) IsControllerHAEnabled ¶
IsControllerHAEnabled - Determines whether Controller HA is enabled or not
func (*Config) ValidateEnvironmentVarType ¶
ValidateEnvironmentVarType - Used to validate environment variables specified via the user We dont expect the user to ever specify EnvVarReference & SecretReferenceType as that is always done via the config
type ConfigVersionParams ¶
type ConfigVersionParams struct { ConfigVersion string `yaml:"configVersion"` UseDefaults bool `yaml:"useDefaults,omitempty"` SupportedVersions []SupportedVersionParams `yaml:"supportedVersions"` Attacher string `yaml:"attacher,omitempty"` Provisoner string `yaml:"provisioner,omitempty"` Resizer string `yaml:"resizer,omitempty"` Snapshotter string `yaml:"snapshotter,omitempty"` Registrar string `yaml:"registrar,omitempty"` Healthmonitor string `yaml:"external-health-monitor,omitempty"` }
ConfigVersionParams - Represents a specific config version of the driver
type ContainerApp ¶
ContainerApp - Represents any other container
type DriverConfig ¶
type DriverConfig struct { ControllerHA bool `json:"controllerHA,omitempty"` EnableEphemeralVolumes bool `json:"enableEphemeralVolumes,omitempty"` DriverEnvs []DriverEnv `json:"driverEnvs"` NodeVolumes []corev1.Volume `json:"driverNodeVolumes"` ControllerVolumes []corev1.Volume `json:"driverControllerVolumes"` NodeVolumeMounts []corev1.VolumeMount `json:"driverNodeVolumeMounts"` ControllerVolumeMounts []corev1.VolumeMount `json:"driverControllerVolumeMounts"` DriverArgs []string `json:"driverArgs"` ControllerTolerations []corev1.Toleration `json:"controllerTolerations"` NodeTolerations []corev1.Toleration `json:"nodeTolerations"` SidecarParams []SidecarParams `json:"sidecarParams"` InitContainerParams []InitContainerParams `json:"initContainerParams"` StorageClassParams []StorageClassParam `json:"storageClassParams"` StorageClassAttrs []StorageClassAttr `json:"storageClassAttrs"` }
DriverConfig - Type representing the default configuration of the driver
type DriverConfigMap ¶
type DriverConfigMap struct {
DriverConfig DriverConfig `json:"driverConfig"`
}
DriverConfigMap - Top level structure for reading from json
type DriverConfigParams ¶
type DriverConfigParams struct { Name csiv1.DriverType `yaml:"name"` ConfigVersions []ConfigVersionParams `yaml:"configVersions"` }
DriverConfigParams - Represents the driver and its config versions
type DriverEnv ¶
type DriverEnv struct { Name string `json:"Name"` Mandatory bool `json:"Mandatory,omitempty"` CSIEnvType EnvDataType `json:",CSIEnvType"` SetForController bool `json:"SetForController"` SetForNode bool `json:"SetForNode"` DefaultValueForController string `json:"DefaultValueForController"` DefaultValueForNode string `json:"DefaultValueForNode"` }
DriverEnv - Type representing an environment variable for the drivers
type EnvDataType ¶
type EnvDataType string
EnvDataType represents type of an environment variable
const ( StringType EnvDataType = "String" BooleanType EnvDataType = "Boolean" ListType EnvDataType = "List" IntType EnvDataType = "Int" FloatType EnvDataType = "FloatType" EnvVarReferenceType EnvDataType = "EnvVarReferenceType" SecretReferenceType EnvDataType = "EnvSecretReference" )
Constants representing different types of acceptable types
type ImageTag ¶
type ImageTag struct { K8sVersion csiv1.K8sVersion `yaml:"version"` Tag string `yaml:"tag,omitempty"` }
ImageTag - Image tag with associated K8s version
type InitContainerParams ¶
type InitContainerParams struct { Name csiv1.ImageType `json:"Name"` Optional bool `json:"optional"` SetForController bool `json:"SetForController"` SetForNode bool `json:"SetForNode"` Args []string `json:"args"` Envs []corev1.EnvVar `json:"envs"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts"` }
InitContainerParams - represents configuration for InitContainers
type OpConfig ¶
type OpConfig struct { Drivers []DriverConfigParams `yaml:"drivers"` CSISideCars []ContainerApp `yaml:"csiSideCars"` Extensions []ContainerApp `yaml:"extensions,omitempty"` SupportedK8sVersions []csiv1.K8sVersion `yaml:"supportedK8sVersions"` }
OpConfig - Represents the image & RBAC config used by Operator
func ReadOpConfig ¶
ReadOpConfig - Reads Operator config
func (*OpConfig) GetDefaultImageTags ¶
func (opConfig *OpConfig) GetDefaultImageTags(driverType csiv1.DriverType, configVersion string, k8sVersion csiv1.K8sVersion) (map[string]string, error)
GetDefaultImageTags - Returns an image map
func (*OpConfig) GetSupportedK8sVersions ¶
func (opConfig *OpConfig) GetSupportedK8sVersions() []csiv1.K8sVersion
GetSupportedK8sVersions - Returns supported k8s versions
func (*OpConfig) IsSupportedVersion ¶
func (opConfig *OpConfig) IsSupportedVersion(driverType csiv1.DriverType, driverConfigVersion string, version csiv1.K8sVersion) error
IsSupportedVersion - Returns if a specific driver config version is supported
type SidecarParams ¶
type SidecarParams struct { Name csiv1.ImageType `json:"Name"` Optional bool `json:"optional"` Args []string `json:"args"` Envs []corev1.EnvVar `json:"envs"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts"` }
SidecarParams - represents configuration for a side car container
type StorageClassAttr ¶
type StorageClassAttr struct { Name string `json:"name"` Value interface{} `json:"value"` }
StorageClassAttr represents attributes of a storage class (like volume expansion)
type StorageClassParam ¶
StorageClassParam represents a single storage class parameter
type SupportedVersionParams ¶
type SupportedVersionParams struct { Version csiv1.K8sVersion `yaml:"version"` Attacher string `yaml:"attacher,omitempty"` Provisioner string `yaml:"provisioner,omitempty"` Resizer string `yaml:"resizer,omitempty"` Snapshotter string `yaml:"snapshotter,omitempty"` Registrar string `yaml:"registrar,omitempty"` Healthmonitor string `yaml:"external-health-monitor,omitempty"` }
SupportedVersionParams - Represents the supported versions and corresponding sidecars