You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/server/app/options/options.go
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,8 @@ type ProxyRunOptions struct {
114
114
LeaseLabelstring
115
115
// Needs kubernetes client
116
116
NeedsKubernetesClientbool
117
+
// Graceful shutdown timeout duration
118
+
GracefulShutdownTimeout time.Duration
117
119
}
118
120
119
121
func (o*ProxyRunOptions) Flags() *pflag.FlagSet {
@@ -154,6 +156,7 @@ func (o *ProxyRunOptions) Flags() *pflag.FlagSet {
154
156
flags.BoolVar(&o.EnableLeaseController, "enable-lease-controller", o.EnableLeaseController, "Enable lease controller to publish and garbage collect proxy server leases.")
155
157
flags.StringVar(&o.LeaseNamespace, "lease-namespace", o.LeaseNamespace, "The namespace where lease objects are managed by the controller.")
156
158
flags.StringVar(&o.LeaseLabel, "lease-label", o.LeaseLabel, "The labels on which the lease objects are managed.")
159
+
flags.DurationVar(&o.GracefulShutdownTimeout, "graceful-shutdown-timeout", o.GracefulShutdownTimeout, "Timeout duration for graceful shutdown of the server. The server will wait for active connections to close before forcefully terminating.")
157
160
flags.Bool("warn-on-channel-limit", true, "This behavior is now thread safe and always on. This flag will be removed in a future release.")
158
161
flags.MarkDeprecated("warn-on-channel-limit", "This behavior is now thread safe and always on. This flag will be removed in a future release.")
159
162
@@ -197,6 +200,7 @@ func (o *ProxyRunOptions) Print() {
197
200
klog.V(1).Infof("LeaseLabel set to %s.\n", o.LeaseLabel)
198
201
klog.V(1).Infof("CipherSuites set to %q.\n", o.CipherSuites)
199
202
klog.V(1).Infof("XfrChannelSize set to %d.\n", o.XfrChannelSize)
203
+
klog.V(1).Infof("GracefulShutdownTimeout set to %v.\n", o.GracefulShutdownTimeout)
0 commit comments