Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eks/mng: fix MNG desired capacity #170

Merged
merged 3 commits into from
Sep 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion CHANGELOG/CHANGELOG-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
<hr>


## [v1.5.2](https://github.com/aws/aws-k8s-tester/releases/tag/v1.5.2) (2020-09-12)

See [code changes](https://github.com/aws/aws-k8s-tester/compare/v1.5.1...v1.5.2).

### `eks`

- Fix [`eks/mng` `desiredSize` parameter in CloudFormation](https://github.com/aws/aws-k8s-tester/pull/170).

### Dependency

- Upgrade [`github.com/aws/aws-sdk-go`](https://github.com/aws/aws-sdk-go/releases) from [`v1.34.20`](https://github.com/aws/aws-sdk-go/releases/tag/v1.34.20) to [`v1.34.22`](https://github.com/aws/aws-sdk-go/releases/tag/v1.34.22).

### Go

- Compile with [*Go 1.15.2*](https://golang.org/doc/devel/release.html#go1.15).



<hr>




## [v1.5.1](https://github.com/aws/aws-k8s-tester/releases/tag/v1.5.1) (2020-09-10)

See [code changes](https://github.com/aws/aws-k8s-tester/compare/v1.5.0...v1.5.1).
Expand All @@ -13,7 +36,7 @@ See [code changes](https://github.com/aws/aws-k8s-tester/compare/v1.5.0...v1.5.1

### Dependency

- Upgrade [`github.com/aws/aws-sdk-go`](https://github.com/aws/aws-sdk-go/releases) from [`v1.34.20`](https://github.com/aws/aws-sdk-go/releases/tag/v1.34.20) to [`v1.34.20`](https://github.com/aws/aws-sdk-go/releases/tag/v1.34.20).
- Upgrade [`github.com/aws/aws-sdk-go`](https://github.com/aws/aws-sdk-go/releases) from [`v1.34.18`](https://github.com/aws/aws-sdk-go/releases/tag/v1.34.18) to [`v1.34.20`](https://github.com/aws/aws-sdk-go/releases/tag/v1.34.20).

### Go

Expand Down
22 changes: 15 additions & 7 deletions eks/mng/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,28 @@ func (ts *tester) createASGs() (err error) {

tg := templateMNG{}
if cur.ReleaseVersion != "" {
ts.cfg.Logger.Info("adding release version parameter",
zap.String("mng-name", mngName),
zap.String("release-version", cur.ReleaseVersion),
)
tg.ParameterReleaseVersion = parametersReleaseVersion
tg.PropertyReleaseVersion = propertyReleaseVersion
stackInput.Parameters = append(stackInput.Parameters, &cloudformation.Parameter{
ParameterKey: aws.String("ReleaseVersion"),
ParameterValue: aws.String(cur.ReleaseVersion),
})
}
if cur.ASGDesiredCapacity > 0 {
ts.cfg.Logger.Info("adding desired capacity parameter",
zap.String("mng-name", mngName),
zap.Int("desired-capacity", cur.ASGDesiredCapacity),
)
tg.ASGDesiredCapacity = int64(cur.ASGDesiredCapacity)
stackInput.Parameters = append(stackInput.Parameters, &cloudformation.Parameter{
ParameterKey: aws.String("ASGDesiredCapacity"),
ParameterValue: aws.String(fmt.Sprintf("%d", cur.ASGDesiredCapacity)),
})
}
tpl := template.Must(template.New("TemplateMNG").Parse(TemplateMNG))
buf := bytes.NewBuffer(nil)
if err := tpl.Execute(buf, tg); err != nil {
Expand Down Expand Up @@ -339,13 +354,6 @@ func (ts *tester) createASGs() (err error) {
ParameterValue: aws.String(fmt.Sprintf("%d", cur.ASGMaxSize)),
})
}
if cur.ASGDesiredCapacity > 0 {
tg.ASGDesiredCapacity = int64(cur.ASGDesiredCapacity)
stackInput.Parameters = append(stackInput.Parameters, &cloudformation.Parameter{
ParameterKey: aws.String("ASGDesiredCapacity"),
ParameterValue: aws.String(fmt.Sprintf("%d", cur.ASGDesiredCapacity)),
})
}
if len(cur.InstanceTypes) > 0 {
stackInput.Parameters = append(stackInput.Parameters, &cloudformation.Parameter{
ParameterKey: aws.String("InstanceTypes"),
Expand Down
2 changes: 1 addition & 1 deletion eksconfig/add-on-cluster-loader-local.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func getDefaultAddOnClusterLoaderLocal() *AddOnClusterLoaderLocal {
Enable: false,

ClusterLoaderPath: "/tmp/clusterloader2",
ClusterLoaderDownloadURL: "https://github.com/aws/aws-k8s-tester/releases/download/v1.5.1/clusterloader2-linux-amd64",
ClusterLoaderDownloadURL: "https://github.com/aws/aws-k8s-tester/releases/download/v1.5.2/clusterloader2-linux-amd64",

Runs: 2,
Timeout: 30 * time.Minute,
Expand Down
2 changes: 1 addition & 1 deletion eksconfig/add-on-cluster-loader-remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func getDefaultAddOnClusterLoaderRemote() *AddOnClusterLoaderRemote {
Enable: false,

ClusterLoaderPath: "/tmp/clusterloader2",
ClusterLoaderDownloadURL: "https://github.com/aws/aws-k8s-tester/releases/download/v1.5.1/clusterloader2-linux-amd64",
ClusterLoaderDownloadURL: "https://github.com/aws/aws-k8s-tester/releases/download/v1.5.2/clusterloader2-linux-amd64",

Runs: 2,
Timeout: 30 * time.Minute,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ replace (
)

require (
github.com/aws/aws-sdk-go v1.34.20
github.com/aws/aws-sdk-go v1.34.22
github.com/briandowns/spinner v1.11.1
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575
github.com/davecgh/go-spew v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:
github.com/aws/aws-sdk-go v1.6.10/go.mod h1:ZRmQr0FajVIyZ4ZzBYKG5P3ZqPz9IHG41ZoMu1ADI3k=
github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.34.20 h1:D9otznteZZyN5pRyFETqveYia/85Xzk7+RaPGB1I9fE=
github.com/aws/aws-sdk-go v1.34.20/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/aws/aws-sdk-go v1.34.22 h1:7V2sKilVVgHqdjbW+O/xaVWYfnmuLwZdF/+6JuUh6Cw=
github.com/aws/aws-sdk-go v1.34.22/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/bazelbuild/bazel-gazelle v0.18.2/go.mod h1:D0ehMSbS+vesFsLGiD6JXu3mVEzOlfUl8wNnq+x/9p0=
github.com/bazelbuild/bazel-gazelle v0.19.1-0.20191105222053-70208cbdc798/go.mod h1:rPwzNHUqEzngx1iVBfO/2X2npKaT3tqPqqHW6rVsn/A=
github.com/bazelbuild/buildtools v0.0.0-20190731111112-f720930ceb60/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
Expand Down
41 changes: 41 additions & 0 deletions vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/aws/aws-sdk-go/aws/version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading