Documentation ¶
Overview ¶
Package controllers implements k8s controller functionality for oracle-cpi.
Package controllers implements k8s controller functionality for vsphere-cpi.
Index ¶
- Constants
- type CPIConfigAction
- type CloudProviderExtraArgs
- type OracleCPIConfigReconciler
- func (r *OracleCPIConfigReconciler) ClusterToOracleCPIConfig(o client.Object) []ctrl.Request
- func (r *OracleCPIConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *OracleCPIConfigReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, options controller.Options) error
- type OracleCPIDataValues
- type OracleCPIDataValuesAuth
- type VSphereCPIConfigReconciler
- func (r *VSphereCPIConfigReconciler) ClusterToVSphereCPIConfig(o client.Object) []ctrl.Request
- func (r *VSphereCPIConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *VSphereCPIConfigReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, options controller.Options) error
- type VSphereCPIDataValues
- type VSphereCPINonParaVirtDataValues
- type VSphereCPIParaVirtDataValues
Constants ¶
const ( VsphereCPINonParavirtualMode = "vsphereCPI" VSphereCPIParavirtualMode = "vsphereParavirtualCPI" )
supported modes for VSphereCPIConfig
const ( NsxtPodRoutingEnabledVarName = "NSXT_POD_ROUTING_ENABLED" NsxtRouterPathVarName = "NSXT_ROUTER_PATH" ClusterCIDRVarName = "CLUSTER_CIDR" NsxtUsernameVarName = "NSXT_USERNAME" NsxtPasswordVarName = "NSXT_PASSWORD" NsxtManagerHostVarName = "NSXT_MANAGER_HOST" NsxtAllowUnverifiedSSLVarName = "NSXT_ALLOW_UNVERIFIED_SSL" NsxtRemoteAuthVarName = "NSXT_REMOTE_AUTH" NsxtVmcAccessTokenVarName = "NSXT_VMC_ACCESS_TOKEN" // nolint:gosec NsxtVmcAuthHostVarName = "NSXT_VMC_AUTH_HOST" NsxtClientCertKeyDataVarName = "NSXT_CLIENT_CERT_KEY_DATA" NsxtClientCertDataVarName = "NSXT_CLIENT_CERT_DATA" NsxtRootCADataB64VarName = "NSXT_ROOT_CA_DATA_B64" NsxtSecretNameVarName = "NSXT_SECRET_NAME" // nolint:gosec NsxtSecretNamespaceVarName = "NSXT_SECRET_NAMESPACE" // nolint:gosec )
cluster variable names required by VSphereCPIConfig to derive values
const ( ProviderServiceAccountSecretName = "cloud-provider-creds" ProviderServiceAccountSecretNamespace = "vmware-system-cloud-provider" // nolint:gosec )
secret in the target cluster that contains the generated service account token.
const ( SupervisorLoadBalancerSvcNamespace = "kube-system" SupervisorLoadBalancerSvcName = "kube-apiserver-lb-svc" SupervisorLoadBalancerSvcAPIServerPortName = "kube-apiserver" // ConfigMapClusterInfo defines the name for the ConfigMap where the information how to connect and trust the cluster exist ConfigMapClusterInfo = "cluster-info" // KubeConfigKey defines at which key in the Data object of the ConfigMap the KubeConfig object is stored KubeConfigKey = "kubeconfig" )
TODO: make these constants accessible to other controllers (for example csi) https://github.com/vmware-tanzu/tanzu-framework/issues/2086 constants used for deriving supervisor API server endpoint
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPIConfigAction ¶
type CloudProviderExtraArgs ¶
type CloudProviderExtraArgs struct {
TLSCipherSuites string `yaml:"tls-cipher-suites"`
}
type OracleCPIConfigReconciler ¶
type OracleCPIConfigReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Config addonconfig.OracleCPIConfigControllerConfig }
OracleCPIConfigReconciler reconciles a OracleCPIConfig object
func (*OracleCPIConfigReconciler) ClusterToOracleCPIConfig ¶
func (r *OracleCPIConfigReconciler) ClusterToOracleCPIConfig(o client.Object) []ctrl.Request
ClusterToOracleCPIConfig returns a list of Requests with OracleCPIConfig ObjectKey based on Cluster events
func (*OracleCPIConfigReconciler) Reconcile ¶
func (r *OracleCPIConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile the OracleCPIConfig CRD
func (*OracleCPIConfigReconciler) SetupWithManager ¶
func (r *OracleCPIConfigReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the controller with the Manager.
type OracleCPIDataValues ¶
type OracleCPIDataValues struct { Auth OracleCPIDataValuesAuth `yaml:"auth"` Compartment string `yaml:"compartment"` VCN string `yaml:"vcn"` LoadBalancer struct { Subnet1 string `yaml:"subnet1"` Subnet2 string `yaml:"subnet2"` } `yaml:"loadBalancer"` }
OracleCPIDataValues serializes the CPIConfig CR
func (*OracleCPIDataValues) Serialize ¶
func (v *OracleCPIDataValues) Serialize() ([]byte, error)
type OracleCPIDataValuesAuth ¶
type VSphereCPIConfigReconciler ¶
type VSphereCPIConfigReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Config addonconfig.VSphereCPIConfigControllerConfig }
VSphereCPIConfigReconciler reconciles a VSphereCPIConfig object
func (*VSphereCPIConfigReconciler) ClusterToVSphereCPIConfig ¶
func (r *VSphereCPIConfigReconciler) ClusterToVSphereCPIConfig(o client.Object) []ctrl.Request
ClusterToVSphereCPIConfig returns a list of Requests with VSphereCPIConfig ObjectKey based on Cluster events
func (*VSphereCPIConfigReconciler) Reconcile ¶
func (r *VSphereCPIConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile the VSphereCPIConfig CRD
func (*VSphereCPIConfigReconciler) SetupWithManager ¶
func (r *VSphereCPIConfigReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the controller with the Manager.
type VSphereCPIDataValues ¶
type VSphereCPIDataValues interface { // Serialize the struct into a data format expected by the consumer. This could be yaml or json Serialize() ([]byte, error) }
VSphereCPIDataValues serializes the CPIConfig CR
type VSphereCPINonParaVirtDataValues ¶
type VSphereCPINonParaVirtDataValues struct { Mode string `yaml:"mode"` TLSThumbprint string `yaml:"tlsThumbprint"` Server string `yaml:"server"` Datacenter string `yaml:"datacenter"` Username string `yaml:"username"` Password string `yaml:"password"` Region string `yaml:"region"` Zone string `yaml:"zone"` InsecureFlag bool `yaml:"insecureFlag"` IPFamily string `yaml:"ipFamily"` VMInternalNetwork string `yaml:"vmInternalNetwork"` VMExternalNetwork string `yaml:"vmExternalNetwork"` VMExcludeInternalNetworkSubnetCidr string `yaml:"vmExcludeInternalNetworkSubnetCidr"` VMExcludeExternalNetworkSubnetCidr string `yaml:"vmExcludeExternalNetworkSubnetCidr"` CloudProviderExtraArgs CloudProviderExtraArgs `yaml:"cloudProviderExtraArgs"` Nsxt struct { PodRoutingEnabled bool `yaml:"podRoutingEnabled"` Routes struct { RouterPath string `yaml:"routerPath"` ClusterCidr string `yaml:"clusterCidr"` } `yaml:"routes"` Username string `yaml:"username"` Password string `yaml:"password"` Host string `yaml:"host"` Insecure bool `yaml:"insecure"` RemoteAuthEnabled bool `yaml:"remoteAuthEnabled"` VmcAccessToken string `yaml:"vmcAccessToken"` VmcAuthHost string `yaml:"vmcAuthHost"` ClientCertKeyData string `yaml:"clientCertKeyData"` ClientCertData string `yaml:"clientCertData"` RootCAData string `yaml:"rootCAData"` SecretName string `yaml:"secretName"` SecretNamespace string `yaml:"secretNamespace"` } `yaml:"nsxt"` HTTPProxy string `yaml:"http_proxy"` HTTPSProxy string `yaml:"https_proxy"` NoProxy string `yaml:"no_proxy"` }
func (*VSphereCPINonParaVirtDataValues) Serialize ¶
func (v *VSphereCPINonParaVirtDataValues) Serialize() ([]byte, error)
type VSphereCPIParaVirtDataValues ¶
type VSphereCPIParaVirtDataValues struct { Mode string `yaml:"mode"` ClusterAPIVersion string `yaml:"clusterAPIVersion"` ClusterKind string `yaml:"clusterKind"` ClusterName string `yaml:"clusterName"` ClusterUID string `yaml:"clusterUID"` SupervisorMasterEndpointIP string `yaml:"supervisorMasterEndpointIP"` SupervisorMasterPort string `yaml:"supervisorMasterPort"` AntreaNSXPodRoutingEnabled bool `yaml:"antreaNSXPodRoutingEnabled"` }
func (*VSphereCPIParaVirtDataValues) Serialize ¶
func (v *VSphereCPIParaVirtDataValues) Serialize() ([]byte, error)