mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #10152 from markturansky/pv_recycler_precision_fix
Fixed PV recycler ActiveDeadlineSeconds precision
This commit is contained in:
commit
cbf0a4f2db
@ -18,7 +18,6 @@ package host_path
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
|
||||||
@ -142,7 +141,7 @@ func (r *hostPathRecycler) GetPath() string {
|
|||||||
// Recycle blocks until the pod has completed or any error occurs.
|
// Recycle blocks until the pod has completed or any error occurs.
|
||||||
// The scrubber pod's is expected to succeed within 30 seconds when testing localhost.
|
// The scrubber pod's is expected to succeed within 30 seconds when testing localhost.
|
||||||
func (r *hostPathRecycler) Recycle() error {
|
func (r *hostPathRecycler) Recycle() error {
|
||||||
timeout := int64(30 * time.Second)
|
timeout := int64(30)
|
||||||
pod := &api.Pod{
|
pod := &api.Pod{
|
||||||
ObjectMeta: api.ObjectMeta{
|
ObjectMeta: api.ObjectMeta{
|
||||||
GenerateName: "pv-scrubber-" + util.ShortenString(r.name, 44) + "-",
|
GenerateName: "pv-scrubber-" + util.ShortenString(r.name, 44) + "-",
|
||||||
|
@ -19,7 +19,6 @@ package nfs
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
|
||||||
@ -249,7 +248,7 @@ func (r *nfsRecycler) GetPath() string {
|
|||||||
// Recycle blocks until the pod has completed or any error occurs.
|
// Recycle blocks until the pod has completed or any error occurs.
|
||||||
// The scrubber pod's is expected to succeed within 5 minutes else an error will be returned
|
// The scrubber pod's is expected to succeed within 5 minutes else an error will be returned
|
||||||
func (r *nfsRecycler) Recycle() error {
|
func (r *nfsRecycler) Recycle() error {
|
||||||
timeout := int64(300 * time.Second) // 5 minutes
|
timeout := int64(300) // 5 minutes
|
||||||
pod := &api.Pod{
|
pod := &api.Pod{
|
||||||
ObjectMeta: api.ObjectMeta{
|
ObjectMeta: api.ObjectMeta{
|
||||||
GenerateName: "pv-scrubber-" + util.ShortenString(r.name, 44) + "-",
|
GenerateName: "pv-scrubber-" + util.ShortenString(r.name, 44) + "-",
|
||||||
|
Loading…
Reference in New Issue
Block a user