Skip to content

Commit 053215c

Browse files
authored
[NET-9839] fix: add shared version submodule (#4091)
* fix: add shared version submodule Introduce a new submodule for sharing versioning code across the binary-producing submodules in `consul-k8s` repo. This is both an improvement in terms of consolidation, as well as a fix for incorrect `control-plane` submodule pinning in the `control-plane/cni` submodule that led to incorrect dev versions being used in 1.4.2 and 1.4.3 (the first releases that included a valid version of `control-plane/cni`. See #4054 comments for more context. * build: fix non-dev prepare script chart version setting
1 parent e3328f6 commit 053215c

File tree

33 files changed

+60
-151
lines changed

33 files changed

+60
-151
lines changed

Diff for: .changelog/4091.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
cni: fix incorrect release version due to unstable submodule pinning
3+
```

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
141141
export GIT_COMMIT=$(git rev-parse --short HEAD)
142142
export GIT_DIRTY=$(test -n "$(git status --porcelain)" && echo "+CHANGES")
143-
export GIT_IMPORT=github.com/hashicorp/consul-k8s/${{ matrix.component }}/version
143+
export GIT_IMPORT=github.com/hashicorp/consul-k8s/version
144144
export GOLDFLAGS="-X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X ${GIT_IMPORT}.GitDescribe=${{ needs.get-product-version.outputs.product-version }}"
145145
146146
${{ matrix.env }} go build -o dist/${{ matrix.bin_name }} -ldflags "${GOLDFLAGS}" -tags=${{ matrix.gotags }} .

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = $(shell ./control-plane/build-support/scripts/version.sh control-plane/version/version.go)
1+
VERSION = $(shell ./control-plane/build-support/scripts/version.sh version/version.go)
22
GOLANG_VERSION?=$(shell head -n 1 .go-version)
33
CONSUL_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-version.sh charts/consul/values.yaml)
44
CONSUL_ENTERPRISE_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-enterprise-version.sh charts/consul/values.yaml)

Diff for: acceptance/go.mod

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.21.1
55
toolchain go1.22.0
66

77
require (
8+
github.com/go-logr/logr v1.2.4
89
github.com/google/uuid v1.3.0
910
github.com/gruntwork-io/terratest v0.46.7
1011
github.com/hashicorp/consul-k8s/control-plane v0.0.0-20240226161840-f3842c41cb2b
@@ -48,9 +49,7 @@ require (
4849
github.com/ghodss/yaml v1.0.0 // indirect
4950
github.com/go-errors/errors v1.4.2 // indirect
5051
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
51-
github.com/go-logr/logr v1.2.4 // indirect
5252
github.com/go-logr/stdr v1.2.2 // indirect
53-
github.com/go-logr/zapr v1.2.4 // indirect
5453
github.com/go-openapi/analysis v0.21.4 // indirect
5554
github.com/go-openapi/errors v0.20.3 // indirect
5655
github.com/go-openapi/jsonpointer v0.19.6 // indirect
@@ -122,8 +121,6 @@ require (
122121
go.opentelemetry.io/otel/metric v1.19.0 // indirect
123122
go.opentelemetry.io/otel/sdk v1.19.0 // indirect
124123
go.opentelemetry.io/otel/trace v1.19.0 // indirect
125-
go.uber.org/multierr v1.11.0 // indirect
126-
go.uber.org/zap v1.25.0 // indirect
127124
golang.org/x/crypto v0.22.0 // indirect
128125
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
129126
golang.org/x/mod v0.14.0 // indirect

Diff for: acceptance/go.sum

-12
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl
2020
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
2121
github.com/aws/aws-sdk-go v1.44.262 h1:gyXpcJptWoNkK+DiAiaBltlreoWKQXjAIh6FRh60F+I=
2222
github.com/aws/aws-sdk-go v1.44.262/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
23-
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
24-
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
25-
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
2623
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
2724
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
2825
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -464,14 +461,8 @@ go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1
464461
go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo=
465462
go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I=
466463
go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM=
467-
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
468-
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
469-
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
470-
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
471-
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
472464
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
473465
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
474-
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
475466
go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c=
476467
go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk=
477468
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -488,7 +479,6 @@ golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
488479
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
489480
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
490481
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
491-
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
492482
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
493483
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
494484
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
@@ -591,7 +581,6 @@ golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
591581
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
592582
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
593583
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
594-
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
595584
golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
596585
golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
597586
golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
@@ -600,7 +589,6 @@ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtn
600589
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
601590
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
602591
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
603-
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
604592
golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
605593
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
606594
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=

Diff for: cli/commands.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
cmdversion "github.com/hashicorp/consul-k8s/cli/cmd/version"
2424
"github.com/hashicorp/consul-k8s/cli/common"
2525
"github.com/hashicorp/consul-k8s/cli/common/terminal"
26-
"github.com/hashicorp/consul-k8s/cli/version"
26+
"github.com/hashicorp/consul-k8s/version"
2727
"github.com/hashicorp/go-hclog"
2828
"github.com/mitchellh/cli"
2929
)

Diff for: cli/go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ go 1.21
44

55
toolchain go1.21.4
66

7+
replace github.com/hashicorp/consul-k8s/version => ../version
8+
79
require (
810
github.com/bgentry/speakeasy v0.1.0
911
github.com/cenkalti/backoff v2.2.1+incompatible
1012
github.com/fatih/color v1.16.0
1113
github.com/google/go-cmp v0.6.0
1214
github.com/hashicorp/consul-k8s/charts v0.0.0-00010101000000-000000000000
15+
github.com/hashicorp/consul-k8s/version v0.0.0
1316
github.com/hashicorp/consul/troubleshoot v0.6.1
1417
github.com/hashicorp/go-hclog v1.5.0
1518
github.com/hashicorp/hcp-sdk-go v0.62.1-0.20230913154003-cf69c0370c54

Diff for: cli/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"os/signal"
1010
"syscall"
1111

12-
"github.com/hashicorp/consul-k8s/cli/version"
12+
"github.com/hashicorp/consul-k8s/version"
1313
"github.com/hashicorp/go-hclog"
1414
"github.com/mitchellh/cli"
1515
)

Diff for: control-plane/api-gateway/binding/validation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/hashicorp/consul-k8s/control-plane/api-gateway/common"
2424
"github.com/hashicorp/consul-k8s/control-plane/api/v1alpha1"
25-
"github.com/hashicorp/consul-k8s/control-plane/version"
25+
"github.com/hashicorp/consul-k8s/version"
2626
)
2727

2828
var (

Diff for: control-plane/api-gateway/common/secrets.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/miekg/dns"
1414
corev1 "k8s.io/api/core/v1"
1515

16-
"github.com/hashicorp/consul-k8s/control-plane/version"
16+
"github.com/hashicorp/consul-k8s/version"
1717
)
1818

1919
var (

Diff for: control-plane/build-support/functions/10-util.sh

+22-7
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,13 @@ function update_version_helm {
621621
local version="$2"
622622
local prerelease="$3"
623623
local full_version="$2"
624+
local full_version_k8s_for_chart_version="$2"
624625
local full_consul_version="$5"
625626
local full_consul_dataplane_version="$7"
626627
local consul_dataplane_base_path="$8"
627628
if ! test -z "$3" && test "$3" != "dev"; then
628629
full_version="$2-$3"
630+
full_version_k8s_for_chart_version="$2-$3"
629631
full_consul_version="$5-$3"
630632
full_consul_dataplane_version="$7-$3"
631633
elif test "$3" == "dev"; then
@@ -637,6 +639,24 @@ function update_version_helm {
637639
full_consul_dataplane_version="${7%.*}-$3"
638640
fi
639641

642+
# validate script versions
643+
if test -z "$full_version"; then
644+
err "ERROR: full_version is empty"
645+
return 1
646+
fi
647+
if test -z "$full_version_k8s_for_chart_version"; then
648+
err "ERROR: full_version_k8s_for_chart_version is empty"
649+
return 1
650+
fi
651+
if test -z "$full_consul_version"; then
652+
err "ERROR: full_consul_version is empty"
653+
return 1
654+
fi
655+
if test -z "$full_consul_dataplane_version"; then
656+
err "ERROR: full_consul_dataplane_version is empty"
657+
return 1
658+
fi
659+
640660
sed_i ${SED_EXT} -e "s/(imageK8S:.*\/consul-k8s-control-plane:)[^\"]*/imageK8S: $4${full_version}/g" "${vfile}"
641661
sed_i ${SED_EXT} -e "s/(version:[[:space:]]*)[^\"]*/\1${full_version_k8s_for_chart_version}/g" "${cfile}"
642662
sed_i ${SED_EXT} -e "s/(appVersion:[[:space:]]*)[^\"]*/\1${full_consul_version}/g" "${cfile}"
@@ -690,13 +710,8 @@ function set_version {
690710
local consul_vers="$6"
691711
local consul_dataplane_vers="$8"
692712

693-
status_stage "==> Updating control-plane version/version.go with version info: ${vers} "$4""
694-
if ! update_version "${sdir}/control-plane/version/version.go" "${vers}" "$4"; then
695-
return 1
696-
fi
697-
698-
status_stage "==> Updating cli version/version.go with version info: ${vers} "$4""
699-
if ! update_version "${sdir}/cli/version/version.go" "${vers}" "$4"; then
713+
status_stage "==> Updating version/version.go with version info: ${vers} "$4""
714+
if ! update_version "${sdir}/version/version.go" "${vers}" "$4"; then
700715
return 1
701716
fi
702717

Diff for: control-plane/cni/go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
module github.com/hashicorp/consul-k8s/control-plane/cni
22

3+
replace github.com/hashicorp/consul-k8s/version => ../../version
4+
35
require (
46
github.com/containernetworking/cni v1.1.2
57
github.com/containernetworking/plugins v1.2.0
6-
github.com/hashicorp/consul-k8s/control-plane v0.0.0-20240326170414-f12a82a84667
8+
github.com/hashicorp/consul-k8s/version v0.0.0
79
github.com/hashicorp/consul/sdk v0.16.1
810
github.com/hashicorp/go-hclog v1.5.0
911
github.com/stretchr/testify v1.8.4

Diff for: control-plane/cni/go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe
5959
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
6060
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
6161
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
62-
github.com/hashicorp/consul-k8s/control-plane v0.0.0-20240326170414-f12a82a84667 h1:5pYrzowjHkDl81CdYWZm78LTf0pujXqVWPUXic37DrA=
63-
github.com/hashicorp/consul-k8s/control-plane v0.0.0-20240326170414-f12a82a84667/go.mod h1:7V8Rj0bFQ6l33EdNT6fys6Ga/3np0vMV/S/zv5rPuRs=
6462
github.com/hashicorp/consul/sdk v0.16.1 h1:V8TxTnImoPD5cj0U9Spl0TUxcytjcbbJeADFF07KdHg=
6563
github.com/hashicorp/consul/sdk v0.16.1/go.mod h1:fSXvwxB2hmh1FMZCNl6PwX0Q/1wdWtHJcZ7Ea5tns0s=
6664
github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c=

Diff for: control-plane/cni/main.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"github.com/containernetworking/cni/pkg/skel"
1414
"github.com/containernetworking/cni/pkg/types"
1515
current "github.com/containernetworking/cni/pkg/types/100"
16-
"github.com/containernetworking/cni/pkg/version"
17-
cpv "github.com/hashicorp/consul-k8s/control-plane/version"
16+
cniv "github.com/containernetworking/cni/pkg/version"
17+
"github.com/hashicorp/consul-k8s/version"
1818
"github.com/hashicorp/consul/sdk/iptables"
1919
"github.com/hashicorp/go-hclog"
2020
corev1 "k8s.io/api/core/v1"
@@ -114,7 +114,7 @@ func parseConfig(stdin []byte) (*PluginConf, error) {
114114

115115
// The previous result is passed from the previously run plugin to our plugin. We do not
116116
// do anything with the result but instead just pass it on when our plugin is finished.
117-
if err := version.ParsePrevResult(&cfg.NetConf); err != nil {
117+
if err := cniv.ParsePrevResult(&cfg.NetConf); err != nil {
118118
return nil, fmt.Errorf("could not parse prevResult: %w", err)
119119
}
120120

@@ -264,8 +264,8 @@ func cmdCheck(_ *skel.CmdArgs) error {
264264

265265
func main() {
266266
c := &Command{}
267-
bv.BuildVersion = cpv.GetHumanVersion()
268-
skel.PluginMain(c.cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("consul-cni"))
267+
bv.BuildVersion = version.GetHumanVersion()
268+
skel.PluginMain(c.cmdAdd, cmdCheck, cmdDel, cniv.All, bv.BuildString("consul-cni"))
269269
}
270270

271271
// createK8sClient configures the command's Kubernetes API client if it doesn't

Diff for: control-plane/commands.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
cmdTLSInit "github.com/hashicorp/consul-k8s/control-plane/subcommand/tls-init"
2828
cmdVersion "github.com/hashicorp/consul-k8s/control-plane/subcommand/version"
2929
webhookCertManager "github.com/hashicorp/consul-k8s/control-plane/subcommand/webhook-cert-manager"
30-
"github.com/hashicorp/consul-k8s/control-plane/version"
30+
"github.com/hashicorp/consul-k8s/version"
3131
)
3232

3333
// Commands is the mapping of all available consul-k8s commands.

Diff for: control-plane/connect-inject/webhook/mesh_webhook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/hashicorp/consul-k8s/control-plane/connect-inject/metrics"
3232
"github.com/hashicorp/consul-k8s/control-plane/consul"
3333
"github.com/hashicorp/consul-k8s/control-plane/namespaces"
34-
"github.com/hashicorp/consul-k8s/control-plane/version"
34+
"github.com/hashicorp/consul-k8s/version"
3535
)
3636

3737
const (

Diff for: control-plane/connect-inject/webhook/mesh_webhook_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/hashicorp/consul-k8s/control-plane/connect-inject/metrics"
3131
"github.com/hashicorp/consul-k8s/control-plane/consul"
3232
"github.com/hashicorp/consul-k8s/control-plane/namespaces"
33-
"github.com/hashicorp/consul-k8s/control-plane/version"
33+
"github.com/hashicorp/consul-k8s/version"
3434
)
3535

3636
func TestHandlerHandle(t *testing.T) {

Diff for: control-plane/connect-inject/webhookv2/mesh_webhook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/hashicorp/consul-k8s/control-plane/connect-inject/metrics"
3232
"github.com/hashicorp/consul-k8s/control-plane/consul"
3333
"github.com/hashicorp/consul-k8s/control-plane/namespaces"
34-
"github.com/hashicorp/consul-k8s/control-plane/version"
34+
"github.com/hashicorp/consul-k8s/version"
3535
)
3636

3737
const (

Diff for: control-plane/connect-inject/webhookv2/mesh_webhook_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/hashicorp/consul-k8s/control-plane/connect-inject/metrics"
3131
"github.com/hashicorp/consul-k8s/control-plane/consul"
3232
"github.com/hashicorp/consul-k8s/control-plane/namespaces"
33-
"github.com/hashicorp/consul-k8s/control-plane/version"
33+
"github.com/hashicorp/consul-k8s/version"
3434
)
3535

3636
func TestHandlerHandle(t *testing.T) {

Diff for: control-plane/consul/consul.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/hashicorp/consul-server-connection-manager/discovery"
1212
capi "github.com/hashicorp/consul/api"
1313

14-
"github.com/hashicorp/consul-k8s/control-plane/version"
14+
"github.com/hashicorp/consul-k8s/version"
1515
)
1616

1717
//go:generate mockery --name ServerConnectionManager --inpkg

Diff for: control-plane/consul/consul_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"net/http/httptest"
1010
"testing"
1111

12-
"github.com/hashicorp/consul-k8s/control-plane/version"
12+
"github.com/hashicorp/consul-k8s/version"
1313
capi "github.com/hashicorp/consul/api"
1414
"github.com/stretchr/testify/require"
1515
)

Diff for: control-plane/go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module github.com/hashicorp/consul-k8s/control-plane
22

3+
replace github.com/hashicorp/consul-k8s/version => ../version
4+
35
require (
46
github.com/cenkalti/backoff v2.2.1+incompatible
57
github.com/containernetworking/cni v1.1.2
@@ -11,6 +13,7 @@ require (
1113
github.com/google/go-cmp v0.5.9
1214
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
1315
github.com/hashicorp/consul-k8s/control-plane/cni v0.0.0-20240226161840-f3842c41cb2b
16+
github.com/hashicorp/consul-k8s/version v0.0.0
1417
github.com/hashicorp/consul-server-connection-manager v0.1.6
1518
github.com/hashicorp/consul/api v1.29.1
1619
github.com/hashicorp/consul/proto-public v0.6.1

Diff for: control-plane/helper/go-discover/discover.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"strings"
99

10-
"github.com/hashicorp/consul-k8s/control-plane/version"
10+
"github.com/hashicorp/consul-k8s/version"
1111
"github.com/hashicorp/go-discover"
1212
discoverk8s "github.com/hashicorp/go-discover/provider/k8s"
1313
"github.com/hashicorp/go-hclog"

Diff for: control-plane/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/mitchellh/cli"
1111

12-
"github.com/hashicorp/consul-k8s/control-plane/version"
12+
"github.com/hashicorp/consul-k8s/version"
1313
)
1414

1515
func main() {

Diff for: control-plane/subcommand/connect-init/command.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/hashicorp/consul-k8s/control-plane/namespaces"
3030
"github.com/hashicorp/consul-k8s/control-plane/subcommand/common"
3131
"github.com/hashicorp/consul-k8s/control-plane/subcommand/flags"
32-
"github.com/hashicorp/consul-k8s/control-plane/version"
32+
"github.com/hashicorp/consul-k8s/version"
3333
)
3434

3535
const (

Diff for: control-plane/subcommand/mesh-init/command.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
"github.com/hashicorp/consul-k8s/control-plane/consul"
2929
"github.com/hashicorp/consul-k8s/control-plane/subcommand/common"
3030
"github.com/hashicorp/consul-k8s/control-plane/subcommand/flags"
31-
"github.com/hashicorp/consul-k8s/control-plane/version"
31+
"github.com/hashicorp/consul-k8s/version"
3232
)
3333

3434
const (

0 commit comments

Comments
 (0)