Documentation ¶
Index ¶
- func NewCSIDriverNodeServiceController(instanceName string, manifest []byte, recorder events.Recorder, ...) factory.Controller
- type CSIDriverNodeServiceController
- type DaemonSetHookFunc
- func WithCABundleDaemonSetHook(configMapNamespace string, configMapName string, ...) DaemonSetHookFunc
- func WithConfigMapHashAnnotationHook(namespace string, configMapName string, ...) DaemonSetHookFunc
- func WithObservedProxyDaemonSetHook() DaemonSetHookFunc
- func WithSecretHashAnnotationHook(namespace string, secretName string, secretInformer corev1.SecretInformer) DaemonSetHookFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCSIDriverNodeServiceController ¶
func NewCSIDriverNodeServiceController( instanceName string, manifest []byte, recorder events.Recorder, operatorClient v1helpers.OperatorClientWithFinalizers, kubeClient kubernetes.Interface, dsInformer appsinformersv1.DaemonSetInformer, optionalInformers []factory.Informer, optionalDaemonSetHooks ...DaemonSetHookFunc, ) factory.Controller
Types ¶
type CSIDriverNodeServiceController ¶
type CSIDriverNodeServiceController struct {
// contains filtered or unexported fields
}
CSIDriverNodeServiceController is a controller that deploys a CSI Node Service to a given namespace.
The CSI Node Service is represented by a DaemonSet. This DaemonSet deploys a pod with the CSI driver and sidecars containers (node-driver-registrar and liveness-probe) to all nodes.
On every sync, this controller reads the DaemonSet from a static file and overrides a few fields:
1. Container image locations
The controller will replace the images specified in the static file if their name follows a certain nomenclature AND its respective environemnt variable is set. This is a list of environment variables that the controller understands:
DRIVER_IMAGE NODE_DRIVER_REGISTRAR_IMAGE LIVENESS_PROBE_IMAGE
The names above should be wrapped by a ${}, e.g., ${DIVER_IMAGE} in static file.
2. Log level
The controller can also override the log level passed in to the CSI driver container. In order to do that, the placeholder ${LOG_LEVEL} from the manifest file is replaced with the value specified in the OperatorClient resource (Spec.LogLevel).
This controller supports removable operands, as configured in pkg/operator/management.
This controller produces the following conditions:
<name>Available: indicates that the CSI Node Service was successfully deployed. <name>Progressing: indicates that the CSI Node Service is being deployed. <name>Degraded: produced when the sync() method returns an error.
func (*CSIDriverNodeServiceController) Name ¶
func (c *CSIDriverNodeServiceController) Name() string
type DaemonSetHookFunc ¶
type DaemonSetHookFunc func(*opv1.OperatorSpec, *appsv1.DaemonSet) error
DaemonSetHookFunc is a hook function to modify the DaemonSet.
func WithCABundleDaemonSetHook ¶
func WithCABundleDaemonSetHook( configMapNamespace string, configMapName string, configMapInformer corev1.ConfigMapInformer, ) DaemonSetHookFunc
func WithConfigMapHashAnnotationHook ¶
func WithConfigMapHashAnnotationHook( namespace string, configMapName string, configMapInformer corev1.ConfigMapInformer, ) DaemonSetHookFunc
WithConfigMapHashAnnotationHook creates a DaemonSet hook that annotates a DaemonSet with a config map's hash.
func WithObservedProxyDaemonSetHook ¶
func WithObservedProxyDaemonSetHook() DaemonSetHookFunc
WithObservedProxyDaemonSetHook creates a hook that injects into the daemonSet's containers the observed proxy config.
func WithSecretHashAnnotationHook ¶
func WithSecretHashAnnotationHook( namespace string, secretName string, secretInformer corev1.SecretInformer, ) DaemonSetHookFunc
WithSecretHashAnnotationHook creates a DaemonSet hook that annotates a DaemonSet with a secret's hash.