Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eksctl-io/eksctl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2e8b66ca65257a6ca6ae85edce630edb8e2faee6
Choose a base ref
..
head repository: eksctl-io/eksctl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 27a856f2e2b2d0617e46c585490032bfe4ff822b
Choose a head ref
Showing with 199 additions and 356 deletions.
  1. +1 −1 .docker/build_image_manifest
  2. +1 −1 .docker/image_tag
  3. +4 −4 go.mod
  4. +40 −0 go.sum
  5. +4 −4 pkg/ctl/cmdutils/cmd.go
  6. +7 −7 pkg/ctl/cmdutils/configfile_test.go
  7. +1 −0 pkg/ctl/cmdutils/scale.go
  8. +10 −4 pkg/ctl/cmdutils/scale_test.go
  9. +2 −2 pkg/ctl/create/cluster.go
  10. +2 −2 pkg/ctl/create/fargate.go
  11. +2 −2 pkg/ctl/create/iamidentitymapping.go
  12. +2 −2 pkg/ctl/create/iamserviceaccount.go
  13. +2 −2 pkg/ctl/create/nodegroup.go
  14. +4 −4 pkg/ctl/delete/cluster.go
  15. +2 −2 pkg/ctl/delete/fargate.go
  16. +2 −2 pkg/ctl/delete/iamidentitymapping.go
  17. +2 −2 pkg/ctl/delete/iamserviceaccount.go
  18. +2 −2 pkg/ctl/delete/nodegroup.go
  19. +2 −2 pkg/ctl/drain/nodegroup.go
  20. +2 −2 pkg/ctl/enable/profile.go
  21. +2 −2 pkg/ctl/enable/repo.go
  22. +2 −2 pkg/ctl/generate/profile.go
  23. +2 −2 pkg/ctl/get/cluster.go
  24. +2 −2 pkg/ctl/get/fargate.go
  25. +2 −2 pkg/ctl/get/iamidentitymapping.go
  26. +2 −2 pkg/ctl/get/iamserviceaccount.go
  27. +3 −3 pkg/ctl/get/labels.go
  28. +2 −2 pkg/ctl/get/nodegroup.go
  29. +2 −2 pkg/ctl/scale/nodegroup.go
  30. +3 −3 pkg/ctl/set/labels.go
  31. +3 −3 pkg/ctl/unset/labels.go
  32. +2 −2 pkg/ctl/update/cluster.go
  33. +2 −2 pkg/ctl/upgrade/cluster.go
  34. +3 −3 pkg/ctl/upgrade/nodegroup.go
  35. +2 −2 pkg/ctl/utils/associate_iam_oidc_provider.go
  36. +2 −2 pkg/ctl/utils/describe_stacks.go
  37. +2 −2 pkg/ctl/utils/install_vpc_controllers.go
  38. +3 −3 pkg/ctl/utils/nodegroup_health.go
  39. +2 −2 pkg/ctl/utils/set_public_access_cidrs.go
  40. +2 −2 pkg/ctl/utils/update_aws_node.go
  41. +2 −2 pkg/ctl/utils/update_cluster_endpoint_access.go
  42. +2 −2 pkg/ctl/utils/update_cluster_logging.go
  43. +2 −2 pkg/ctl/utils/update_coredns.go
  44. +2 −2 pkg/ctl/utils/update_kube_proxy.go
  45. +2 −2 pkg/ctl/utils/update_legacy_subnet_settings.go
  46. +1 −1 pkg/ctl/utils/wait_nodes.go
  47. +2 −2 pkg/ctl/utils/write_kubeconfig.go
  48. +0 −74 pkg/gitops/deploykey/deploykey.go
  49. +0 −119 pkg/gitops/deploykey/github.go
  50. +0 −53 pkg/gitops/deploykey/github_test.go
  51. +22 −5 pkg/gitops/flux/installer.go
  52. +25 −0 pkg/gitops/gitops.go
