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
@@ -115,6 +115,8 @@ type ProxyRunOptions struct {
115
115
LeaseLabelstring
116
116
// Needs kubernetes client
117
117
NeedsKubernetesClientbool
118
+
// Graceful shutdown timeout duration
119
+
GracefulShutdownTimeout time.Duration
118
120
}
119
121
120
122
func (o*ProxyRunOptions) Flags() *pflag.FlagSet {
@@ -155,6 +157,7 @@ func (o *ProxyRunOptions) Flags() *pflag.FlagSet {
155
157
flags.BoolVar(&o.EnableLeaseController, "enable-lease-controller", o.EnableLeaseController, "Enable lease controller to publish and garbage collect proxy server leases.")
156
158
flags.StringVar(&o.LeaseNamespace, "lease-namespace", o.LeaseNamespace, "The namespace where lease objects are managed by the controller.")
157
159
flags.StringVar(&o.LeaseLabel, "lease-label", o.LeaseLabel, "The labels on which the lease objects are managed.")
160
+
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.")
158
161
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.")
159
162
flags.MarkDeprecated("warn-on-channel-limit", "This behavior is now thread safe and always on. This flag will be removed in a future release.")
160
163
@@ -198,6 +201,7 @@ func (o *ProxyRunOptions) Print() {
198
201
klog.V(1).Infof("LeaseLabel set to %s.\n", o.LeaseLabel)
199
202
klog.V(1).Infof("CipherSuites set to %q.\n", o.CipherSuites)
200
203
klog.V(1).Infof("XfrChannelSize set to %d.\n", o.XfrChannelSize)
204
+
klog.V(1).Infof("GracefulShutdownTimeout set to %v.\n", o.GracefulShutdownTimeout)
0 commit comments