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

*: update vendor, ignore some errors in eks delete #191

Merged
merged 11 commits into from
Dec 7, 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
22 changes: 22 additions & 0 deletions CHANGELOG/CHANGELOG-1.5.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@



<hr>

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

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

### `eksconfig`

- Expose [configuration of sonobuoy worker/systemd-logs container](https://github.com/aws/aws-k8s-tester/pull/190).
- Warn [file open errors in configuration validator, rather than error out](https://github.com/aws/aws-k8s-tester/pull/191).

### Dependency

- Upgrade [`github.com/aws/aws-sdk-go`](https://github.com/aws/aws-sdk-go/releases) from [`v1.35.27`](https://github.com/aws/aws-sdk-go/releases/tag/v1.35.27) to [`v1.35.30`](https://github.com/aws/aws-sdk-go/releases/tag/v1.35.30).
- `v1.36.2` breaks darwin builds.
### Go

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



<hr>


Expand Down
48 changes: 32 additions & 16 deletions eks/alb-2048/alb-2048.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ func (ts *tester) Create() error {
return err
}

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) Delete() error {
Expand Down Expand Up @@ -242,7 +243,8 @@ func (ts *tester) Delete() error {
}

ts.cfg.EKSConfig.AddOnALB2048.Created = false
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand Down Expand Up @@ -276,7 +278,8 @@ func (ts *tester) createALBServiceAccount() error {
}

ts.cfg.Logger.Info("created ALB Ingress Controller ServiceAccount")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -303,7 +306,8 @@ func (ts *tester) deleteALBServiceAccount() error {
}
ts.cfg.Logger.Info("deleted ALB Ingress Controller ServiceAccount", zap.Error(err))

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand Down Expand Up @@ -379,7 +383,8 @@ func (ts *tester) createALBRBACClusterRole() error {
}

ts.cfg.Logger.Info("created ALB Ingress Controller RBAC ClusterRole")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -406,7 +411,8 @@ func (ts *tester) deleteALBRBACClusterRole() error {
}

ts.cfg.Logger.Info("deleted ALB Ingress Controller RBAC ClusterRole", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand Down Expand Up @@ -453,7 +459,8 @@ func (ts *tester) createALBRBACClusterRoleBinding() error {
}

ts.cfg.Logger.Info("created ALB Ingress Controller RBAC ClusterRoleBinding")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -480,7 +487,8 @@ func (ts *tester) deleteALBRBACClusterRoleBinding() error {
}

ts.cfg.Logger.Info("deleted ALB Ingress Controller RBAC ClusterRoleBinding", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand Down Expand Up @@ -564,7 +572,8 @@ func (ts *tester) createALBDeployment() error {
}

ts.cfg.Logger.Info("created ALB Ingress Controller Deployment")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -591,7 +600,8 @@ func (ts *tester) deleteALBDeployment() error {
}

ts.cfg.Logger.Info("deleted ALB Ingress Controller Deployment", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) waitDeploymentALB() (err error) {
Expand Down Expand Up @@ -698,7 +708,8 @@ func (ts *tester) create2048Deployment() error {
}
ts.cfg.Logger.Info("created ALB 2048 Deployment")

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -725,7 +736,8 @@ func (ts *tester) delete2048Deployment() error {
}

ts.cfg.Logger.Info("deleted ALB 2048 Deployment", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) waitDeployment2048() (err error) {
Expand Down Expand Up @@ -807,7 +819,8 @@ func (ts *tester) create2048Service() error {
}

ts.cfg.Logger.Info("created ALB 2048 Service")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -834,7 +847,8 @@ func (ts *tester) delete2048Service() error {
}

ts.cfg.Logger.Info("deleted ALB 2048 Service", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand Down Expand Up @@ -1056,7 +1070,8 @@ func (ts *tester) create2048Ingress() error {
if !htmlChecked {
return fmt.Errorf("ALB 2048 %q did not return expected HTML output", ts.cfg.EKSConfig.AddOnALB2048.URL)
}
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html
Expand All @@ -1083,5 +1098,6 @@ func (ts *tester) delete2048Ingress() error {
}
ts.cfg.Logger.Info("deleted ALB 2048 Ingress", zap.Error(err))

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}
12 changes: 8 additions & 4 deletions eks/app-mesh/app-mesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ func (ts *tester) Create() error {
if err := ts.createInjector(); err != nil {
return err
}
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) Delete() error {
Expand Down Expand Up @@ -167,7 +168,8 @@ func (ts *tester) Delete() error {
}

ts.cfg.EKSConfig.AddOnAppMesh.Created = false
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

const templatePolicy = `
Expand Down Expand Up @@ -307,7 +309,8 @@ func (ts *tester) createPolicy() error {
zap.String("policy-name", policyName),
)

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) deletePolicy() error {
Expand Down Expand Up @@ -355,7 +358,8 @@ func (ts *tester) deletePolicy() error {
)
ts.cfg.EKSConfig.AddOnAppMesh.PolicyCFNStackID = ""

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

const (
Expand Down
6 changes: 4 additions & 2 deletions eks/cluster-loader/local/cluster-loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ func (ts *tester) Create() (err error) {
return err
}

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) Delete() (err error) {
Expand Down Expand Up @@ -159,7 +160,8 @@ func (ts *tester) Delete() (err error) {
}

ts.cfg.EKSConfig.AddOnClusterLoaderLocal.Created = false
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

/*
Expand Down
33 changes: 22 additions & 11 deletions eks/cluster-loader/remote/cluster-loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ func (ts *tester) Create() (err error) {
return err
}

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) Delete() (err error) {
Expand Down Expand Up @@ -205,7 +206,8 @@ func (ts *tester) Delete() (err error) {
}

ts.cfg.EKSConfig.AddOnClusterLoaderRemote.Created = false
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

const (
Expand Down Expand Up @@ -250,7 +252,8 @@ func (ts *tester) createServiceAccount() error {
}

ts.cfg.Logger.Info("created cluster loader ServiceAccount")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// ref. https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
Expand All @@ -277,7 +280,8 @@ func (ts *tester) deleteServiceAccount() error {
}
ts.cfg.Logger.Info("deleted cluster loader ServiceAccount", zap.Error(err))

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// need RBAC, otherwise
Expand Down Expand Up @@ -327,7 +331,8 @@ func (ts *tester) createRBACClusterRole() error {
}

ts.cfg.Logger.Info("created cluster loader RBAC ClusterRole")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// ref. https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
Expand All @@ -354,7 +359,8 @@ func (ts *tester) deleteRBACClusterRole() error {
}

ts.cfg.Logger.Info("deleted cluster loader RBAC ClusterRole", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// ref. https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
Expand Down Expand Up @@ -406,7 +412,8 @@ func (ts *tester) createRBACClusterRoleBinding() error {
}

ts.cfg.Logger.Info("created cluster loader RBAC ClusterRoleBinding")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// ref. https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
Expand All @@ -433,7 +440,8 @@ func (ts *tester) deleteRBACClusterRoleBinding() error {
}

ts.cfg.Logger.Info("deleted cluster loader RBAC ClusterRoleBinding", zap.Error(err))
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) createConfigMap() error {
Expand Down Expand Up @@ -473,7 +481,8 @@ func (ts *tester) createConfigMap() error {
}

ts.cfg.Logger.Info("created configmap")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) deleteConfigMap() error {
Expand All @@ -497,7 +506,8 @@ func (ts *tester) deleteConfigMap() error {
return err
}
ts.cfg.Logger.Info("deleted configmap")
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) createJob() (err error) {
Expand Down Expand Up @@ -709,7 +719,8 @@ func (ts *tester) checkResults() (err error) {
if err != nil {
return fmt.Errorf("failed to read PodStartupLatency %q (%v)", "", err)
}
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

/*
Expand Down
12 changes: 8 additions & 4 deletions eks/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func (ts *tester) Create() (err error) {
return err
}

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) Client() k8s_client.EKS { return ts.k8sClient }
Expand Down Expand Up @@ -214,7 +215,8 @@ func (ts *tester) Delete() error {
return errors.New(strings.Join(errs, ", "))
}

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// MAKE SURE TO SYNC THE DEFAULT VALUES in "eksconfig"
Expand Down Expand Up @@ -553,7 +555,8 @@ func (ts *tester) createEKS() (err error) {
return err
}

return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

// deleteEKS returns error if EKS cluster delete fails.
Expand Down Expand Up @@ -657,7 +660,8 @@ func (ts *tester) deleteEKS() error {
zap.String("cluster-cfn-stack-id", ts.cfg.EKSConfig.Status.ClusterCFNStackID),
zap.String("cluster-name", ts.cfg.EKSConfig.Name),
)
return ts.cfg.EKSConfig.Sync()
ts.cfg.EKSConfig.Sync()
return nil
}

func (ts *tester) describeCluster() {
Expand Down
Loading