Skip to content

Commit 872c9d9

Browse files
committed
Remove dqlite support
Kine has not supported dqlite since 1.19, and canonical's kubernetes-dqlite has been dead since 2021. Signed-off-by: Brad Davidson <[email protected]>
1 parent dbf4c50 commit 872c9d9

File tree

6 files changed

+1
-291
lines changed

6 files changed

+1
-291
lines changed

go.mod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ toolchain go1.22.9
66

77
require (
88
github.com/Rican7/retry v0.3.1
9-
github.com/canonical/go-dqlite v1.5.1
109
github.com/go-sql-driver/mysql v1.8.1
1110
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
1211
github.com/jackc/pgx/v5 v5.7.1
@@ -39,7 +38,6 @@ require (
3938
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
4039
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
4140
github.com/dustin/go-humanize v1.0.0 // indirect
42-
github.com/ghodss/yaml v1.0.0 // indirect
4341
github.com/go-logr/logr v1.4.2 // indirect
4442
github.com/go-logr/stdr v1.2.2 // indirect
4543
github.com/gogo/protobuf v1.3.2 // indirect
@@ -98,7 +96,6 @@ require (
9896
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
9997
google.golang.org/protobuf v1.34.2 // indirect
10098
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
101-
gopkg.in/yaml.v2 v2.4.0 // indirect
10299
k8s.io/klog/v2 v2.130.1 // indirect
103100
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
104101
sigs.k8s.io/yaml v1.4.0 // indirect

go.sum

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ github.com/Rican7/retry v0.3.1/go.mod h1:CxSDrhAyXmTMeEuRAnArMu1FHu48vtfjLREWqVl
1414
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
1515
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
1616
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
17-
github.com/canonical/go-dqlite v1.5.1 h1:1YjtIrFsC1A3XlgsX38ARAiKhvkZS63PqsEd8z3T4yU=
18-
github.com/canonical/go-dqlite v1.5.1/go.mod h1:wp00vfMvPYgNCyxcPdHB5XExmDoCGoPUGymloAQT17Y=
1917
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
2018
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
2119
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -44,7 +42,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
4442
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
4543
github.com/envoyproxy/protoc-gen-validate v1.1.0 h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM=
4644
github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4=
47-
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
4845
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
4946
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
5047
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=

pkg/drivers/dqlite/dqlite.go

Lines changed: 0 additions & 247 deletions
This file was deleted.

pkg/drivers/dqlite/no_dqlite.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

pkg/drivers/sqlite/sqlite.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"database/sql"
99
"fmt"
1010
"os"
11-
"time"
1211

1312
"github.com/k3s-io/kine/pkg/drivers"
1413
"github.com/k3s-io/kine/pkg/drivers/generic"
@@ -99,22 +98,7 @@ func NewVariant(ctx context.Context, driverName string, cfg *drivers.Config) (se
9998
return err.Error()
10099
}
101100

102-
// this is the first SQL that will be executed on a new DB conn so
103-
// loop on failure here because in the case of dqlite it could still be initializing
104-
for i := 0; i < 300; i++ {
105-
err = setup(dialect.DB)
106-
if err == nil {
107-
break
108-
}
109-
logrus.Errorf("failed to setup db: %v", err)
110-
select {
111-
case <-ctx.Done():
112-
return nil, nil, ctx.Err()
113-
case <-time.After(time.Second):
114-
}
115-
time.Sleep(time.Second)
116-
}
117-
if err != nil {
101+
if err := setup(dialect.DB); err != nil {
118102
return nil, nil, errors.Wrap(err, "setup db")
119103
}
120104

pkg/endpoint/init.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package endpoint
22

33
import (
44
// Import all the default drivers
5-
_ "github.com/k3s-io/kine/pkg/drivers/dqlite"
65
_ "github.com/k3s-io/kine/pkg/drivers/http"
76
_ "github.com/k3s-io/kine/pkg/drivers/mysql"
87
_ "github.com/k3s-io/kine/pkg/drivers/nats"

0 commit comments

Comments
 (0)