controllers

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AccManifest - deployment resources for Apex Connectivity Client
	AccManifest string = "statefulset.yaml"

	// AccNamespace - deployment namespace
	AccNamespace string = "<NAMESPACE>"

	// AggregatorURLDefault - default aggregator location
	AggregatorURLDefault string = "connect-into.dell.com"

	// AggregatorURL - tag for specifying aggregator endpoint
	AggregatorURL string = "<AGGREGATOR_URL>"

	// CaCertOption - tag for specifying if cacert option is used
	CaCertOption string = "<CACERT_OPTION>"

	// CaCertFlag - cacert option
	CaCertFlag string = "--cacert"

	// CaCerts - tag for specifying --cacert value
	CaCerts string = "<CACERTS>"

	// CaCertsList - cert locations for aggregator and loadbalancer
	CaCertsList string = "/opt/dellemc/certs/loadbalancer_root_ca_cert.crt,/opt/dellemc/certs/aggregator_internal_root_ca_cert.crt"

	// ConnectivityClientContainerName - name of the DCM client container
	ConnectivityClientContainerName string = "connectivity-client-docker-k8s"

	// ConnectivityClientContainerImage - tag for DCM client image
	ConnectivityClientContainerImage string = "<CONNECTIVITY_CLIENT_IMAGE>"

	// KubernetesProxySidecarName - name of proxy sidecar container
	KubernetesProxySidecarName string = "kubernetes-proxy"

	// KubernetesProxySidecarImage - tag for proxy image
	KubernetesProxySidecarImage string = "<KUBERNETES_PROXY_IMAGE>"

	// CertPersisterSidecarName - name of cert persister image
	CertPersisterSidecarName string = "cert-persister"

	// CertPersisterSidecarImage - name of cert persister image
	CertPersisterSidecarImage string = "<CERT_PERSISTER_IMAGE>"

	// AccInitContainerName - name of init container image
	AccInitContainerName string = "connectivity-client-init"

	// AccInitContainerImage - tag for init container image
	AccInitContainerImage string = "<ACC_INIT_CONTAINER_IMAGE>"
)
View Source
const (
	// AccMetadataPrefix - prefix for all labels & annotations
	AccMetadataPrefix = "storage.dell.com"

	// AccFinalizerName - the name of the finalizer
	AccFinalizerName = "finalizer.dell.com"
)
View Source
const (
	// MetadataPrefix - prefix for all labels & annotations
	MetadataPrefix = "storage.dell.com"

	// NodeYaml - yaml file name for node
	NodeYaml = "node.yaml"

	// CSMFinalizerName -
	CSMFinalizerName = "finalizer.dell.emc.com"

	// CSMVersion -
	CSMVersion = "v1.10.0"
)

Variables

View Source
var (

	// CSMVersionKey -
	CSMVersionKey = fmt.Sprintf("%s/%s", MetadataPrefix, "CSMVersion")

	// StopWatch - watcher stop handle
	StopWatch = make(chan struct{})
)
View Source
var (

	// AccStopWatch - watcher stop handle
	AccStopWatch = make(chan struct{})
)

Functions

func DeployApexConnectivityClient added in v1.4.0

func DeployApexConnectivityClient(ctx context.Context, isDeleting bool, operatorConfig utils.OperatorConfig, cr csmv1.ApexConnectivityClient, ctrlClient crclient.Client) error

DeployApexConnectivityClient - perform deployment

func ModifyApexConnectivityClientCR added in v1.4.0

func ModifyApexConnectivityClientCR(yamlString string, cr csmv1.ApexConnectivityClient) string

ModifyApexConnectivityClientCR - update the custom resource

Types

type ApexConnectivityClientReconciler added in v1.4.0

type ApexConnectivityClientReconciler struct {
	// controller runtime client, responsible for create, delete, update, get etc.
	crclient.Client
	// k8s client, implements client-go/kubernetes interface, responsible for apply, which
	// client.Client does not provides
	K8sClient kubernetes.Interface
	Scheme    *runtime.Scheme
	Log       *zap.SugaredLogger
	Config    utils.OperatorConfig

	EventRecorder record.EventRecorder
	// contains filtered or unexported fields
}

