make pod termination grace period configurable
This commit is contained in:
parent
c557027e12
commit
71dfb33b2b
|
|
@ -31,3 +31,4 @@ data:
|
||||||
enable_load_balancer: "true"
|
enable_load_balancer: "true"
|
||||||
api_port: "8080"
|
api_port: "8080"
|
||||||
ring_log_lines: "100"
|
ring_log_lines: "100"
|
||||||
|
pod_terminate_grace_period: 5m
|
||||||
|
|
|
||||||
|
|
@ -303,7 +303,7 @@ func (c *Cluster) generatePodTemplate(resourceRequirements *v1.ResourceRequireme
|
||||||
Privileged: &privilegedMode,
|
Privileged: &privilegedMode,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
terminateGracePeriodSeconds := int64(30)
|
terminateGracePeriodSeconds := int64(c.OpConfig.PodTerminateGracePeriod.Seconds())
|
||||||
|
|
||||||
podSpec := v1.PodSpec{
|
podSpec := v1.PodSpec{
|
||||||
ServiceAccountName: c.OpConfig.ServiceAccountName,
|
ServiceAccountName: c.OpConfig.ServiceAccountName,
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ type Config struct {
|
||||||
Workers uint32 `name:"workers" default:"4"`
|
Workers uint32 `name:"workers" default:"4"`
|
||||||
APIPort int `name:"api_port" default:"8080"`
|
APIPort int `name:"api_port" default:"8080"`
|
||||||
RingLogLines int `name:"ring_log_lines" default:"100"`
|
RingLogLines int `name:"ring_log_lines" default:"100"`
|
||||||
|
|
||||||
|
PodTerminateGracePeriod time.Duration `name:"pod_terminate_grace_period" default:"5m"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// MustMarshal marshals the config or panics
|
// MustMarshal marshals the config or panics
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue