extend cluster iso images information

This commit is contained in:
Sebastian Florek
2025-02-07 13:41:23 +01:00
parent 390891fa14
commit 461535a440
7 changed files with 121 additions and 11 deletions

View 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"`
}

View File

@@ -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"`