Documentation
¶
Index ¶
- Constants
- type MicrovmDeploymentScope
- func (m *MicrovmDeploymentScope) CreatedReplicas() int32
- func (m *MicrovmDeploymentScope) DesiredReplicas() int32
- func (m *MicrovmDeploymentScope) DesiredTotalReplicas() int32
- func (m *MicrovmDeploymentScope) DetermineHost(setHosts infrav1.HostMap) (microvm.Host, error)
- func (m *MicrovmDeploymentScope) ExpiredHosts(setHosts infrav1.HostMap) infrav1.HostMap
- func (m *MicrovmDeploymentScope) HasAllSets(count int) bool
- func (m *MicrovmDeploymentScope) Hosts() []microvm.Host
- func (m *MicrovmDeploymentScope) MicrovmSpec() infrav1.MicrovmSpec
- func (m *MicrovmDeploymentScope) Name() string
- func (m *MicrovmDeploymentScope) Namespace() string
- func (m *MicrovmDeploymentScope) Patch() error
- func (m *MicrovmDeploymentScope) ReadyReplicas() int32
- func (m *MicrovmDeploymentScope) RequiredSets() int
- func (m *MicrovmDeploymentScope) SetCreatedReplicas(count int32)
- func (m *MicrovmDeploymentScope) SetNotReady(reason string, severity clusterv1.ConditionSeverity, message string, ...)
- func (m *MicrovmDeploymentScope) SetReady()
- func (m *MicrovmDeploymentScope) SetReadyReplicas(count int32)
- type MicrovmDeploymentScopeParams
- type MicrovmReplicaSetScope
- func (m *MicrovmReplicaSetScope) CreatedReplicas() int32
- func (m *MicrovmReplicaSetScope) DesiredReplicas() int32
- func (m *MicrovmReplicaSetScope) MicrovmHost() microvm.Host
- func (m *MicrovmReplicaSetScope) MicrovmSpec() infrav1.MicrovmSpec
- func (m *MicrovmReplicaSetScope) Name() string
- func (m *MicrovmReplicaSetScope) Namespace() string
- func (m *MicrovmReplicaSetScope) Patch() error
- func (m *MicrovmReplicaSetScope) ReadyReplicas() int32
- func (m *MicrovmReplicaSetScope) SetCreatedReplicas(count int32)
- func (m *MicrovmReplicaSetScope) SetNotReady(reason string, severity clusterv1.ConditionSeverity, message string, ...)
- func (m *MicrovmReplicaSetScope) SetReady()
- func (m *MicrovmReplicaSetScope) SetReadyReplicas(count int32)
- type MicrovmReplicaSetScopeParams
- type MicrovmScope
- func (m *MicrovmScope) GetBasicAuthToken() (string, error)
- func (m *MicrovmScope) GetInstanceID() string
- func (m *MicrovmScope) GetLabels() map[string]string
- func (m *MicrovmScope) GetMicrovmSpec() microvm.VMSpec
- func (m *MicrovmScope) GetProviderID() string
- func (m *MicrovmScope) GetRawBootstrapData() (string, error)
- func (m *MicrovmScope) GetSSHPublicKeys() []microvm.SSHPublicKey
- func (m *MicrovmScope) GetTLSConfig() (*flclient.TLSConfig, error)
- func (m *MicrovmScope) Name() string
- func (m *MicrovmScope) Namespace() string
- func (m *MicrovmScope) Patch() error
- func (m *MicrovmScope) SetNotReady(reason string, severity clusterv1.ConditionSeverity, message string, ...)
- func (m *MicrovmScope) SetProviderID(mvmUID string)
- func (m *MicrovmScope) SetReady()
- type MicrovmScopeParams
Constants ¶
const ProviderPrefix = "microvm://"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MicrovmDeploymentScope ¶
type MicrovmDeploymentScope struct { logr.Logger MicrovmDeployment *infrav1.MicrovmDeployment // contains filtered or unexported fields }
func NewMicrovmDeploymentScope ¶
func NewMicrovmDeploymentScope(params MicrovmDeploymentScopeParams) (*MicrovmDeploymentScope, error)
func (*MicrovmDeploymentScope) CreatedReplicas ¶
func (m *MicrovmDeploymentScope) CreatedReplicas() int32
CreatedReplicas returns the number of replicas which have been created.
func (*MicrovmDeploymentScope) DesiredReplicas ¶
func (m *MicrovmDeploymentScope) DesiredReplicas() int32
DesiredReplicas returns the requested replicas set per set on the spec.
func (*MicrovmDeploymentScope) DesiredTotalReplicas ¶
func (m *MicrovmDeploymentScope) DesiredTotalReplicas() int32
DesiredTotalReplicas returns the toal requested replicas set on the spec.
func (*MicrovmDeploymentScope) DetermineHost ¶
DetermineHost returns a host which does not yet have a replicaset
func (*MicrovmDeploymentScope) ExpiredHosts ¶
func (m *MicrovmDeploymentScope) ExpiredHosts(setHosts infrav1.HostMap) infrav1.HostMap
ExpiredHosts returns hosts which have been removed from the spec
func (*MicrovmDeploymentScope) HasAllSets ¶
func (m *MicrovmDeploymentScope) HasAllSets(count int) bool
HasAllSets returns true if all required sets have been created
func (*MicrovmDeploymentScope) Hosts ¶
func (m *MicrovmDeploymentScope) Hosts() []microvm.Host
Hosts returns the list of hosts for created microvms
func (*MicrovmDeploymentScope) MicrovmSpec ¶
func (m *MicrovmDeploymentScope) MicrovmSpec() infrav1.MicrovmSpec
GetMicrovmSpec returns the spec for the child MicroVM
func (*MicrovmDeploymentScope) Name ¶
func (m *MicrovmDeploymentScope) Name() string
Name returns the MicrovmDeployment name.
func (*MicrovmDeploymentScope) Namespace ¶
func (m *MicrovmDeploymentScope) Namespace() string
Namespace returns the namespace name.
func (*MicrovmDeploymentScope) Patch ¶
func (m *MicrovmDeploymentScope) Patch() error
Patch persists the resource and status.
func (*MicrovmDeploymentScope) ReadyReplicas ¶
func (m *MicrovmDeploymentScope) ReadyReplicas() int32
ReadyReplicas returns the number of replicas which are ready.
func (*MicrovmDeploymentScope) RequiredSets ¶
func (m *MicrovmDeploymentScope) RequiredSets() int
RequiredSets returns the number of sets which should be created
func (*MicrovmDeploymentScope) SetCreatedReplicas ¶
func (m *MicrovmDeploymentScope) SetCreatedReplicas(count int32)
SetCreatedReplicas records the number of microvms which have been created this does not give information about whether the microvms are ready
func (*MicrovmDeploymentScope) SetNotReady ¶
func (m *MicrovmDeploymentScope) SetNotReady( reason string, severity clusterv1.ConditionSeverity, message string, messageArgs ...interface{}, )
SetNotReady sets any properties/conditions that are used to indicate that the MicrovmDeployment is NOT 'Ready'.
func (*MicrovmDeploymentScope) SetReady ¶
func (m *MicrovmDeploymentScope) SetReady()
SetReady sets any properties/conditions that are used to indicate that the Microvm is 'Ready'.
func (*MicrovmDeploymentScope) SetReadyReplicas ¶
func (m *MicrovmDeploymentScope) SetReadyReplicas(count int32)
SetReadyReplicas saves the number of ready MicroVMs to the status
type MicrovmReplicaSetScope ¶
type MicrovmReplicaSetScope struct { logr.Logger MicrovmReplicaSet *infrav1.MicrovmReplicaSet // contains filtered or unexported fields }
func NewMicrovmReplicaSetScope ¶
func NewMicrovmReplicaSetScope(params MicrovmReplicaSetScopeParams) (*MicrovmReplicaSetScope, error)
func (*MicrovmReplicaSetScope) CreatedReplicas ¶
func (m *MicrovmReplicaSetScope) CreatedReplicas() int32
CreatedReplicas returns the number of replicas which have been created.
func (*MicrovmReplicaSetScope) DesiredReplicas ¶
func (m *MicrovmReplicaSetScope) DesiredReplicas() int32
DesiredReplicas returns requested replicas set on the spec.
func (*MicrovmReplicaSetScope) MicrovmHost ¶
func (m *MicrovmReplicaSetScope) MicrovmHost() microvm.Host
GetMicrovmHost returns the host for the child MicroVM
func (*MicrovmReplicaSetScope) MicrovmSpec ¶
func (m *MicrovmReplicaSetScope) MicrovmSpec() infrav1.MicrovmSpec
GetMicrovmSpec returns the spec for the child MicroVM
func (*MicrovmReplicaSetScope) Name ¶
func (m *MicrovmReplicaSetScope) Name() string
Name returns the MicrovmReplicaSet name.
func (*MicrovmReplicaSetScope) Namespace ¶
func (m *MicrovmReplicaSetScope) Namespace() string
Namespace returns the namespace name.
func (*MicrovmReplicaSetScope) Patch ¶
func (m *MicrovmReplicaSetScope) Patch() error
Patch persists the resource and status.
func (*MicrovmReplicaSetScope) ReadyReplicas ¶
func (m *MicrovmReplicaSetScope) ReadyReplicas() int32
ReadyReplicas returns the number of replicas which are ready.
func (*MicrovmReplicaSetScope) SetCreatedReplicas ¶
func (m *MicrovmReplicaSetScope) SetCreatedReplicas(count int32)
SetCreatedReplicas records the number of microvms which have been created this does not give information about whether the microvms are ready
func (*MicrovmReplicaSetScope) SetNotReady ¶
func (m *MicrovmReplicaSetScope) SetNotReady( reason string, severity clusterv1.ConditionSeverity, message string, messageArgs ...interface{}, )
SetNotReady sets any properties/conditions that are used to indicate that the MicrovmReplicaSet is NOT 'Ready'.
func (*MicrovmReplicaSetScope) SetReady ¶
func (m *MicrovmReplicaSetScope) SetReady()
SetReady sets any properties/conditions that are used to indicate that the Microvm is 'Ready'.
func (*MicrovmReplicaSetScope) SetReadyReplicas ¶
func (m *MicrovmReplicaSetScope) SetReadyReplicas(count int32)
SetReadyReplicas saves the number of ready MicroVMs to the status
type MicrovmScope ¶
type MicrovmScope struct { logr.Logger MicroVM *infrav1.Microvm // contains filtered or unexported fields }
func NewMicrovmScope ¶
func NewMicrovmScope(params MicrovmScopeParams) (*MicrovmScope, error)
func (*MicrovmScope) GetBasicAuthToken ¶
func (m *MicrovmScope) GetBasicAuthToken() (string, error)
GetBasicAuthToken will fetch the BasicAuthSecret from the cluster and return the token for the given host. If no secret or no value is found, an empty string is returned.
func (*MicrovmScope) GetInstanceID ¶
func (m *MicrovmScope) GetInstanceID() string
GetInstanceID gets the instance ID (i.e. UID) of the mvm.
func (*MicrovmScope) GetLabels ¶
func (m *MicrovmScope) GetLabels() map[string]string
GetLabels returns any user defined or default labels for the microvm.
func (*MicrovmScope) GetMicrovmSpec ¶
func (m *MicrovmScope) GetMicrovmSpec() microvm.VMSpec
GetMicrovmSpec returns the spec for the MicroVM
func (*MicrovmScope) GetProviderID ¶
func (m *MicrovmScope) GetProviderID() string
GetProviderID returns the provider if for the vm. If there is no provider id then an empty string will be returned.
func (*MicrovmScope) GetRawBootstrapData ¶
func (m *MicrovmScope) GetRawBootstrapData() (string, error)
GetRawBootstrapData will return any scripts intended to run on the microvm
func (*MicrovmScope) GetSSHPublicKeys ¶
func (m *MicrovmScope) GetSSHPublicKeys() []microvm.SSHPublicKey
GetSSHPublicKeys will return the SSH public keys for this vm.
func (*MicrovmScope) GetTLSConfig ¶
func (m *MicrovmScope) GetTLSConfig() (*flclient.TLSConfig, error)
GetTLSConfig will fetch the TLSSecretRef and CASecretRef for the MicroVM and return the TLS config for the client. If either are not set, it will be assumed that the host is not configured will TLS and all client calls will be made without credentials.
func (*MicrovmScope) Namespace ¶
func (m *MicrovmScope) Namespace() string
Namespace returns the namespace name.
func (*MicrovmScope) Patch ¶
func (m *MicrovmScope) Patch() error
Patch persists the resource and status.
func (*MicrovmScope) SetNotReady ¶
func (m *MicrovmScope) SetNotReady( reason string, severity clusterv1.ConditionSeverity, message string, messageArgs ...interface{}, )
SetNotReady sets any properties/conditions that are used to indicate that the Microvm is NOT 'Ready'.
func (*MicrovmScope) SetProviderID ¶
func (m *MicrovmScope) SetProviderID(mvmUID string)
SetProviderID saves the unique microvm and object ID to the Mvm spec.
func (*MicrovmScope) SetReady ¶
func (m *MicrovmScope) SetReady()
SetReady sets any properties/conditions that are used to indicate that the Microvm is 'Ready'.