mirror of
https://github.com/kairos-io/osbuilder.git
synced 2025-09-05 09:12:10 +00:00
extend cluster iso images information
This commit is contained in:
42
api/v1alpha2/cloudconfig_types.go
Normal file
42
api/v1alpha2/cloudconfig_types.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package v1alpha2
|
||||
|
||||
type CloudConfig struct {
|
||||
Users Users `json:"users,omitempty"`
|
||||
Plural Plural `json:"plural,omitempty"`
|
||||
}
|
||||
|
||||
type Users []User
|
||||
|
||||
func (in Users) FirstUser() *User {
|
||||
for _, user := range in {
|
||||
return &user
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type User struct {
|
||||
Name string `json:"name"`
|
||||
Passwd string `json:"passwd"`
|
||||
}
|
||||
|
||||
func (in *User) GetName() *string {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &in.Name
|
||||
}
|
||||
|
||||
func (in *User) GetPasswd() *string {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return &in.Passwd
|
||||
}
|
||||
|
||||
type Plural struct {
|
||||
Token string `json:"token"`
|
||||
URL string `json:"url"`
|
||||
}
|
@@ -30,20 +30,24 @@ const (
|
||||
|
||||
// OSArtifactSpec defines the desired state of OSArtifact
|
||||
type OSArtifactSpec struct {
|
||||
// There are 3 ways to specify a Kairos image:
|
||||
|
||||
// Points to a prepared kairos image (e.g. a released one)
|
||||
// +optional
|
||||
ImageName string `json:"imageName,omitempty"`
|
||||
|
||||
// +optional
|
||||
ISO bool `json:"iso,omitempty"`
|
||||
|
||||
// +kubebuilder:validation:Type:=string
|
||||
// +kubebuilder:validation:Enum:=rpi3;rpi4
|
||||
// +optional
|
||||
Model *Model `json:"model,omitempty"`
|
||||
|
||||
// +optional
|
||||
CloudConfigRef *corev1.SecretKeySelector `json:"cloudConfigRef,omitempty"`
|
||||
|
||||
// +optional
|
||||
Project string `json:"project,omitempty"`
|
||||
|
||||
// +optional
|
||||
Bundles []string `json:"bundles,omitempty"`
|
||||
|
||||
|
Reference in New Issue
Block a user