Skip to content

Commit

Permalink
Merge branch 'master' into ingress-upgrade-v1
Browse files Browse the repository at this point in the history
* master:
  Bump github.com/zalando/skipper from 0.17.32 to 0.18.38 (#648)
  Add test case for rolling in progress stacks
  Bump github.com/aws/aws-sdk-go from 1.47.0 to 1.49.13
  Bump github.com/google/uuid from 1.4.0 to 1.5.0 (#670)
  Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 (#669)
  Require labels (#666)
  Bump golang.org/x/crypto from 0.14.0 to 0.17.0
  • Loading branch information
katyanna committed Jan 18, 2024
2 parents f9ef26e + 2275800 commit 566e257
Show file tree
Hide file tree
Showing 7 changed files with 177 additions and 152 deletions.
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ run:
linters:
disable-all: true
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- varcheck
11 changes: 11 additions & 0 deletions .zappr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,15 @@ approvals:
from:
orgs:
- "zalando"
pull-request:
labels:
additional: true
oneOf:
- architectural
- major
- minor
- bugfix
- documentation
- dependencies

X-Zalando-Team: teapot
35 changes: 35 additions & 0 deletions aws/cf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,41 @@ func TestFindManagedStacks(t *testing.T) {
},
wantErr: false,
},
{
name: "successfull-call-with-rollback-status",
given: fake.CFOutputs{
DescribeStackPages: fake.R(nil, nil),
DescribeStacks: fake.R(&cloudformation.DescribeStacksOutput{
Stacks: []*cloudformation.Stack{
{
StackName: aws.String("managed-stack-rolling-back"),
StackStatus: aws.String(cloudformation.StackStatusRollbackInProgress),
Tags: []*cloudformation.Tag{
cfTag(kubernetesCreatorTag, DefaultControllerID),
cfTag(clusterIDTagPrefix+"test-cluster", resourceLifecycleOwned),
cfTag(certificateARNTagPrefix+"cert-arn", time.Time{}.Format(time.RFC3339)),
},
Outputs: []*cloudformation.Output{},
},
},
}, nil),
},
want: []*Stack{
{
Name: "managed-stack-rolling-back",
CertificateARNs: map[string]time.Time{
"cert-arn": {},
},
tags: map[string]string{
kubernetesCreatorTag: DefaultControllerID,
clusterIDTagPrefix + "test-cluster": resourceLifecycleOwned,
certificateARNTagPrefix + "cert-arn": time.Time{}.Format(time.RFC3339),
},
status: cloudformation.StackStatusRollbackInProgress,
HTTP2: true,
},
},
},
{
name: "no-ready-stacks",
given: fake.CFOutputs{
Expand Down
15 changes: 15 additions & 0 deletions aws/fake/cf.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type CFOutputs struct {
CreateStack *APIResponse
UpdateStack *APIResponse
DeleteStack *APIResponse
RollbackStack *APIResponse
UpdateTerminationProtection *APIResponse
}

Expand Down Expand Up @@ -122,3 +123,17 @@ func (m *CFClient) UpdateTerminationProtection(params *cloudformation.UpdateTerm
}
return out, m.Outputs.UpdateTerminationProtection.err
}

func (m *CFClient) RollbackStack(params *cloudformation.RollbackStackInput) (*cloudformation.RollbackStackOutput, error) {
out, ok := m.Outputs.RollbackStack.response.(*cloudformation.RollbackStackOutput)
if !ok {
return nil, m.Outputs.RollbackStack.err
}
return out, m.Outputs.RollbackStack.err
}

func MockRollbackStackOutput(stackId string) *cloudformation.RollbackStackOutput {
return &cloudformation.RollbackStackOutput{
StackId: aws.String(stackId),
}
}
48 changes: 21 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@ module github.com/zalando-incubator/kube-ingress-aws-controller
go 1.21

require (
github.com/aws/aws-sdk-go v1.47.0
github.com/aws/aws-sdk-go v1.49.13
github.com/ghodss/yaml v1.0.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.4.0
github.com/google/uuid v1.5.0
github.com/linki/instrumented_http v0.3.0
github.com/mweagle/go-cloudformation v0.0.0-20211009163201-0a35d7d0fa70
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_golang v1.18.0
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
github.com/zalando/skipper v0.17.32
github.com/zalando/skipper v0.18.38
gopkg.in/alecthomas/kingpin.v2 v2.2.6
k8s.io/api v0.24.17
k8s.io/apimachinery v0.24.17
k8s.io/client-go v0.24.17
)

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -33,11 +31,11 @@ require (
github.com/dgryski/go-mpchash v0.0.0-20200819201138-7382f34c4cd1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect
github.com/emicklei/go-restful v2.16.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
Expand All @@ -50,31 +48,29 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.2 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/onsi/gomega v1.20.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/redis/go-redis/v9 v9.1.0 // indirect
github.com/redis/go-redis/v9 v9.2.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
go.uber.org/atomic v1.10.0 // indirect
go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
Expand All @@ -83,12 +79,10 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/go-redis/redis/v9 => github.com/szuecs/redis/v9 v9.0.0-beta.1.0.20220801200609-6f7f800107ba
Loading

0 comments on commit 566e257

Please sign in to comment.