Skip to content

Commit

Permalink
Set default watch progress interval to 5s to ensure appropriate k8s s…
Browse files Browse the repository at this point in the history
…upport

Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
  • Loading branch information
sambhav committed Aug 21, 2024
1 parent aa1d1b8 commit 1bf11f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ func main() {
},
&cli.DurationFlag{
Name: "watch-progress-notify-interval",
Usage: "Interval between periodic watch progress notifications. Default is 10m.",
Usage: "Interval between periodic watch progress notifications. Default is 5s to ensure support for watch progress notifications.",
Destination: &config.NotifyInterval,
Value: time.Minute * 10,
Value: time.Second * 5,
},
&cli.StringFlag{
Name: "emulated-etcd-version",
Usage: "The emulated etcd version to return on a call to the status endpoint. Defaults to 3.4.31 which is the least version that support Kubernetes watch progress feature.",
Usage: "The emulated etcd version to return on a call to the status endpoint. Defaults to 3.5.13, in order to indicate support for watch progress notifications.",
Destination: &config.EmulatedETCDVersion,
Value: "3.4.31",
Value: "3.5.13",
},
&cli.BoolFlag{Name: "debug"},
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (s *KVServerBridge) Status(ctx context.Context, r *etcdserverpb.StatusReque
return &etcdserverpb.StatusResponse{
Header: &etcdserverpb.ResponseHeader{},
DbSize: size,
Version: s.EmulatedETCDVersion,
Version: s.emulatedETCDVersion,
}, nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ import (
)

type KVServerBridge struct {
emulatedETCDVersion string
limited *LimitedServer
EmulatedETCDVersion string
}

func New(backend Backend, scheme string, notifyInterval time.Duration, emulatedETCDVersion string) *KVServerBridge {
return &KVServerBridge{
emulatedETCDVersion: emulatedETCDVersion,
limited: &LimitedServer{
notifyInterval: notifyInterval,
backend: backend,
scheme: scheme,
},
EmulatedETCDVersion: emulatedETCDVersion,
}
}

Expand Down

0 comments on commit 1bf11f6

Please sign in to comment.