Skip to content

Commit

Permalink
version: bump k8s-dqlite and microcluster versions
Browse files Browse the repository at this point in the history
* k8s-dqlite v1.4.1 -> v1.5.0
* microcluster v2 -> v3
* dqlite v1.17.1 -> 4c49d229ffffa6589469a0a7117860bd6df355e7
  • Loading branch information
petrutlucian94 committed Feb 21, 2025
1 parent cee9ed6 commit 8df48d2
Show file tree
Hide file tree
Showing 62 changed files with 108 additions and 74 deletions.
2 changes: 1 addition & 1 deletion build-scripts/components/k8s-dqlite/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.4.1
v1.5.0
4 changes: 2 additions & 2 deletions src/k8s/cmd/k8sd/k8sd_cluster_recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/shared"
"github.com/canonical/lxd/shared/termios"
"github.com/canonical/microcluster/v2/cluster"
"github.com/canonical/microcluster/v2/microcluster"
"github.com/canonical/microcluster/v3/cluster"
"github.com/canonical/microcluster/v3/microcluster"
"github.com/spf13/cobra"
"golang.org/x/sys/unix"
"gopkg.in/yaml.v2"
Expand Down
14 changes: 9 additions & 5 deletions src/k8s/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ require (
dario.cat/mergo v1.0.0
github.com/canonical/go-dqlite/v2 v2.0.0
github.com/canonical/k8s-snap-api v1.0.18
github.com/canonical/lxd v0.0.0-20250113143058-52441d41dab7
github.com/canonical/lxd v0.0.0-20250114180824-cc21f909e416
github.com/canonical/microcluster/v2 v2.1.1-0.20250127104725-631889214b18
github.com/go-logr/logr v1.4.2
github.com/mitchellh/mapstructure v1.5.0
github.com/moby/sys/mountinfo v0.7.1
github.com/onsi/gomega v1.36.2
github.com/pelletier/go-toml v1.9.5
github.com/spf13/cobra v1.8.1
github.com/spf13/cobra v1.9.1
golang.org/x/mod v0.22.0
golang.org/x/net v0.34.0
golang.org/x/sync v0.10.0
golang.org/x/sys v0.29.0
golang.org/x/sys v0.30.0
gopkg.in/yaml.v2 v2.4.0
helm.sh/helm/v3 v3.15.3
k8s.io/api v0.31.3
Expand All @@ -31,7 +31,11 @@ require (
sigs.k8s.io/controller-runtime v0.19.3
)

require go.opentelemetry.io/auto/sdk v1.1.0 // indirect
require (
github.com/canonical/go-dqlite/v3 v3.0.0 // indirect
github.com/canonical/microcluster/v3 v3.0.0-20250217121741-142098b8e5b1 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
)

require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
Expand Down Expand Up @@ -144,7 +148,7 @@ require (
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
Expand Down
12 changes: 12 additions & 0 deletions src/k8s/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXe
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/canonical/go-dqlite/v2 v2.0.0 h1:RNFcFVhHMh70muKKErbW35rSzqmAFswheHdAgxW0Ddw=
github.com/canonical/go-dqlite/v2 v2.0.0/go.mod h1:IaIC8u4Z1UmPjuAqPzA2r83YMaMHRLoKZdHKI5uHCJI=
github.com/canonical/go-dqlite/v3 v3.0.0 h1:Uf5TrpOb9YEXzN8AiOmf+TCPYCFVU3W4I2MpOks5iis=
github.com/canonical/go-dqlite/v3 v3.0.0/go.mod h1:Kb/9JVog9XeIlnlnSyO1JgMoE4PoKXZCB8fJNcvvHAc=
github.com/canonical/k8s-snap-api v1.0.18 h1:wjwv+F0nPJF3GPGo86SuIXXIJ0fnyRdOjSNiZwi72iY=
github.com/canonical/k8s-snap-api v1.0.18/go.mod h1:kdXBgGo5TF93NJYHfa1bfKIzEIgE1oQriFHcVoVQUX8=
github.com/canonical/lxd v0.0.0-20250113143058-52441d41dab7 h1:lZCOt9/1KowNdnWXjfA1/51Uj7+R0fKtByos9EVrYn4=
github.com/canonical/lxd v0.0.0-20250113143058-52441d41dab7/go.mod h1:4Ssm3YxIz8wyazciTLDR9V0aR2GPlGIHb+S0182T5pA=
github.com/canonical/lxd v0.0.0-20250114180824-cc21f909e416 h1:rQ0m+q0YMK1ewwe0VUB5o+P1nWNUuLiRxsxwY2xiJ7E=
github.com/canonical/lxd v0.0.0-20250114180824-cc21f909e416/go.mod h1:WAKM27rZ9MAASNFrsml6XU8O81zB53jEioUTTLFvbHw=
github.com/canonical/microcluster/v2 v2.1.1-0.20250127104725-631889214b18 h1:h5VJaUnE4gAKPolBTJ11HMRTEN5JyA+oR4gHkoK//6o=
github.com/canonical/microcluster/v2 v2.1.1-0.20250127104725-631889214b18/go.mod h1:DWYya9ecaO3StX9VuKmL9NoGvT7ol3VuMg0Mjyy19fQ=
github.com/canonical/microcluster/v3 v3.0.0-20250217121741-142098b8e5b1 h1:s9MtAuUECxuIpyGo+nkkzxOjqcf/1Y+7V8cKLDkNnQ4=
github.com/canonical/microcluster/v3 v3.0.0-20250217121741-142098b8e5b1/go.mod h1:JQB4PPbmNSism9gKpHd3cqoupXGkSoQNQ3RDOsdVFIU=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk=
Expand Down Expand Up @@ -396,8 +402,12 @@ github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
Expand Down Expand Up @@ -522,6 +532,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
Expand Down
10 changes: 9 additions & 1 deletion src/k8s/hack/dynamic-dqlite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,15 @@ if [ ! -f "${BUILD_DIR}/dqlite/libdqlite.la" ]; then
(
cd "${BUILD_DIR}"
rm -rf dqlite
git clone "${REPO_DQLITE}" --depth 1 --branch "${TAG_DQLITE}" > /dev/null
if [[ -n ${COMMIT_DQLITE} ]]; then
# --branch doesn't accept a commit, we need to do a separate checkout.
git clone "${REPO_DQLITE}" > /dev/null
cd dqlite
git checkout ${COMMIT_DQLITE}
else
git clone "${REPO_DQLITE}" --depth 1 --branch "${TAG_DQLITE}" > /dev/null
cd dqlite
fi
cd dqlite
autoreconf -i > /dev/null
./configure --enable-build-raft \
Expand Down
5 changes: 4 additions & 1 deletion src/k8s/hack/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ TAG_LIBNSL="v2.0.1"
TAG_LIBUV="v1.48.0"
TAG_LIBLZ4="v1.9.4"
TAG_SQLITE="version-3.45.1"
TAG_DQLITE="v1.17.1"
# TODO: update the Dqlite tag once we get a new release after v1.18.0 and
# drop "COMMIT_DQLITE".
# TAG_DQLITE="v1.18.0"
COMMIT_DQLITE="4c49d229ffffa6589469a0a7117860bd6df355e7"
11 changes: 9 additions & 2 deletions src/k8s/hack/static-dqlite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,15 @@ if [ ! -f "${BUILD_DIR}/dqlite/libdqlite.la" ]; then
(
cd "${BUILD_DIR}"
rm -rf dqlite
git clone "${REPO_DQLITE}" --depth 1 --branch "${TAG_DQLITE}" > /dev/null
cd dqlite
if [[ -n ${COMMIT_DQLITE} ]]; then
# --branch doesn't accept a commit, we need to do a separate checkout.
git clone "${REPO_DQLITE}" > /dev/null
cd dqlite
git checkout ${COMMIT_DQLITE}
else
git clone "${REPO_DQLITE}" --depth 1 --branch "${TAG_DQLITE}" > /dev/null
cd dqlite
fi
autoreconf -i > /dev/null
./configure --disable-shared --enable-build-raft \
CFLAGS="${CFLAGS} -g -I${BUILD_DIR}/sqlite -I${BUILD_DIR}/libuv/include -I${BUILD_DIR}/lz4/lib -I${INSTALL_DIR}/musl/include -Werror=implicit-function-declaration" \
Expand Down
4 changes: 2 additions & 2 deletions src/k8s/pkg/client/k8sd/k8sd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package k8sd
import (
"fmt"

"github.com/canonical/microcluster/v2/client"
"github.com/canonical/microcluster/v2/microcluster"
"github.com/canonical/microcluster/v3/client"
"github.com/canonical/microcluster/v3/microcluster"
)

// k8sd implements Client.
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/client/k8sd/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/canonical/k8s/pkg/log"
"github.com/canonical/k8s/pkg/utils/control"
"github.com/canonical/lxd/shared/api"
"github.com/canonical/microcluster/v2/rest/types"
"github.com/canonical/microcluster/v3/rest/types"
)

// query is a helper method for sending requests to the k8sd client with common error checking and automatic retries.
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/capi_access_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/canonical/k8s/pkg/k8sd/database"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func ValidateCAPIAuthTokenAccessHandler(tokenHeaderName string) func(s state.State, r *http.Request) (bool, response.Response) {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/capi_access_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/api"
"github.com/canonical/k8s/pkg/k8sd/database"
testenv "github.com/canonical/k8s/pkg/utils/microcluster"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/capi_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
apiv1 "github.com/canonical/k8s-snap-api/api/v1"
"github.com/canonical/k8s/pkg/k8sd/database"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postSetClusterAPIAuthToken(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/capi_certificate_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
apiv1 "github.com/canonical/k8s-snap-api/api/v1"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
"golang.org/x/sync/errgroup"
certv1 "k8s.io/api/certificates/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/capi_certificates_expiry.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
databaseutil "github.com/canonical/k8s/pkg/k8sd/database/util"
pkiutil "github.com/canonical/k8s/pkg/utils/pki"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postCertificatesExpiry(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/certificates_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/canonical/k8s/pkg/utils"
pkiutil "github.com/canonical/k8s/pkg/utils/pki"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
"golang.org/x/sync/errgroup"
certv1 "k8s.io/api/certificates/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/features"
"github.com/canonical/k8s/pkg/k8sd/types"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) getClusterStatus(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/cluster_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
apiv1 "github.com/canonical/k8s-snap-api/api/v1"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postClusterBootstrap(_ state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/types"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) putClusterConfig(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/cluster_join.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/types"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
"gopkg.in/yaml.v2"
)

Expand Down
4 changes: 2 additions & 2 deletions src/k8s/pkg/k8sd/api/cluster_remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/canonical/k8s/pkg/utils/control"
nodeutil "github.com/canonical/k8s/pkg/utils/node"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/cluster"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/cluster"
"github.com/canonical/microcluster/v3/state"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
4 changes: 2 additions & 2 deletions src/k8s/pkg/k8sd/api/cluster_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/canonical/k8s/pkg/log"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/microcluster"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/microcluster"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postClusterJoinTokens(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

apiv1 "github.com/canonical/k8s-snap-api/api/v1"
"github.com/canonical/microcluster/v2/rest"
"github.com/canonical/microcluster/v3/rest"
)

type Endpoints struct {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/impl/k8sd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/canonical/k8s/pkg/snap"
snaputil "github.com/canonical/k8s/pkg/snap/util"
nodeutil "github.com/canonical/k8s/pkg/utils/node"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

// GetClusterMembers retrieves information about the members of the cluster.
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/setup"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) getKubeconfig(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/kubernetes_auth_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
databaseutil "github.com/canonical/k8s/pkg/k8sd/database/util"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postKubernetesAuthTokens(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
apiv1 "github.com/canonical/k8s-snap-api/api/v1"
"github.com/canonical/k8s/pkg/k8sd/api/impl"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) getNodeStatus(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/node_access_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) ValidateNodeTokenAccessHandler(tokenHeaderName string) func(s state.State, r *http.Request) (bool, response.Response) {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package api

import (
"github.com/canonical/k8s/pkg/snap"
"github.com/canonical/microcluster/v2/microcluster"
"github.com/canonical/microcluster/v3/microcluster"
)

// Provider is an interface for state that the API endpoints need access to.
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/snap_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/types"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postSnapRefresh(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/snap_refresh_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
apiv1 "github.com/canonical/k8s-snap-api/api/v1"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postSnapRefreshStatus(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/canonical/k8s/pkg/k8sd/pki"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) postWorkerInfo(s state.State, r *http.Request) response.Response {
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/api/worker_access_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
snaputil "github.com/canonical/k8s/pkg/snap/util"
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/lxd/lxd/response"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

func (e *Endpoints) restrictWorkers(s state.State, r *http.Request) (bool, response.Response) {
Expand Down
6 changes: 3 additions & 3 deletions src/k8s/pkg/k8sd/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"github.com/canonical/k8s/pkg/log"
"github.com/canonical/k8s/pkg/snap"
"github.com/canonical/k8s/pkg/utils/control"
"github.com/canonical/microcluster/v2/client"
"github.com/canonical/microcluster/v2/microcluster"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/client"
"github.com/canonical/microcluster/v3/microcluster"
"github.com/canonical/microcluster/v3/state"
)

// Config defines configuration for the k8sd app.
Expand Down
2 changes: 1 addition & 1 deletion src/k8s/pkg/k8sd/app/hooks_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/canonical/k8s/pkg/utils"
"github.com/canonical/k8s/pkg/utils/control"
"github.com/canonical/k8s/pkg/utils/experimental/snapdconfig"
"github.com/canonical/microcluster/v2/state"
"github.com/canonical/microcluster/v3/state"
)

// onBootstrap is called after we bootstrap the first cluster node.
Expand Down
Loading

0 comments on commit 8df48d2

Please sign in to comment.