Documentation ¶
Index ¶
- Constants
- func GetDNSInformationFromConfigMap(client ctrlruntime.Client) ([]string, []string, error)
- func ProviderConfigToConfigMap(namespace string, config *VSphereVMProviderConfig, vcCredsSecretName string) *corev1.ConfigMap
- func UpdateVcInConfigMap(ctx context.Context, client ctrlruntime.Client, vcPNID, vcPort string) (bool, error)
- type VSphereVMProviderConfig
Constants ¶
View Source
const ( DefaultVCPort = "443" ProviderConfigMapName = "vsphere.provider.config.vmoperator.vmware.com" ContentSourceKey = "ContentSource" NetworkConfigMapName = "vmoperator-network-config" NameserversKey = "nameservers" // Key in the NetworkConfigMapName. SearchSuffixesKey = "searchsuffixes" // Key in the NetworkConfigMapName. )
Variables ¶
This section is empty.
Functions ¶
func GetDNSInformationFromConfigMap ¶
func GetDNSInformationFromConfigMap(client ctrlruntime.Client) ([]string, []string, error)
func ProviderConfigToConfigMap ¶
func ProviderConfigToConfigMap( namespace string, config *VSphereVMProviderConfig, vcCredsSecretName string) *corev1.ConfigMap
ProviderConfigToConfigMap returns the ConfigMap for the config. Used only in testing.
func UpdateVcInConfigMap ¶
func UpdateVcInConfigMap(ctx context.Context, client ctrlruntime.Client, vcPNID, vcPort string) (bool, error)
UpdateVcInConfigMap updates the ConfigMap with the new vCenter PNID and Port. Returns false if no updated needed.
Types ¶
type VSphereVMProviderConfig ¶
type VSphereVMProviderConfig struct { VcPNID string VcPort string VcCreds *credentials.VSphereVMProviderCredentials Datacenter string StorageClassRequired bool // Always true in WCP env. UseInventoryAsContentSource bool // Always false in WCP env. CAFilePath string InsecureSkipTLSVerify bool // Always false in WCP env. // These are Zone and/or Namespace specific. ResourcePool string Folder string // Only set in simulated testing env. Datastore string Network string }
VSphereVMProviderConfig represents the configuration for a Vsphere VM Provider instance. Contains information enabling integration with a backend vSphere instance for VM management.
func ConfigMapToProviderConfig ¶
func ConfigMapToProviderConfig( configMap *corev1.ConfigMap, vcCreds *credentials.VSphereVMProviderCredentials) (*VSphereVMProviderConfig, error)
ConfigMapToProviderConfig converts the VM provider ConfigMap to a VSphereVMProviderConfig.
func GetProviderConfig ¶
func GetProviderConfig( ctx context.Context, client ctrlruntime.Client) (*VSphereVMProviderConfig, error)
GetProviderConfig returns a provider config constructed from vSphere Provider ConfigMap in the VM Operator namespace.
Click to show internal directories.
Click to hide internal directories.