controllers

package
v0.0.0-...-9331f55 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package controllers ...

Index

Constants

View Source
const (
	VSphereCSINonParavirtualMode = "vsphereCSI"
	VSphereCSIParavirtualMode    = "vsphereParavirtualCSI"
)

supported modes for VSphereCSIConfig

View Source
const (
	VSphereNetworkVarName           = "VSPHERE_NETWORK"
	VSphereRegionVarName            = "VSPHERE_REGION"
	VSphereZoneVarName              = "VSPHERE_ZONE"
	VSphereVersionVarName           = "VSPHERE_VERSION"
	VSphereTLSThumbprintVarName     = "VSPHERE_TLS_THUMBPRINT"
	IsWindowsWorkloadClusterVarName = "IS_WINDOWS_WORKLOAD_CLUSTER"
	ControllerRequeueDelay          = 20 * time.Second
)

cluster variable names required by VSphereCSIConfig to derive values

View Source
const (
	VSphereCSINamespace                 = "kube-system"
	VSphereCSIProvisionTimeout          = "300s"
	VSphereCSIAttachTimeout             = "300s"
	VSphereCSIResizerTimeout            = "300s"
	VSphereCSIMinDeploymentReplicas     = 1
	VSphereCSIMaxDeploymentReplicas     = 3
	VSphereCSIFeatureStateNamespace     = VSphereSystemCSINamepace
	VSphereCSIFeatureStateConfigMapName = "csi-feature-states"
	LegacyZoneName                      = "vmware-system-legacy"
)
View Source
const (
	VSphereSystemCSINamepace                = "vmware-system-csi"
	DefaultSupervisorMasterEndpointHostname = "supervisor.default.svc"
	DefaultSupervisorMasterPort             = 6443
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataValues

type DataValues struct {
	VSphereCSI   *DataValuesVSphereCSI   `yaml:"vsphereCSI,omitempty"`
	VSpherePVCSI *DataValuesVSpherePVCSI `yaml:"vspherePVCSI,omitempty"`
}

DataValues is the data values type generated by the VSphereCSIConfig CR

type DataValuesVSphereCSI

type DataValuesVSphereCSI struct {
	TLSThumbprint         string                          `yaml:"tlsThumbprint"`
	Namespace             string                          `yaml:"namespace"`
	ClusterName           string                          `yaml:"clusterName"`
	Server                string                          `yaml:"server"`
	Datacenter            string                          `yaml:"datacenter"`
	PublicNetwork         string                          `yaml:"publicNetwork"`
	Username              string                          `yaml:"username"`
	Password              string                          `yaml:"password"`
	Region                string                          `yaml:"region"`
	Zone                  string                          `yaml:"zone"`
	InsecureFlag          bool                            `yaml:"insecureFlag"`
	UseTopologyCategories bool                            `yaml:"useTopologyCategories"`
	ProvisionTimeout      string                          `yaml:"provisionTimeout"`
	AttachTimeout         string                          `yaml:"attachTimeout"`
	ResizerTimeout        string                          `yaml:"resizerTimeout"`
	VSphereVersion        string                          `yaml:"vSphereVersion"`
	HTTPProxy             string                          `yaml:"http_proxy"`
	HTTPSProxy            string                          `yaml:"https_proxy"`
	NoProxy               string                          `yaml:"no_proxy"`
	DeploymentReplicas    int32                           `yaml:"deployment_replicas"`
	WindowsSupport        bool                            `yaml:"windows_support"`
	NetPermissions        map[string]*NetPermissionConfig `yaml:"netpermissions"`
}

type DataValuesVSpherePVCSI

type DataValuesVSpherePVCSI struct {
	ClusterAPIVersion                string            `yaml:"cluster_api_version"`
	ClusterKind                      string            `yaml:"cluster_kind"`
	ClusterName                      string            `yaml:"cluster_name"`
	ClusterUID                       string            `yaml:"cluster_uid"`
	Namespace                        string            `yaml:"namespace"`
	SupervisorMasterEndpointHostname string            `yaml:"supervisor_master_endpoint_hostname"`
	SupervisorMasterPort             int32             `yaml:"supervisor_master_port"`
	FeatureStates                    map[string]string `yaml:"feature_states,omitempty"`
	Zone                             bool              `yaml:"zone"`
}

type NetPermissionConfig

type NetPermissionConfig struct {
	Ips         string `yaml:"ips"`
	Permissions string `yaml:"permissions"`
	RootSquash  bool   `yaml:"rootsquash"`
}

type VSphereCSIConfigReconciler

type VSphereCSIConfigReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
	Config addonconfig.VSphereCSIConfigControllerConfig
}

VSphereCSIConfigReconciler reconciles a VSphereCSIConfig object

func (*VSphereCSIConfigReconciler) ClusterToVSphereCSIConfig

func (r *VSphereCSIConfigReconciler) ClusterToVSphereCSIConfig(o client.Object) []ctrl.Request

ClusterToVSphereCSIConfig returns a list of Requests with VSphereCSIConfig ObjectKey

func (*VSphereCSIConfigReconciler) ConfigMapToVSphereCSIConfig

func (r *VSphereCSIConfigReconciler) ConfigMapToVSphereCSIConfig(o client.Object) []ctrl.Request

func (*VSphereCSIConfigReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*VSphereCSIConfigReconciler) SetupWithManager

func (r *VSphereCSIConfigReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager,
	options controller.Options) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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