mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 01:40:13 +00:00
commit
7529178924
@ -90,7 +90,7 @@ type TimerConfig struct {
|
|||||||
|
|
||||||
// DefaultTimerConfig is the default configuration of Attach/Detach controller
|
// DefaultTimerConfig is the default configuration of Attach/Detach controller
|
||||||
// timers.
|
// timers.
|
||||||
var DefaultTimerConfig TimerConfig = TimerConfig{
|
var DefaultTimerConfig = TimerConfig{
|
||||||
ReconcilerLoopPeriod: 100 * time.Millisecond,
|
ReconcilerLoopPeriod: 100 * time.Millisecond,
|
||||||
ReconcilerMaxWaitForUnmountDuration: 6 * time.Minute,
|
ReconcilerMaxWaitForUnmountDuration: 6 * time.Minute,
|
||||||
DesiredStateOfWorldPopulatorLoopSleepPeriod: 1 * time.Minute,
|
DesiredStateOfWorldPopulatorLoopSleepPeriod: 1 * time.Minute,
|
||||||
@ -900,7 +900,7 @@ func (adc *attachDetachController) addNodeToDswp(node *v1.Node, nodeName types.N
|
|||||||
keepTerminatedPodVolumes := false
|
keepTerminatedPodVolumes := false
|
||||||
|
|
||||||
if t, ok := node.Annotations[volumeutil.KeepTerminatedPodVolumesAnnotation]; ok {
|
if t, ok := node.Annotations[volumeutil.KeepTerminatedPodVolumesAnnotation]; ok {
|
||||||
keepTerminatedPodVolumes = (t == "true")
|
keepTerminatedPodVolumes = t == "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Node specifies annotation indicating it should be managed by attach
|
// Node specifies annotation indicating it should be managed by attach
|
||||||
|
@ -93,7 +93,7 @@ func TestAggregateWithNil(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSingularAggregate(t *testing.T) {
|
func TestSingularAggregate(t *testing.T) {
|
||||||
var slice []error = []error{fmt.Errorf("err")}
|
var slice = []error{fmt.Errorf("err")}
|
||||||
var agg Aggregate
|
var agg Aggregate
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ func TestSingularAggregate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPluralAggregate(t *testing.T) {
|
func TestPluralAggregate(t *testing.T) {
|
||||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("123")}
|
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("123")}
|
||||||
var agg Aggregate
|
var agg Aggregate
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ func TestPluralAggregate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDedupeAggregate(t *testing.T) {
|
func TestDedupeAggregate(t *testing.T) {
|
||||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc")}
|
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc")}
|
||||||
var agg Aggregate
|
var agg Aggregate
|
||||||
|
|
||||||
agg = NewAggregate(slice)
|
agg = NewAggregate(slice)
|
||||||
@ -165,7 +165,7 @@ func TestDedupeAggregate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDedupePluralAggregate(t *testing.T) {
|
func TestDedupePluralAggregate(t *testing.T) {
|
||||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), fmt.Errorf("123")}
|
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), fmt.Errorf("123")}
|
||||||
var agg Aggregate
|
var agg Aggregate
|
||||||
|
|
||||||
agg = NewAggregate(slice)
|
agg = NewAggregate(slice)
|
||||||
@ -181,7 +181,7 @@ func TestDedupePluralAggregate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestFlattenAndDedupeAggregate(t *testing.T) {
|
func TestFlattenAndDedupeAggregate(t *testing.T) {
|
||||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc")})}
|
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc")})}
|
||||||
var agg Aggregate
|
var agg Aggregate
|
||||||
|
|
||||||
agg = NewAggregate(slice)
|
agg = NewAggregate(slice)
|
||||||
@ -197,7 +197,7 @@ func TestFlattenAndDedupeAggregate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestFlattenAggregate(t *testing.T) {
|
func TestFlattenAggregate(t *testing.T) {
|
||||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc"), fmt.Errorf("def"), NewAggregate([]error{fmt.Errorf("def"), fmt.Errorf("ghi")})})}
|
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc"), fmt.Errorf("def"), NewAggregate([]error{fmt.Errorf("def"), fmt.Errorf("ghi")})})}
|
||||||
var agg Aggregate
|
var agg Aggregate
|
||||||
|
|
||||||
agg = NewAggregate(slice)
|
agg = NewAggregate(slice)
|
||||||
|
@ -39,7 +39,7 @@ func TestAddAnnotation(t *testing.T) {
|
|||||||
assert.Equal(t, annotations["foo.admission.k8s.io/key1"], "value1", "admission annotations should not be overwritten")
|
assert.Equal(t, annotations["foo.admission.k8s.io/key1"], "value1", "admission annotations should not be overwritten")
|
||||||
|
|
||||||
// test invalid plugin names
|
// test invalid plugin names
|
||||||
var testCases map[string]string = map[string]string{
|
var testCases = map[string]string{
|
||||||
"invalid dns subdomain": "INVALID-DNS-Subdomain/policy",
|
"invalid dns subdomain": "INVALID-DNS-Subdomain/policy",
|
||||||
"no plugin name": "policy",
|
"no plugin name": "policy",
|
||||||
"no key name": "foo.admission.k8s.io",
|
"no key name": "foo.admission.k8s.io",
|
||||||
|
@ -267,7 +267,7 @@ var _ = SIGDescribe("Addon update", func() {
|
|||||||
svcAddonEnsureExists := "addon-ensure-exists-service.yaml"
|
svcAddonEnsureExists := "addon-ensure-exists-service.yaml"
|
||||||
svcAddonEnsureExistsUpdated := "addon-ensure-exists-service-updated.yaml"
|
svcAddonEnsureExistsUpdated := "addon-ensure-exists-service-updated.yaml"
|
||||||
|
|
||||||
var remoteFiles []stringPair = []stringPair{
|
var remoteFiles = []stringPair{
|
||||||
{fmt.Sprintf(reconcileAddonController, addonNsName, serveHostnameImage), rcAddonReconcile},
|
{fmt.Sprintf(reconcileAddonController, addonNsName, serveHostnameImage), rcAddonReconcile},
|
||||||
{fmt.Sprintf(reconcileAddonControllerUpdated, addonNsName, serveHostnameImage), rcAddonReconcileUpdated},
|
{fmt.Sprintf(reconcileAddonControllerUpdated, addonNsName, serveHostnameImage), rcAddonReconcileUpdated},
|
||||||
{fmt.Sprintf(deprecatedLabelAddonService, addonNsName), svcAddonDeprecatedLabel},
|
{fmt.Sprintf(deprecatedLabelAddonService, addonNsName), svcAddonDeprecatedLabel},
|
||||||
|
@ -52,7 +52,7 @@ var _ = SIGDescribe("[Feature:Windows] Cpu Resources [Serial]", func() {
|
|||||||
ginkgo.By("Waiting 2 minutes")
|
ginkgo.By("Waiting 2 minutes")
|
||||||
time.Sleep(2 * time.Minute)
|
time.Sleep(2 * time.Minute)
|
||||||
ginkgo.By("Ensuring pods are still running")
|
ginkgo.By("Ensuring pods are still running")
|
||||||
var allPods [](*v1.Pod)
|
var allPods []*v1.Pod
|
||||||
for _, p := range podsDecimal {
|
for _, p := range podsDecimal {
|
||||||
pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(
|
pod, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(
|
||||||
ctx,
|
ctx,
|
||||||
|
Loading…
Reference in New Issue
Block a user