Documentation
¶
Index ¶
- Constants
- func InterfaceDeviceWithMasqueradeBinding() kvirtv1.Interface
- func New(namespace, name string, opts ...Option) *kvirtv1.VirtualMachineInstance
- func NewFedora(opts ...Option) *kvirtv1.VirtualMachineInstance
- func RandName(name string) string
- type Option
- func WithCloudInitNoCloudUserData(data string, b64Encoding bool) Option
- func WithContainerImage(name string) Option
- func WithInterface(iface kvirtv1.Interface) Option
- func WithNetwork(network *kvirtv1.Network) Option
- func WithResourceMemory(value string) Option
- func WithRng() Option
- func WithTerminationGracePeriod(seconds int64) Option
Constants ¶
const ( DefaultResourceMemory = "8192Ki" DefaultTestGracePeriod int64 = 0 DefaultVmiName = "testvmi" NamespaceTestDefault = "kubevirt-test-default" )
Default VMI values
Variables ¶
This section is empty.
Functions ¶
func InterfaceDeviceWithMasqueradeBinding ¶
InterfaceDeviceWithMasqueradeBinding returns an Interface named "default" with masquerade binding.
func New ¶
func New(namespace, name string, opts ...Option) *kvirtv1.VirtualMachineInstance
New instantiates a new VMI configuration, building its properties based on the specified With* options.
func NewFedora ¶
func NewFedora(opts ...Option) *kvirtv1.VirtualMachineInstance
NewFedora instantiates a new Fedora based VMI configuration, building its extra properties based on the specified With* options.
Types ¶
type Option ¶
type Option func(vmi *kvirtv1.VirtualMachineInstance)
Option represents an action that enables an option.
func WithCloudInitNoCloudUserData ¶
WithCloudInitNoCloudUserData adds cloud-init no-cloud user data.
func WithContainerImage ¶
WithContainerImage specifies the name of the container image to be used.
func WithInterface ¶
WithInterface adds a Domain Device Interface.
func WithNetwork ¶
WithNetwork adds a network object.
func WithResourceMemory ¶
WithResourceMemory specifies the vmi memory resource.
func WithTerminationGracePeriod ¶
WithTerminationGracePeriod specifies the termination grace period in seconds.