From 42b63f48189e1b9ce2fc661ccb940877ae000ce7 Mon Sep 17 00:00:00 2001 From: Ilya Dmitrichenko Date: Fri, 22 Mar 2019 10:35:14 +0000 Subject: [PATCH] Add missing defaulting logic and generated code --- pkg/apis/eksctl.io/v1alpha4/types.go | 1 + pkg/apis/eksctl.io/v1alpha4/validation.go | 3 +++ pkg/apis/eksctl.io/v1alpha4/zz_generated.deepcopy.go | 5 +++++ pkg/cfn/builder/api_test.go | 1 + 4 files changed, 10 insertions(+) diff --git a/pkg/apis/eksctl.io/v1alpha4/types.go b/pkg/apis/eksctl.io/v1alpha4/types.go index 8598dd697e..bb7c6f69a1 100644 --- a/pkg/apis/eksctl.io/v1alpha4/types.go +++ b/pkg/apis/eksctl.io/v1alpha4/types.go @@ -312,6 +312,7 @@ func (c *ClusterConfig) NewNodeGroup() *NodeGroup { AutoScaler: NewBoolFalse(), ExternalDNS: NewBoolFalse(), AppMesh: NewBoolFalse(), + EBSCSI: NewBoolFalse(), }, }, } diff --git a/pkg/apis/eksctl.io/v1alpha4/validation.go b/pkg/apis/eksctl.io/v1alpha4/validation.go index 1ce7abb589..e5e45d4c8e 100644 --- a/pkg/apis/eksctl.io/v1alpha4/validation.go +++ b/pkg/apis/eksctl.io/v1alpha4/validation.go @@ -28,6 +28,9 @@ func validateNodeGroupIAM(i int, ng *NodeGroup, value, fieldName, path string) e if v := ng.IAM.WithAddonPolicies.AppMesh; v != nil && *v { return fmt.Errorf("%s.AppMesh cannot be set at the same time", p) } + if v := ng.IAM.WithAddonPolicies.EBSCSI; v != nil && *v { + return fmt.Errorf("%s.ebsCSI cannot be set at the same time", p) + } } return nil } diff --git a/pkg/apis/eksctl.io/v1alpha4/zz_generated.deepcopy.go b/pkg/apis/eksctl.io/v1alpha4/zz_generated.deepcopy.go index 7aa25f3ef4..c268319409 100644 --- a/pkg/apis/eksctl.io/v1alpha4/zz_generated.deepcopy.go +++ b/pkg/apis/eksctl.io/v1alpha4/zz_generated.deepcopy.go @@ -377,6 +377,11 @@ func (in *NodeGroupIAMAddonPolicies) DeepCopyInto(out *NodeGroupIAMAddonPolicies *out = new(bool) **out = **in } + if in.EBSCSI != nil { + in, out := &in.EBSCSI, &out.EBSCSI + *out = new(bool) + **out = **in + } return } diff --git a/pkg/cfn/builder/api_test.go b/pkg/cfn/builder/api_test.go index b533ac6d0c..2eafe31efb 100644 --- a/pkg/cfn/builder/api_test.go +++ b/pkg/cfn/builder/api_test.go @@ -342,6 +342,7 @@ var _ = Describe("CloudFormation template builder API", func() { AutoScaler: api.NewBoolFalse(), ExternalDNS: api.NewBoolFalse(), AppMesh: api.NewBoolFalse(), + EBSCSI: api.NewBoolFalse(), }, }, },