ApexConnectivityClientReconciler reconciles a ApexConnectivityClient object

func (*ApexConnectivityClientReconciler) ClientContentWatch added in v1.4.0

func (r *ApexConnectivityClientReconciler) ClientContentWatch() error

ClientContentWatch - watch updates on deployment and statefulset

func (*ApexConnectivityClientReconciler) GetClient added in v1.4.0

GetClient - returns the split client

func (*ApexConnectivityClientReconciler) GetK8sClient added in v1.4.0

GetK8sClient - Returns the current update count

func (*ApexConnectivityClientReconciler) GetUpdateCount added in v1.4.0

func (r *ApexConnectivityClientReconciler) GetUpdateCount() int32

GetUpdateCount - Returns the current update count

func (*ApexConnectivityClientReconciler) IncrUpdateCount added in v1.4.0

func (r *ApexConnectivityClientReconciler) IncrUpdateCount()

IncrUpdateCount - Increments the update count

func (*ApexConnectivityClientReconciler) PreChecks added in v1.4.0

PreChecks - validate input values

func (*ApexConnectivityClientReconciler) Reconcile added in v1.4.0

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the ApexConnectivityClient object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.10.0/pkg/reconcile

func (*ApexConnectivityClientReconciler) SetupWithManager added in v1.4.0

func (r *ApexConnectivityClientReconciler) SetupWithManager(mgr ctrl.Manager, limiter ratelimiter.RateLimiter, maxReconcilers int) error

SetupWithManager sets up the controller with the Manager.

type ContainerStorageModuleReconciler

type ContainerStorageModuleReconciler struct {
	// controller runtime client, responsible for create, delete, update, get etc.
	client.Client
	// k8s client, implements client-go/kubernetes interface, responsible for apply, which
	// client.Client does not provides
	K8sClient kubernetes.Interface
	Scheme    *runtime.Scheme
	Log       *zap.SugaredLogger
	Config    utils.OperatorConfig

	EventRecorder record.EventRecorder
	// contains filtered or unexported fields
}

ContainerStorageModuleReconciler reconciles a ContainerStorageModule object

func (*ContainerStorageModuleReconciler) ContentWatch

func (r *ContainerStorageModuleReconciler) ContentWatch() error

ContentWatch - watch updates on deployment and deamonset

func (*ContainerStorageModuleReconciler) GetClient

GetClient - returns the split client

func (*ContainerStorageModuleReconciler) GetK8sClient added in v0.2.0

GetK8sClient - Returns the current update count

func (*ContainerStorageModuleReconciler) GetUpdateCount

func (r *ContainerStorageModuleReconciler) GetUpdateCount() int32

GetUpdateCount - Returns the current update count

func (*ContainerStorageModuleReconciler) IncrUpdateCount

func (r *ContainerStorageModuleReconciler) IncrUpdateCount()

IncrUpdateCount - Increments the update count

func (*ContainerStorageModuleReconciler) PreChecks

PreChecks - validate input values

func (*ContainerStorageModuleReconciler) Reconcile

Reconcile - main loop

func (*ContainerStorageModuleReconciler) SetupWithManager

func (r *ContainerStorageModuleReconciler) SetupWithManager(mgr ctrl.Manager, limiter ratelimiter.RateLimiter, maxReconcilers int) error

SetupWithManager sets up the controller with the Manager.

func (*ContainerStorageModuleReconciler) SyncCSM

SyncCSM - Sync the current installation - this can lead to a create or update

type DriverConfig

type DriverConfig struct {
	Driver     *storagev1.CSIDriver
	ConfigMap  *corev1.ConfigMap
	Node       *utils.NodeYAML
	Controller *utils.ControllerYAML
}

DriverConfig -

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL