Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the bootstrap v1alpha1 API group +kubebuilder:object:generate=true +groupName=bootstrap.tmax.io
Index ¶
- Variables
- type BMC
- type BootMode
- type ChecksumType
- type Encoding
- type File
- type Format
- type Image
- type NTP
- type NodeConfig
- func (nc *NodeConfig) BootMode() BootMode
- func (nc *NodeConfig) CheckBMHDetails() bool
- func (nc *NodeConfig) ChecksumType() ChecksumType
- func (in *NodeConfig) DeepCopy() *NodeConfig
- func (in *NodeConfig) DeepCopyInto(out *NodeConfig)
- func (in *NodeConfig) DeepCopyObject() runtime.Object
- func (r *NodeConfig) Default()
- func (r *NodeConfig) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *NodeConfig) ValidateCreate() error
- func (r *NodeConfig) ValidateDelete() error
- func (r *NodeConfig) ValidateUpdate(old runtime.Object) error
- type NodeConfigList
- type NodeConfigSpec
- type NodeConfigStatus
- type User
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "bootstrap.tmax.io", 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 BMC ¶
type BMC struct { // Address holds the URL for accessing the controller on the network. Address string `json:"address"` // Which MAC address will PXE boot? This is optional for some // types, but required for libvirt VMs driven by vbmc. // +kubebuilder:validation:Pattern=`[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}` // +optional BootMACAddress string `json:"bootMACAddress,omitempty"` // Select the method of initializing the hardware during // boot. Defaults to UEFI. // +optional BootMode BootMode `json:"bootMode,omitempty"` // ID/PW for authenticating with the BMC Username string `json:"username"` Password string `json:"password"` }
BMC contains the information necessary to communicate with the baremetal host
func (*BMC) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BMC.
func (*BMC) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BootMode ¶
type BootMode string
BootMode is the boot mode of the system +kubebuilder:validation:Enum=UEFI;legacy
type ChecksumType ¶
type ChecksumType string
ChecksumType holds the algorithm name for the checksum +kubebuilder:validation:Enum=md5;sha256;sha512
const ( // MD5 checksum type MD5 ChecksumType = "md5" // SHA256 checksum type SHA256 ChecksumType = "sha256" // SHA512 checksum type SHA512 ChecksumType = "sha512" // DefaultChecksumType is MD5 DefaultChecksumType ChecksumType = MD5 )
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 Image ¶
type Image struct { // URL is a location of an image to deploy. URL string `json:"url"` // Checksum is the checksum for the image. Checksum string `json:"checksum"` // ChecksumType is the checksum algorithm for the image. // e.g md5, sha256, sha512 ChecksumType ChecksumType `json:"checksumType,omitempty"` }
Image holds the details of an image either to provisioned or that has been provisioned.
func (*Image) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 NodeConfig ¶
type NodeConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NodeConfigSpec `json:"spec,omitempty"` Status NodeConfigStatus `json:"status,omitempty"` }
NodeConfig is the Schema for the nodeconfigs API
func (*NodeConfig) BootMode ¶
func (nc *NodeConfig) BootMode() BootMode
BootMode returns the boot method to use for the host.
func (*NodeConfig) CheckBMHDetails ¶
func (nc *NodeConfig) CheckBMHDetails() bool
CheckBMHDetails check if BMH value if filled
func (*NodeConfig) ChecksumType ¶
func (nc *NodeConfig) ChecksumType() ChecksumType
ChecksumType returns the checksum method to use for image validation.
func (*NodeConfig) DeepCopy ¶
func (in *NodeConfig) DeepCopy() *NodeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfig.
func (*NodeConfig) DeepCopyInto ¶
func (in *NodeConfig) DeepCopyInto(out *NodeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeConfig) DeepCopyObject ¶
func (in *NodeConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*NodeConfig) Default ¶
func (r *NodeConfig) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*NodeConfig) SetupWebhookWithManager ¶
func (r *NodeConfig) SetupWebhookWithManager(mgr ctrl.Manager) error
SetupWebhookWithManager init webhook
func (*NodeConfig) ValidateCreate ¶
func (r *NodeConfig) ValidateCreate() error
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*NodeConfig) ValidateDelete ¶
func (r *NodeConfig) ValidateDelete() error
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*NodeConfig) ValidateUpdate ¶
func (r *NodeConfig) ValidateUpdate(old runtime.Object) error
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
type NodeConfigList ¶
type NodeConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NodeConfig `json:"items"` }
NodeConfigList contains a list of NodeConfig
func (*NodeConfigList) DeepCopy ¶
func (in *NodeConfigList) DeepCopy() *NodeConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigList.
func (*NodeConfigList) DeepCopyInto ¶
func (in *NodeConfigList) DeepCopyInto(out *NodeConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeConfigList) DeepCopyObject ¶
func (in *NodeConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeConfigSpec ¶
type NodeConfigSpec struct { // BMC specifies the BMC configuration BMC *BMC `json:"bmc"` // Image holds the details of the image to be provisioned. Image *Image `json:"image"` // Files specifies extra files to be passed to user_data upon creation. // +optional Files []File `json:"files,omitempty"` // CloudInitCommands specifies extra commands to run after systemd // +optional CloudInitCommands []string `json:"cloudInitCommands,omitempty"` // Users specifies extra users to add // +optional Users []User `json:"users,omitempty"` // NTP specifies NTP configuration // +optional NTP *NTP `json:"ntp,omitempty"` }
NodeConfigSpec defines the desired state of NodeConfig
func (*NodeConfigSpec) DeepCopy ¶
func (in *NodeConfigSpec) DeepCopy() *NodeConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigSpec.
func (*NodeConfigSpec) DeepCopyInto ¶
func (in *NodeConfigSpec) DeepCopyInto(out *NodeConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeConfigStatus ¶
type NodeConfigStatus 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"` // UserData references the Secret that holds user data needed by the bare metal // operator. The Namespace is optional; it will default to the metal3machine's // namespace if not specified. UserData *corev1.SecretReference `json:"userData,omitempty"` // FailureReason will be set on non-retryable errors // +optional FailureReason string `json:"failureReason,omitempty"` // FailureMessage will be set in the event that there is a terminal problem // reconciling the metal3machine 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 metal3machine'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 // metal3machines can be added as events to the metal3machine object // and/or logged in the controller's output. // +optional FailureMessage *string `json:"failureMessage,omitempty"` }
NodeConfigStatus defines the observed state of NodeConfig
func (*NodeConfigStatus) DeepCopy ¶
func (in *NodeConfigStatus) DeepCopy() *NodeConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfigStatus.
func (*NodeConfigStatus) DeepCopyInto ¶
func (in *NodeConfigStatus) DeepCopyInto(out *NodeConfigStatus)
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.