Skip to content

Commit 82c65ca

Browse files
cloudformation: vendor-in github.com/mweagle/go-cloudformation (#751)
CloudFormation library https://github.com/mweagle/go-cloudformation was last updated in October 2021 and recommends to use https://github.com/awslabs/goformation which is archived since October 2024. This change vendors in this dependency to enable addition of new missing CloudFormation features (allowed by BSD-2-Clause LICENSE). * clone github.com/mweagle/go-cloudformation into aws/cloudformation * remove unused aws/cloudformation/deploycfn * replace imports * fix linter warnings * reformat * exclude from coverage * move to internal package * disable test that generates schema Updates #459 --------- Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
1 parent c8befeb commit 82c65ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+95429
-13
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
1414
- run: make test
1515
- run: make lint
16-
- run: grep -Ev "zalando-incubator/kube-ingress-aws-controller/(certs|aws)/fake/" profile.cov > tmp.profile.cov
17-
- run: mv tmp.profile.cov profile.cov
1816
- run: goveralls -coverprofile=profile.cov -service=github
1917
env:
2018
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ clean:
2121
## test: runs go test
2222
test:
2323
go test -v -race -coverprofile=profile.cov -cover $(GOPKGS)
24+
grep -Ev 'github.com/zalando-incubator/kube-ingress-aws-controller/(certs/fake|aws/fake|internal/aws/cloudformation)/' profile.cov > profile.cov.tmp
25+
mv profile.cov.tmp profile.cov
2426

2527
## lint: runs golangci-lint
2628
lint:

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ This information is used to manage AWS resources for each ingress objects of the
4040

4141
## Upgrade
4242

43+
### <v0.18.0 to >=v0.18.0
44+
45+
Version `v0.18.0` vendors-in https://github.com/mweagle/go-cloudformation library to enable addition of missing CloudFormation features.
46+
It was last updated in October 2021 and recommends to use https://github.com/awslabs/goformation which is archived since October 2024.
47+
4348
### <v0.17.0 to >=v0.17.0
4449

4550
Version `v0.17.0` uses the controller context in the AWS Adapter API's, so as to pass context to the AWS SDK Go v2.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.17
1+
v0.18

aws/cf_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"crypto/sha256"
99
"sort"
1010

11-
cloudformation "github.com/mweagle/go-cloudformation"
11+
cloudformation "github.com/zalando-incubator/kube-ingress-aws-controller/internal/aws/cloudformation"
1212
)
1313

1414
const (

aws/cf_template_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"testing"
88
"time"
99

10-
cloudformation "github.com/mweagle/go-cloudformation"
1110
"github.com/stretchr/testify/assert"
1211
"github.com/stretchr/testify/require"
12+
cloudformation "github.com/zalando-incubator/kube-ingress-aws-controller/internal/aws/cloudformation"
1313
)
1414

1515
func TestGenerateTemplate(t *testing.T) {

aws/cloudwatch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"encoding/json"
77

88
"github.com/ghodss/yaml"
9-
cloudformation "github.com/mweagle/go-cloudformation"
109
log "github.com/sirupsen/logrus"
10+
cloudformation "github.com/zalando-incubator/kube-ingress-aws-controller/internal/aws/cloudformation"
1111
)
1212

1313
// CloudWatchAlarmList represents a list of CloudWatch Alarms directly usable

aws/cloudwatch_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package aws
33
import (
44
"testing"
55

6-
cloudformation "github.com/mweagle/go-cloudformation"
76
"github.com/stretchr/testify/assert"
7+
cloudformation "github.com/zalando-incubator/kube-ingress-aws-controller/internal/aws/cloudformation"
88
)
99

1010
func TestCloudWatchAlarmList_Hash(t *testing.T) {

go.mod

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,21 @@ require (
1212
github.com/google/go-cmp v0.7.0
1313
github.com/google/uuid v1.6.0
1414
github.com/linki/instrumented_http v0.3.0
15-
github.com/mweagle/go-cloudformation v0.0.0-20211009163201-0a35d7d0fa70
1615
github.com/prometheus/client_golang v1.22.0
1716
github.com/sirupsen/logrus v1.9.3
1817
github.com/stretchr/testify v1.10.0
1918
github.com/zalando/skipper v0.22.29
19+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
2020
k8s.io/api v0.31.1
2121
k8s.io/apimachinery v0.31.1
2222
k8s.io/client-go v0.31.1
2323
)
2424

25-
require github.com/rogpeppe/go-internal v1.13.1 // indirect
25+
require (
26+
github.com/kr/pretty v0.3.1 // indirect
27+
github.com/kr/text v0.2.0 // indirect
28+
github.com/rogpeppe/go-internal v1.13.1 // indirect
29+
)
2630

2731
require (
2832
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
@@ -94,7 +98,7 @@ require (
9498
google.golang.org/protobuf v1.36.6 // indirect
9599
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
96100
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
97-
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
101+
gopkg.in/go-playground/validator.v9 v9.31.0
98102
gopkg.in/inf.v0 v0.9.1 // indirect
99103
gopkg.in/yaml.v2 v2.4.0 // indirect
100104
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ github.com/coreos/go-oidc/v3 v3.14.1 h1:9ePWwfdwC4QKRlCXsJGou56adA/owXczOzwKdOum
8080
github.com/coreos/go-oidc/v3 v3.14.1/go.mod h1:HaZ3szPaZ0e4r6ebqvsLWlk2Tn+aejfmrfah6hnSYEU=
8181
github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA=
8282
github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc=
83+
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
8384
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
8485
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
8586
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
@@ -160,8 +161,11 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
160161
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
161162
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
162163
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
164+
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
163165
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
164166
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
167+
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
168+
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
165169
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
166170
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
167171
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
@@ -203,8 +207,6 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
203207
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
204208
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
205209
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
206-
github.com/mweagle/go-cloudformation v0.0.0-20211009163201-0a35d7d0fa70 h1:0MSGYc3ux4W7Y3svc15Z3sup/h7tvhbrwtHexN8/uYE=
207-
github.com/mweagle/go-cloudformation v0.0.0-20211009163201-0a35d7d0fa70/go.mod h1:ZkuUgvDIuRW0sYTRfCz7VmL3IodhIufcb8HNdI6b6AI=
208210
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
209211
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
210212
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
@@ -220,6 +222,7 @@ github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9Os
220222
github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc=
221223
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
222224
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
225+
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
223226
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
224227
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
225228
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -239,6 +242,7 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X
239242
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
240243
github.com/redis/go-redis/v9 v9.8.0 h1:q3nRvjrlge/6UD7eTu/DSg2uYiU2mCL0G/uzBWqhicI=
241244
github.com/redis/go-redis/v9 v9.8.0/go.mod h1:huWgSWd8mW6+m0VPhJjSSQ+d6Nh1VICQ6Q5lHuCH/Iw=
245+
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
242246
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
243247
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
244248
github.com/shirou/gopsutil/v4 v4.25.1 h1:QSWkTc+fu9LTAWfkZwZ6j8MSUk4A2LV7rbH0ZqmLjXs=

0 commit comments

Comments
 (0)