Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the machine v1alpha1 API group +kubebuilder:object:generate=true +groupName=machine.crit.sh
Index ¶
- Constants
- Variables
- type Config
- type ConfigList
- type ConfigSpec
- type ConfigStatus
- type Encoding
- type File
- type Format
- type InfrastructureProvider
- type InfrastructureProviderList
- type InfrastructureProviderSpec
- type InfrastructureProviderStatus
- type Machine
- type MachineAddress
- type MachineAddressType
- type MachineAddresses
- type MachineList
- type MachinePhase
- type MachineSpec
- type MachineStatus
- type NTP
- type SecretFile
- type User
Constants ¶
const ( MachineFinalizer = "machine.crit.sh" MachineControlPlaneLabelName = "node-role.kubernetes.io/master" NodeOwnerLabelName = "machine.crit.sh/machine" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "machine.crit.sh", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConfigSpec `json:"spec,omitempty"` Status ConfigStatus `json:"status,omitempty"` }
Config is the Schema for the configs API
func (*Config) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
func (*Config) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Config) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigList ¶
type ConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Config `json:"items"` }
ConfigList contains a list of Config
func (*ConfigList) DeepCopy ¶
func (in *ConfigList) DeepCopy() *ConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList.
func (*ConfigList) DeepCopyInto ¶
func (in *ConfigList) DeepCopyInto(out *ConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ConfigList) DeepCopyObject ¶
func (in *ConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ConfigSpec ¶
type ConfigSpec struct { // Config refers to either a crit ControlPlaneConfiguration or // WorkerConfiguration. // +optional Config string `json:"config"` // Files specifies extra files to be passed to user_data upon creation. // +optional Files []File `json:"files,omitempty"` // Secrets specifies extra files that are sensitive so content is stored // separately in secrets. // +optional Secrets []SecretFile `json:"secrets,omitempty"` // PreCritCommands specifies extra commands to run before crit runs // +optional PreCritCommands []string `json:"preCritCommands,omitempty"` // PostCritCommands specifies extra commands to run after crit runs // +optional PostCritCommands []string `json:"postCritCommands,omitempty"` // Users specifies extra users to add // +optional Users []User `json:"users,omitempty"` // NTP specifies NTP configuration // +optional NTP *NTP `json:"ntp,omitempty"` // Format specifies the output format of the bootstrap data // +optional Format Format `json:"format,omitempty"` // +optional Verbosity bool `json:"verbosity,omitempty"` }
ConfigSpec defines the desired state of CritConfig
func (*ConfigSpec) DeepCopy ¶
func (in *ConfigSpec) DeepCopy() *ConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.
func (*ConfigSpec) DeepCopyInto ¶
func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigStatus ¶
type ConfigStatus struct { // Ready indicates the BootstrapData field is ready to be consumed Ready bool `json:"ready,omitempty"` // DataSecretName is the name of the secret that stores the bootstrap data script. // +optional DataSecretName *string `json:"dataSecretName,omitempty"` // FailureReason will be set on non-retryable errors // +optional FailureReason string `json:"failureReason,omitempty"` // FailureMessage will be set on non-retryable errors // +optional FailureMessage string `json:"failureMessage,omitempty"` }
ConfigStatus defines the observed state of Config
func (*ConfigStatus) DeepCopy ¶
func (in *ConfigStatus) DeepCopy() *ConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus.
func (*ConfigStatus) DeepCopyInto ¶
func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Encoding ¶
type Encoding string
Encoding specifies the cloud-init file encoding. +kubebuilder:validation:Enum=base64;gzip;gzip+base64
const ( // Base64 implies the contents of the file are encoded as base64. Base64 Encoding = "base64" // Gzip implies the contents of the file are encoded with gzip. Gzip Encoding = "gzip" // GzipBase64 implies the contents of the file are first base64 encoded and then gzip encoded. GzipBase64 Encoding = "gzip+base64" )
type File ¶
type File struct { // Path specifies the full path on disk where to store the file. Path string `json:"path"` // Owner specifies the ownership of the file, e.g. "root:root". // +optional Owner string `json:"owner,omitempty"` // Permissions specifies the permissions to assign to the file, e.g. "0640". // +optional Permissions string `json:"permissions,omitempty"` // Encoding specifies the encoding of the file contents. // +optional Encoding Encoding `json:"encoding,omitempty"` // Content is the actual content of the file. Content string `json:"content"` }
File defines the input for generating write_files in cloud-init.
func (*File) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new File.
func (*File) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Format ¶
type Format string
Format specifies the output format of the bootstrap data +kubebuilder:validation:Enum=cloud-config
const ( // CloudConfig make the bootstrap data to be of cloud-config format CloudConfig Format = "cloud-config" )
type InfrastructureProvider ¶
type InfrastructureProvider struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec InfrastructureProviderSpec `json:"spec,omitempty"` Status InfrastructureProviderStatus `json:"status,omitempty"` }
InfrastructureProvider is the Schema for the infrastructureproviders API
func (*InfrastructureProvider) DeepCopy ¶
func (in *InfrastructureProvider) DeepCopy() *InfrastructureProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureProvider.
func (*InfrastructureProvider) DeepCopyInto ¶
func (in *InfrastructureProvider) DeepCopyInto(out *InfrastructureProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfrastructureProvider) DeepCopyObject ¶
func (in *InfrastructureProvider) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfrastructureProviderList ¶
type InfrastructureProviderList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []InfrastructureProvider `json:"items"` }
InfrastructureProviderList contains a list of InfrastructureProvider
func (*InfrastructureProviderList) DeepCopy ¶
func (in *InfrastructureProviderList) DeepCopy() *InfrastructureProviderList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureProviderList.
func (*InfrastructureProviderList) DeepCopyInto ¶
func (in *InfrastructureProviderList) DeepCopyInto(out *InfrastructureProviderList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*InfrastructureProviderList) DeepCopyObject ¶
func (in *InfrastructureProviderList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type InfrastructureProviderSpec ¶
type InfrastructureProviderSpec struct {
InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"`
}
InfrastructureProviderSpec defines the desired state of InfrastructureProvider
func (*InfrastructureProviderSpec) DeepCopy ¶
func (in *InfrastructureProviderSpec) DeepCopy() *InfrastructureProviderSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureProviderSpec.
func (*InfrastructureProviderSpec) DeepCopyInto ¶
func (in *InfrastructureProviderSpec) DeepCopyInto(out *InfrastructureProviderSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InfrastructureProviderStatus ¶
type InfrastructureProviderStatus struct {
Ready bool `json:"ready"`
}
InfrastructureProviderSpec defines the desired state of InfrastructureProvider
func (*InfrastructureProviderStatus) DeepCopy ¶
func (in *InfrastructureProviderStatus) DeepCopy() *InfrastructureProviderStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InfrastructureProviderStatus.
func (*InfrastructureProviderStatus) DeepCopyInto ¶
func (in *InfrastructureProviderStatus) DeepCopyInto(out *InfrastructureProviderStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Machine ¶
type Machine struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MachineSpec `json:"spec,omitempty"` Status MachineStatus `json:"status,omitempty"` }
Machine is the Schema for the machines API
func (*Machine) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine.
func (*Machine) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Machine) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MachineAddress ¶
type MachineAddress struct { // Machine address type, one of Hostname, ExternalIP or InternalIP. Type MachineAddressType `json:"type"` // The machine address. Address string `json:"address"` }
MachineAddress contains information for the node's address.
func (*MachineAddress) DeepCopy ¶
func (in *MachineAddress) DeepCopy() *MachineAddress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineAddress.
func (*MachineAddress) DeepCopyInto ¶
func (in *MachineAddress) DeepCopyInto(out *MachineAddress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineAddressType ¶
type MachineAddressType string
MachineAddressType describes a valid MachineAddress type.
const ( MachineHostName MachineAddressType = "Hostname" MachineExternalIP MachineAddressType = "ExternalIP" MachineInternalIP MachineAddressType = "InternalIP" MachineExternalDNS MachineAddressType = "ExternalDNS" MachineInternalDNS MachineAddressType = "InternalDNS" )
type MachineAddresses ¶
type MachineAddresses []MachineAddress
MachineAddresses is a slice of MachineAddress items to be used by infrastructure providers.
func (MachineAddresses) DeepCopy ¶
func (in MachineAddresses) DeepCopy() MachineAddresses
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineAddresses.
func (MachineAddresses) DeepCopyInto ¶
func (in MachineAddresses) DeepCopyInto(out *MachineAddresses)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineList ¶
type MachineList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Machine `json:"items"` }
MachineList contains a list of Machine
func (*MachineList) DeepCopy ¶
func (in *MachineList) DeepCopy() *MachineList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineList.
func (*MachineList) DeepCopyInto ¶
func (in *MachineList) DeepCopyInto(out *MachineList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MachineList) DeepCopyObject ¶
func (in *MachineList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MachinePhase ¶
type MachinePhase string
const ( MachinePending MachinePhase = "Pending" MachineProvisioning MachinePhase = "Provisioning" MachineRunning MachinePhase = "Running" MachineTerminating MachinePhase = "Terminating" MachineUnknown MachinePhase = "Unknown" MachineFailed MachinePhase = "Failed" )
type MachineSpec ¶
type MachineSpec struct { // ConfigRef is a reference to the ConfigMap containing the crit // configuration used for this machine. ConfigRef corev1.ObjectReference `json:"configRef,omitempty"` // InfrastructureRef is a required reference to a custom resource offered // by an infrastructure provider. // +optional InfrastructureRef *corev1.ObjectReference `json:"infrastructureRef,omitempty"` // +optional ProviderID *string `json:"providerID,omitempty"` // FailureDomain is the failure domain the machine will be created in. // Must match a key in the FailureDomains map stored on the cluster object. // +optional FailureDomain *string `json:"failureDomain,omitempty"` }
MachineSpec defines the desired state of Machine
func (*MachineSpec) DeepCopy ¶
func (in *MachineSpec) DeepCopy() *MachineSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec.
func (*MachineSpec) DeepCopyInto ¶
func (in *MachineSpec) DeepCopyInto(out *MachineSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MachineStatus ¶
type MachineStatus struct { // NodeRef will point to the corresponding Node if it exists. // +optional NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` // LastUpdated identifies when this status was last observed. // +optional LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` // Version specifies the current version of Kubernetes running // on the corresponding Node. This is meant to be a means of bubbling // up status from the Node to the Machine. // It is entirely optional, but useful for end-user UX if it’s present. // +optional Version *string `json:"version,omitempty"` // FailureReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the Machine's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. // +optional FailureReason *mapierrors.MachineStatusError `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // // This field should not be set for transitive errors that a controller // faces that are expected to be fixed automatically over // time (like service outages), but instead indicate that something is // fundamentally wrong with the Machine's spec or the configuration of // the controller, and that manual intervention is required. Examples // of terminal errors would be invalid combinations of settings in the // spec, values that are unsupported by the controller, or the // responsible controller itself being critically misconfigured. // // Any transient errors that occur during the reconciliation of Machines // can be added as events to the Machine object and/or logged in the // controller's output. // +optional FailureMessage *string `json:"failureMessage,omitempty"` // Phase represents the current phase of machine actuation. // E.g. Pending, Running, Terminating, Failed etc. // +optional //Phase string `json:"phase,omitempty"` Phase MachinePhase `json:"phase,omitempty"` // Addresses is a list of addresses assigned to the machine. // This field is copied from the infrastructure provider reference. // +optional Addresses MachineAddresses `json:"addresses,omitempty"` // InfrastructureReady is the state of the infrastructure provider. // +optional InfrastructureReady bool `json:"infrastructureReady"` }
MachineStatus defines the observed state of Machine
func (*MachineStatus) DeepCopy ¶
func (in *MachineStatus) DeepCopy() *MachineStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineStatus.
func (*MachineStatus) DeepCopyInto ¶
func (in *MachineStatus) DeepCopyInto(out *MachineStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MachineStatus) SetFailure ¶
func (m *MachineStatus) SetFailure(err mapierrors.MachineStatusError, msg string)
func (*MachineStatus) SetVersion ¶
func (m *MachineStatus) SetVersion(version string)
type NTP ¶
type NTP struct { // Servers specifies which NTP servers to use // +optional Servers []string `json:"servers,omitempty"` // Enabled specifies whether NTP should be enabled // +optional Enabled *bool `json:"enabled,omitempty"` }
NTP defines input for generated ntp in cloud-init
func (*NTP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NTP.
func (*NTP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretFile ¶
type SecretFile struct { // Path specifies the full path on disk where to store the file. Path string `json:"path"` // Owner specifies the ownership of the file, e.g. "root:root". // +optional Owner string `json:"owner,omitempty"` // Permissions specifies the permissions to assign to the file, e.g. "0640". // +optional Permissions string `json:"permissions,omitempty"` // Encoding specifies the encoding of the file contents. // +optional Encoding Encoding `json:"encoding,omitempty"` // DataSecretName is the name of the secret that stores the file content. DataSecretName string `json:"dataSecretName"` // SecretKeyName is the key of the secret where the content is stored. Can // only be a alphanumeric characters, '-', '_' or '.'. SecretKeyName string `json:"secretKeyName"` }
func (*SecretFile) DeepCopy ¶
func (in *SecretFile) DeepCopy() *SecretFile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretFile.
func (*SecretFile) DeepCopyInto ¶
func (in *SecretFile) DeepCopyInto(out *SecretFile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type User ¶
type User struct { // Name specifies the user name Name string `json:"name"` // Gecos specifies the gecos to use for the user // +optional Gecos *string `json:"gecos,omitempty"` // Groups specifies the additional groups for the user // +optional Groups *string `json:"groups,omitempty"` // HomeDir specifies the home directory to use for the user // +optional HomeDir *string `json:"homeDir,omitempty"` // Inactive specifies whether to mark the user as inactive // +optional Inactive *bool `json:"inactive,omitempty"` // Shell specifies the user's shell // +optional Shell *string `json:"shell,omitempty"` // Passwd specifies a hashed password for the user // +optional Passwd *string `json:"passwd,omitempty"` // PrimaryGroup specifies the primary group for the user // +optional PrimaryGroup *string `json:"primaryGroup,omitempty"` // LockPassword specifies if password login should be disabled // +optional LockPassword *bool `json:"lockPassword,omitempty"` // Sudo specifies a sudo role for the user // +optional Sudo *string `json:"sudo,omitempty"` // SSHAuthorizedKeys specifies a list of ssh authorized keys for the user // +optional SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` }
User defines the input for a generated user in cloud-init.
func (*User) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User.
func (*User) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.