Skip to content

Commit de82584

Browse files
committed
Bump kine and set NotifyInterval to what the apiserver expects
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
1 parent 0ac4c6a commit de82584

5 files changed

Lines changed: 51 additions & 44 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ require (
121121
github.com/ipfs/go-log/v2 v2.5.1
122122
github.com/json-iterator/go v1.1.12
123123
github.com/k3s-io/helm-controller v0.15.8
124-
github.com/k3s-io/kine v0.11.0
124+
github.com/k3s-io/kine v0.11.4
125125
github.com/klauspost/compress v1.17.2
126126
github.com/kubernetes-sigs/cri-tools v0.0.0-00010101000000-000000000000
127127
github.com/lib/pq v1.10.2
128128
github.com/libp2p/go-libp2p v0.30.0
129-
github.com/mattn/go-sqlite3 v1.14.17
129+
github.com/mattn/go-sqlite3 v1.14.19
130130
github.com/minio/minio-go/v7 v7.0.33
131131
github.com/mwitkow/go-http-dialer v0.0.0-20161116154839-378f744fb2b8
132132
github.com/natefinch/lumberjack v2.0.0+incompatible

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,8 @@ github.com/k3s-io/etcd/server/v3 v3.5.9-k3s1 h1:B3039IkTPnwQEt4tIMjC6yd6b1Q3Z9ZZ
976976
github.com/k3s-io/etcd/server/v3 v3.5.9-k3s1/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g=
977977
github.com/k3s-io/helm-controller v0.15.8 h1:CAMEPmiqf4ugUCpZdICGINthCn+hkG/l1fadn8aVjfQ=
978978
github.com/k3s-io/helm-controller v0.15.8/go.mod h1:AYitg40howLjKloL/zdjDDOPL1jg/K5R4af0tQcyPR8=
979-
github.com/k3s-io/kine v0.11.0 h1:7tS0H9yBDxXiy1BgEEkBWLswwG/q4sARPTHdxOMz1qw=
980-
github.com/k3s-io/kine v0.11.0/go.mod h1:tjSsWrCetgaGMTfnJW6vzqdT/qOPhF/+nUEaE+eixBA=
979+
github.com/k3s-io/kine v0.11.4 h1:ZIXQT4vPPKNL9DwLF4dQ11tWtpJ1C/7OKNIpFmTkImo=
980+
github.com/k3s-io/kine v0.11.4/go.mod h1:NmwOWsWgB3aScq5+LEYytAaceqkG7lmCLLjjrWug8v4=
981981
github.com/k3s-io/klog/v2 v2.100.1-k3s1 h1:xb/Ta8dpQuIZueQEw2YTZUYrKoILdBmPiITVkNmYPa0=
982982
github.com/k3s-io/klog/v2 v2.100.1-k3s1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
983983
github.com/k3s-io/kube-router/v2 v2.0.1 h1:UCsdkQjSfOkVakixilRDDkG9yq775GBSKxBfsyUj8ng=
@@ -1155,8 +1155,8 @@ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
11551155
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
11561156
github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
11571157
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
1158-
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
1159-
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
1158+
github.com/mattn/go-sqlite3 v1.14.19 h1:fhGleo2h1p8tVChob4I9HpmVFIAkKGpiukdrgQbWfGI=
1159+
github.com/mattn/go-sqlite3 v1.14.19/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
11601160
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
11611161
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
11621162
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=

pkg/cli/server/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func run(app *cli.Context, cfg *cmds.Server, leaderControllers server.CustomCont
149149
serverConfig.ControlConfig.ExtraEtcdArgs = cfg.ExtraEtcdArgs
150150
serverConfig.ControlConfig.ExtraSchedulerAPIArgs = cfg.ExtraSchedulerArgs
151151
serverConfig.ControlConfig.ClusterDomain = cfg.ClusterDomain
152+
serverConfig.ControlConfig.Datastore.NotifyInterval = 5 * time.Second
152153
serverConfig.ControlConfig.Datastore.Endpoint = cfg.DatastoreEndpoint
153154
serverConfig.ControlConfig.Datastore.BackendTLSConfig.CAFile = cfg.DatastoreCAFile
154155
serverConfig.ControlConfig.Datastore.BackendTLSConfig.CertFile = cfg.DatastoreCertFile

pkg/daemons/executor/executor.go

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,25 @@ type Executor interface {
3636
}
3737

3838
type ETCDConfig struct {
39-
InitialOptions `json:",inline"`
40-
Name string `json:"name,omitempty"`
41-
ListenClientURLs string `json:"listen-client-urls,omitempty"`
42-
ListenClientHTTPURLs string `json:"listen-client-http-urls,omitempty"`
43-
ListenMetricsURLs string `json:"listen-metrics-urls,omitempty"`
44-
ListenPeerURLs string `json:"listen-peer-urls,omitempty"`
45-
AdvertiseClientURLs string `json:"advertise-client-urls,omitempty"`
46-
DataDir string `json:"data-dir,omitempty"`
47-
SnapshotCount int `json:"snapshot-count,omitempty"`
48-
ServerTrust ServerTrust `json:"client-transport-security"`
49-
PeerTrust PeerTrust `json:"peer-transport-security"`
50-
ForceNewCluster bool `json:"force-new-cluster,omitempty"`
51-
HeartbeatInterval int `json:"heartbeat-interval"`
52-
ElectionTimeout int `json:"election-timeout"`
53-
Logger string `json:"logger"`
54-
LogOutputs []string `json:"log-outputs"`
55-
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
39+
InitialOptions `json:",inline"`
40+
Name string `json:"name,omitempty"`
41+
ListenClientURLs string `json:"listen-client-urls,omitempty"`
42+
ListenClientHTTPURLs string `json:"listen-client-http-urls,omitempty"`
43+
ListenMetricsURLs string `json:"listen-metrics-urls,omitempty"`
44+
ListenPeerURLs string `json:"listen-peer-urls,omitempty"`
45+
AdvertiseClientURLs string `json:"advertise-client-urls,omitempty"`
46+
DataDir string `json:"data-dir,omitempty"`
47+
SnapshotCount int `json:"snapshot-count,omitempty"`
48+
ServerTrust ServerTrust `json:"client-transport-security"`
49+
PeerTrust PeerTrust `json:"peer-transport-security"`
50+
ForceNewCluster bool `json:"force-new-cluster,omitempty"`
51+
HeartbeatInterval int `json:"heartbeat-interval"`
52+
ElectionTimeout int `json:"election-timeout"`
53+
Logger string `json:"logger"`
54+
LogOutputs []string `json:"log-outputs"`
55+
56+
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
57+
ExperimentalWatchProgressNotifyInterval time.Duration `json:"experimental-watch-progress-notify-interval"`
5658
}
5759

5860
type ServerTrust struct {

pkg/etcd/etcd.go

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -908,13 +908,15 @@ func (e *ETCD) cluster(ctx context.Context, reset bool, options executor.Initial
908908
ClientCertAuth: true,
909909
TrustedCAFile: e.config.Runtime.ETCDPeerCA,
910910
},
911-
SnapshotCount: 10000,
912-
ElectionTimeout: 5000,
913-
HeartbeatInterval: 500,
914-
Logger: "zap",
915-
LogOutputs: []string{"stderr"},
916-
ExperimentalInitialCorruptCheck: true,
917-
ListenClientHTTPURLs: e.listenClientHTTPURLs(),
911+
SnapshotCount: 10000,
912+
ElectionTimeout: 5000,
913+
HeartbeatInterval: 500,
914+
Logger: "zap",
915+
LogOutputs: []string{"stderr"},
916+
ListenClientHTTPURLs: e.listenClientHTTPURLs(),
917+
918+
ExperimentalInitialCorruptCheck: true,
919+
ExperimentalWatchProgressNotifyInterval: e.config.Datastore.NotifyInterval,
918920
}, e.config.ExtraEtcdArgs)
919921
}
920922

