Documentation
¶
Index ¶
- Constants
- func GenerateLocalData(vmiName string, namespace string, data *CloudInitData) error
- func GetIsoFilePath(source DataSourceType, domain, namespace string) string
- func IsValidCloudInitData(cloudInitData *CloudInitData) bool
- func PrepareLocalPath(vmiName string, namespace string) error
- func SetIsoCreationFunction(isoFunc IsoCreationFunc)
- func SetLocalDirectory(dir string) error
- func SetLocalDirectoryOnly(dir string)
- type CloudInitData
- type ConfigDriveMetadata
- type DataSourceType
- type DeviceData
- type DeviceMetadataType
- type IsoCreationFunc
- type NoCloudMetadata
- type PublicSSHKey
Constants ¶
View Source
const ( DataSourceNoCloud DataSourceType = "noCloud" DataSourceConfigDrive DataSourceType = "configDrive" NICMetadataType DeviceMetadataType = "nic" )
Variables ¶
This section is empty.
Functions ¶
func GenerateLocalData ¶
func GenerateLocalData(vmiName string, namespace string, data *CloudInitData) error
func GetIsoFilePath ¶ added in v0.19.0
func GetIsoFilePath(source DataSourceType, domain, namespace string) string
func IsValidCloudInitData ¶ added in v0.19.0
func IsValidCloudInitData(cloudInitData *CloudInitData) bool
IsValidCloudInitData checks if the given CloudInitData object is valid in the sense that GenerateLocalData can be called with it.
func PrepareLocalPath ¶ added in v0.44.1
func SetIsoCreationFunction ¶
func SetIsoCreationFunction(isoFunc IsoCreationFunc)
The unit test suite uses this function
func SetLocalDirectory ¶
func SetLocalDirectoryOnly ¶ added in v0.41.4
func SetLocalDirectoryOnly(dir string)
XXX refactor this whole package This is just a cheap workaround to make e2e tests pass
Types ¶
type CloudInitData ¶ added in v0.19.0
type CloudInitData struct { DataSource DataSourceType NoCloudMetaData *NoCloudMetadata ConfigDriveMetaData *ConfigDriveMetadata UserData string NetworkData string DevicesData *[]DeviceData }
CloudInitData is a data source independent struct that holds cloud-init user and network data
func ReadCloudInitVolumeDataSource ¶ added in v0.19.0
func ReadCloudInitVolumeDataSource(vmi *v1.VirtualMachineInstance, secretSourceDir string) (cloudInitData *CloudInitData, err error)
ReadCloudInitVolumeDataSource scans the given VMI for CloudInit volumes and reads their content into a CloudInitData struct. Does not resolve secret refs.
type ConfigDriveMetadata ¶ added in v0.36.0
type ConfigDriveMetadata struct { InstanceID string `json:"instance_id"` LocalHostname string `json:"local_hostname,omitempty"` Hostname string `json:"hostname,omitempty"` UUID string `json:"uuid,omitempty"` Devices *[]DeviceData `json:"devices,omitempty"` PublicSSHKeys map[string]string `json:"public_keys,omitempty"` }
type DataSourceType ¶ added in v0.19.0
type DataSourceType string
type DeviceData ¶ added in v0.28.0
type DeviceMetadataType ¶ added in v0.28.0
type DeviceMetadataType string
type IsoCreationFunc ¶
type NoCloudMetadata ¶ added in v0.36.0
type PublicSSHKey ¶ added in v0.36.0
type PublicSSHKey struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.