Skip to content

Commit

Permalink
fix/node_image required condition
Browse files Browse the repository at this point in the history
  • Loading branch information
stg-0 committed Mar 28, 2023
1 parent f915d2a commit 18fe485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/internal/create/actions/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type DescriptorFile struct {
ControlPlane struct {
Managed bool `yaml:"managed" validate:"boolean"`
Name string `yaml:"name"`
NodeImage string `yaml:"node_image" validate:"required"`
NodeImage string `yaml:"node_image" validate:"required_if=InfraProvider gcp"`
HighlyAvailable bool `yaml:"highly_available" validate:"boolean"`
Size string `yaml:"size" validate:"required_if=Managed false"`
RootVolume struct {
Expand Down Expand Up @@ -118,7 +118,7 @@ type AWS struct {

type WorkerNodes []struct {
Name string `yaml:"name" validate:"required"`
NodeImage string `yaml:"node_image" validate:"required"`
NodeImage string `yaml:"node_image" validate:"required_if=InfraProvider gcp"`
Quantity int `yaml:"quantity" validate:"required,numeric,gt=0"`
Size string `yaml:"size" validate:"required"`
ZoneDistribution string `yaml:"zone_distribution" validate:"omitempty,oneof='balanced' 'unbalanced'"`
Expand Down

0 comments on commit 18fe485

Please sign in to comment.