2 changes: 1 addition & 1 deletion .docker/build_image_manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"github.com/golangci/golangci-lint v1.27.0"
"github.com/goreleaser/goreleaser v0.136.0"
"github.com/kevinburke/go-bindata v3.15.0+incompatible"
"github.com/onsi/ginkgo v1.12.0"
"github.com/onsi/ginkgo v1.12.3"
"github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5"
"github.com/github-release/github-release v0.8.1"
"golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770"
2 changes: 1 addition & 1 deletion .docker/image_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
206b21ea15b61719680860c5bce5fd4352005dad
291632ca644aa632e9053f7bef34d431a80c1785
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -34,8 +34,8 @@ require (
github.com/kris-nova/lolgopher v0.0.0-20180921204813-313b3abb0d9b // indirect
github.com/kubicorn/kubicorn v0.0.0-20180829191017-06f6bce92acc
github.com/lithammer/dedent v1.1.0
github.com/onsi/ginkgo v1.12.0
github.com/onsi/gomega v1.9.0
github.com/onsi/ginkgo v1.12.3
github.com/onsi/gomega v1.10.1
github.com/pelletier/go-toml v1.6.0
github.com/pkg/errors v0.9.1
github.com/russross/blackfriday/v2 v2.0.1
@@ -49,13 +49,13 @@ require (
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2 // indirect
github.com/weaveworks/go-git-providers v0.1.2
// Forked from errordeveloper/goformation, forked from awslabs/goformation in
// Sept. 2018, see #1133
github.com/weaveworks/goformation v0.0.0-20200623124447-18df1c671d26
github.com/weaveworks/launcher v0.0.0-20180711153254-f1b2830d4f2d
github.com/whilp/git-urls v0.0.0-20160530060445-31bac0d230fa
github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200428200454-593003d681fa // indirect
golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770
k8s.io/api v0.16.8
k8s.io/apiextensions-apiserver v0.16.8
40 changes: 40 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -262,6 +262,8 @@ github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fullsailor/pkcs7 v0.0.0-20180422025557-ae226422660e/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
@@ -382,6 +384,13 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0=
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4=
@@ -432,6 +441,8 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo=
@@ -705,6 +716,8 @@ github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d h1:AREM5mwr4u1
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.5.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
@@ -713,6 +726,9 @@ github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU=
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.12.3 h1:+RYp9QczoWz9zfUyLP/5SLXQVhfr6gZOoKGfQqHuLZQ=
github.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.2.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -722,6 +738,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg=
github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88=
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
@@ -930,13 +948,21 @@ github.com/vmware/govmomi v0.20.1 h1:7b/SeTUB3tER8ZLGLLLH3xcnB2xeuLULXmfPFqPSRZA
github.com/vmware/govmomi v0.20.1/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU=
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2 h1:txplJASvd6b/hrE0s/Ixfpp2cuwH9IO9oZBAN9iYa4A=
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2/go.mod h1:DGCIhurYgnLz8J9ga1fMV/fbLDyUvTyrWXVWUIyJon4=
github.com/weaveworks/go-git-providers v0.1.0 h1:uKDwRXuuX41tRC8ZWlQW7VtTkE3z5uRqAbAfBucZ4TE=
github.com/weaveworks/go-git-providers v0.1.0/go.mod h1:X+1QTwOnpNZOK6/CltciaBJ4zS697wniXxUrAzZjyEI=
github.com/weaveworks/go-git-providers v0.1.1 h1:cw0qw1KpUBL5FTZbfHp4XGBpaATBk+3PWssEoPukmZI=
github.com/weaveworks/go-git-providers v0.1.1/go.mod h1:M6Czz1nBpSmewHqSZQ2zy/9eGuYbDwq8bGCLSUbWDVs=
github.com/weaveworks/go-git-providers v0.1.2 h1:NaQMvKNB3LLlpfQCNt5v+AeiFMPy9Gs1VAOe9wAjmrw=
github.com/weaveworks/go-git-providers v0.1.2/go.mod h1:M6Czz1nBpSmewHqSZQ2zy/9eGuYbDwq8bGCLSUbWDVs=
github.com/weaveworks/goformation v0.0.0-20200623124447-18df1c671d26 h1:ijJBvv2r20TBaD75/1mJFdAP+Q7g6NDEU1cI9jAwDA8=
github.com/weaveworks/goformation v0.0.0-20200623124447-18df1c671d26/go.mod h1:E71fJkqmnCECvk11VqsbMUdLJgR8mxvHzolqpcWKbn4=
github.com/weaveworks/launcher v0.0.0-20180711153254-f1b2830d4f2d h1:p52gB6rdtaV69CnprmY7UmhDF2tbf9ps7KNnovBzFhI=
github.com/weaveworks/launcher v0.0.0-20180711153254-f1b2830d4f2d/go.mod h1:w9Z1vnQmPobkEZ0F3oyiqRYP+62qDqTGnK6t5uhe1kg=
github.com/weaveworks/mesh v0.0.0-20170419100114-1f158d31de55/go.mod h1:mcON9Ws1aW0crSErpXWp7U1ErCDEKliDX2OhVlbWRKk=
github.com/whilp/git-urls v0.0.0-20160530060445-31bac0d230fa h1:rW+Lu6281ed/4XGuVIa4/YebTRNvoUJlfJ44ktEVwZk=
github.com/whilp/git-urls v0.0.0-20160530060445-31bac0d230fa/go.mod h1:2rx5KE5FLD0HRfkkpyn8JwbVLBdhgeiOb2D2D9LLKM4=
github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0 h1:qqllXPzXh+So+mmANlX/gCJrgo+1kQyshMoQ+NASzm0=
github.com/whilp/git-urls v0.0.0-20191001220047-6db9661140c0/go.mod h1:2rx5KE5FLD0HRfkkpyn8JwbVLBdhgeiOb2D2D9LLKM4=
github.com/xanzy/go-gitlab v0.31.0 h1:+nHztQuCXGSMluKe5Q9IRaPdz6tO8O0gMkQ0vqGpiBk=
github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -1053,6 +1079,8 @@ golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1098,11 +1126,16 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190812172437-4e8604ab3aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200428200454-593003d681fa h1:yMbJOvnfYkO1dSAviTu/ZguZWLBTXx4xE3LYrxUCCiA=
golang.org/x/sys v0.0.0-20200428200454-593003d681fa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20180810153555-6e3c4e7365dd/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1206,6 +1239,13 @@ google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
8 changes: 4 additions & 4 deletions pkg/ctl/cmdutils/cmd.go
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ type Cmd struct {

ClusterConfigFile string

ProviderConfig *api.ProviderConfig
ProviderConfig api.ProviderConfig
ClusterConfig *api.ClusterConfig

Include, Exclude []string
@@ -58,10 +58,10 @@ func (c *Cmd) NewCtl() (*eks.ClusterProvider, error) {
}
}

ctl := eks.New(c.ProviderConfig, c.ClusterConfig)
ctl := eks.New(&c.ProviderConfig, c.ClusterConfig)

if !ctl.IsSupportedRegion() {
return nil, ErrUnsupportedRegion(c.ProviderConfig)
return nil, ErrUnsupportedRegion(&c.ProviderConfig)
}

return ctl, nil
@@ -71,7 +71,7 @@ func (c *Cmd) NewCtl() (*eks.ClusterProvider, error) {
func AddResourceCmd(flagGrouping *FlagGrouping, parentVerbCmd *cobra.Command, newCmd func(*Cmd)) {
c := &Cmd{
CobraCommand: &cobra.Command{},
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},

Plan: true, // always on by default
Wait: false, // varies in some commands
14 changes: 7 additions & 7 deletions pkg/ctl/cmdutils/configfile_test.go
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ var _ = Describe("cmdutils configfile", func() {
NameArg: name,
CobraCommand: cobraCmd,
ClusterConfigFile: examplesDir + "01-simple-cluster.yaml",
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}
l := newCommonClusterConfigLoader(cmd)
l.flagsIncompatibleWithConfigFile.Delete("name")
@@ -108,7 +108,7 @@ var _ = Describe("cmdutils configfile", func() {
NameArg: "foo-2",
CobraCommand: newCmd(),
ClusterConfigFile: examplesDir + "01-simple-cluster.yaml",
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}
l := newCommonClusterConfigLoader(cmd)
l.flagsIncompatibleWithConfigFile.Delete("name")
@@ -129,7 +129,7 @@ var _ = Describe("cmdutils configfile", func() {
CobraCommand: newCmd(),
ClusterConfigFile: example,
ClusterConfig: api.NewClusterConfig(),
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}

err := NewMetadataLoader(cmd).Load()
@@ -162,7 +162,7 @@ var _ = Describe("cmdutils configfile", func() {
CobraCommand: newCmd(),
ClusterConfigFile: filepath.Join(examplesDir, natTest.configFile),
ClusterConfig: api.NewClusterConfig(),
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}

params := &CreateClusterCmdParams{WithoutNodeGroup: true, Managed: false}
@@ -212,7 +212,7 @@ var _ = Describe("cmdutils configfile", func() {
cmd := &Cmd{
CobraCommand: newCmd(),
ClusterConfig: api.NewClusterConfig(),
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}

ngFilter := filter.NewNodeGroupFilter()
@@ -276,7 +276,7 @@ var _ = Describe("cmdutils configfile", func() {
CobraCommand: newCmd(),
ClusterConfigFile: filepath.Join(examplesDir, loaderTest.configFile),
ClusterConfig: api.NewClusterConfig(),
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}

ngFilter := filter.NewNodeGroupFilter()
@@ -310,7 +310,7 @@ var _ = Describe("cmdutils configfile", func() {
CobraCommand: newCmd(),
ClusterConfigFile: configFilePath,
ClusterConfig: api.NewClusterConfig(),
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
}

params := &CreateClusterCmdParams{
1 change: 1 addition & 0 deletions pkg/ctl/cmdutils/scale.go
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ func NewScaleNodeGroupLoader(cmd *Cmd, ng *api.NodeGroup) ClusterConfigLoader {
if err := validateNumberOfNodes(loadedNG); err != nil {
return err
}
*ng = *loadedNG
l.Plan = false
return nil
}
14 changes: 10 additions & 4 deletions pkg/ctl/cmdutils/scale_test.go
Original file line number Diff line number Diff line change
@@ -11,8 +11,9 @@ import (
)

type scaleNodeGroupCase struct {
name string
error error
name string
error error
minSize *int
}

var _ = Describe("scale node group config file loader", func() {
@@ -22,14 +23,15 @@ var _ = Describe("scale node group config file loader", func() {
Run: func(_ *cobra.Command, _ []string) {},
}
}
minSizeOne := 1

DescribeTable("create nodegroup successfully",
func(params scaleNodeGroupCase) {
cmd := &Cmd{
CobraCommand: newCmd(),
ClusterConfigFile: "test_data/scale-ng-test.yaml",
ClusterConfig: api.NewClusterConfig(),
ProviderConfig: &api.ProviderConfig{},
ProviderConfig: api.ProviderConfig{},
NameArg: params.name,
}

@@ -39,6 +41,9 @@ var _ = Describe("scale node group config file loader", func() {
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring(params.error.Error()))
} else {
if params.minSize != nil {
Expect(ng.MinSize).To(Equal(params.minSize))
}
Expect(err).ToNot(HaveOccurred())
}
},
@@ -57,7 +62,8 @@ var _ = Describe("scale node group config file loader", func() {
name: "ng-no-min-max",
}),
Entry("ng with minSize", scaleNodeGroupCase{
name: "ng-with-min",
name: "ng-with-min",
minSize: &minSizeOne,
}),
Entry("ng with wrong value for minSize", scaleNodeGroupCase{
name: "ng-with-wrong-min",
Loading