@@ -967,20 +969,22 @@ func (e *ETCD) StartEmbeddedTemporary(ctx context.Context) error {
967969
embedded := executor.Embedded{}
968970
ctx, e.cancel = context.WithCancel(ctx)
969971
return embedded.ETCD(ctx, executor.ETCDConfig{
970-
InitialOptions: executor.InitialOptions{AdvertisePeerURL: peerURL},
971-
DataDir: tmpDataDir,
972-
ForceNewCluster: true,
973-
AdvertiseClientURLs: clientURL,
974-
ListenClientURLs: clientURL,
975-
ListenClientHTTPURLs: clientHTTPURL,
976-
ListenPeerURLs: peerURL,
977-
Logger: "zap",
978-
HeartbeatInterval: 500,
979-
ElectionTimeout: 5000,
980-
SnapshotCount: 10000,
981-
Name: e.name,
982-
LogOutputs: []string{"stderr"},
983-
ExperimentalInitialCorruptCheck: true,
972+
InitialOptions: executor.InitialOptions{AdvertisePeerURL: peerURL},
973+
DataDir: tmpDataDir,
974+
ForceNewCluster: true,
975+
AdvertiseClientURLs: clientURL,
976+
ListenClientURLs: clientURL,
977+
ListenClientHTTPURLs: clientHTTPURL,
978+
ListenPeerURLs: peerURL,
979+
Logger: "zap",
980+
HeartbeatInterval: 500,
981+
ElectionTimeout: 5000,
982+
SnapshotCount: 10000,
983+
Name: e.name,
984+
LogOutputs: []string{"stderr"},
985+
986+
ExperimentalInitialCorruptCheck: true,
987+
ExperimentalWatchProgressNotifyInterval: e.config.Datastore.NotifyInterval,
984988
}, append(e.config.ExtraEtcdArgs, "--max-snapshots=0", "--max-wals=0"))
985989
}
986990

0 commit comments

Comments
 (0)