|
| 1 | +package v1beta1 |
| 2 | + |
| 3 | +// CloudInit defines options related to the bootstrapping systems where |
| 4 | +// CloudInit is used. |
| 5 | +type CloudInit struct { |
| 6 | + User User `json:"user,omitempty"` |
| 7 | + Meta Meta `json:"meta,omitempty"` |
| 8 | + Network Network `json:"network,omitempty"` |
| 9 | +} |
| 10 | + |
| 11 | +type User struct { |
| 12 | + GrowPart GrowPart `yaml:"growpart,omitempty" json:"-"` |
| 13 | + HostName string `yaml:"hostname,omitempty" json:"-"` |
| 14 | + ManageEtcHosts bool `yaml:"manage_etc_hosts,omitempty" json:"-"` |
| 15 | + User string `yaml:"user,omitempty" json:"user,omitempty"` |
| 16 | + ChPasswd ChPasswd `yaml:"chpasswd,omitempty" json:"-"` |
| 17 | + Users []string `yaml:"users,omitempty" json:"-"` |
| 18 | + Password string `yaml:"password,omitempty" json:"password,omitempty"` |
| 19 | + Packages []string `yaml:"packages,omitempty" json:"-"` |
| 20 | + PackageUpgrade bool `yaml:"package_upgrade,omitempty" json:"-"` |
| 21 | + WriteFiles []WriteFiles `yaml:"write_files,omitempty" json:"-"` |
| 22 | + RunCmd []string `yaml:"runcmd,omitempty" json:"-"` |
| 23 | +} |
| 24 | + |
| 25 | +type Network struct { |
| 26 | + Version int `json:"version,omitempty"` |
| 27 | + Config []NetworkConfig `json:"config,omitempty"` |
| 28 | +} |
| 29 | + |
| 30 | +type NetworkConfig struct { |
| 31 | + Type string `json:"type,omitempty"` |
| 32 | + Name string `json:"name,omitempty"` |
| 33 | + MacAddress string `json:"mac_address,omitempty"` |
| 34 | + Subnets []Subnet `json:"subnets,omitempty"` |
| 35 | + Destination string `json:"destination,omitempty"` |
| 36 | + Gateway string `json:"gateway,omitempty"` |
| 37 | +} |
| 38 | + |
| 39 | +type Subnet struct { |
| 40 | + Type string `json:"type,omitempty"` |
| 41 | + Address string `json:"address,omitempty"` |
| 42 | + Gateway string `json:"gateway,omitempty"` |
| 43 | +} |
| 44 | + |
| 45 | +type Meta struct { |
| 46 | +} |
| 47 | + |
| 48 | +type GrowPart struct { |
| 49 | + Mode string `yaml:"mode,omitempty" json:"-"` |
| 50 | + Devices []string `yaml:"devices,omitempty" json:"-"` |
| 51 | + IgnoreGrowrootDisabled bool `yaml:"ignore_growroot_disabled,omitempty" json:"-"` |
| 52 | +} |
| 53 | + |
| 54 | +type ChPasswd struct { |
| 55 | + Expire string `yaml:"expire,omitempty" json:"-"` |
| 56 | +} |
| 57 | + |
| 58 | +type WriteFiles struct { |
| 59 | + Path string `yaml:"path,omitempty" json:"-"` |
| 60 | + Owner string `yaml:"owner,omitempty" json:"-"` |
| 61 | + Permissions string `yaml:"permissions,omitempty" json:"-"` |
| 62 | + Content string `yaml:"content,omitempty" json:"-"` |
| 63 | +} |
0 commit comments