Skip to content

Commit

Permalink
make image and rootPass required since they are required to successfu…
Browse files Browse the repository at this point in the history
…lly provision a linode
  • Loading branch information
AshleyDumaine committed Jan 29, 2024
1 parent ec04676 commit 626b4c1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
23 changes: 21 additions & 2 deletions api/v1alpha1/linodemachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,45 +31,64 @@ type LinodeMachineSpec struct {
// ProviderID is the unique identifier as specified by the cloud provider.
// +optional
ProviderID *string `json:"providerID,omitempty"`

// InstanceID is the Linode instance ID for this machine.
// +optional
InstanceID *int `json:"instanceID,omitempty"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Region string `json:"region"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Type string `json:"type"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Label string `json:"label,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Group string `json:"group,omitempty"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
RootPass string `json:"rootPass,omitempty"`
RootPass string `json:"rootPass"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
AuthorizedKeys []string `json:"authorizedKeys,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
AuthorizedUsers []string `json:"authorizedUsers,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
StackScriptID int `json:"stackscriptId,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
StackScriptData map[string]string `json:"stackscriptData,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
BackupID int `json:"backupId,omitempty"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Image string `json:"image,omitempty"`
Image string `json:"image"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Interfaces []InstanceConfigInterfaceCreateOptions `json:"interfaces,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
BackupsEnabled bool `json:"backupsEnabled,omitempty"`
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"

PrivateIP bool `json:"privateIp,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
Tags []string `json:"tags,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
// +optional
Metadata *InstanceMetadataOptions `json:"metadata,omitempty"`

// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
FirewallID int `json:"firewallId,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ spec:
- message: Value is immutable
rule: self == oldSelf
required:
- image
- region
- rootPass
- type
type: object
status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ spec:
- message: Value is immutable
rule: self == oldSelf
required:
- image
- region
- rootPass
- type
type: object
required:
Expand Down

0 comments on commit 626b4c1

Please sign in to comment.