1
0
mirror of https://github.com/rancher/types.git synced 2025-06-25 05:01:33 +00:00

Make role an enum

This commit is contained in:
Darren Shepherd 2018-01-17 15:43:43 -07:00
parent 4087cd55d5
commit 2a197d2490
2 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@ type MachineSpec struct {
DisplayName string `json:"displayName,omitempty"`
RequestedHostname string `json:"requestedHostname,omitempty" norman:"noupdate"`
ClusterName string `json:"clusterName,omitempty" norman:"type=reference[cluster],noupdate,required"`
Role []string `json:"role,omitempty" norman:"noupdate"`
Role []string `json:"role,omitempty" norman:"noupdate,type=array[enum],options=etcd|worker|controlplane"`
MachineTemplateName string `json:"machineTemplateName,omitempty" norman:"type=reference[machineTemplate],noupdate"`
}

View File

@ -29,7 +29,7 @@ type RKEConfigNode struct {
// Optional - Internal address that will be used for components communication
InternalAddress string `yaml:"internal_address" json:"internalAddress,omitempty"`
// Node role in kubernetes cluster (controlplane, worker, or etcd)
Role []string `yaml:"role" json:"role,omitempty"`
Role []string `yaml:"role" json:"role,omitempty" norman:"type=array[enum],options=etcd|worker|controlplane"`
// Optional - Hostname of the node
HostnameOverride string `yaml:"hostname_override" json:"hostnameOverride,omitempty"`
// SSH usesr that will be used by RKE