mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: update K8s packages to v0.32.1
Update K8s packages in go.mod to v0.32.1 Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
3
vendor/k8s.io/kubernetes/test/utils/density_utils.go
generated
vendored
3
vendor/k8s.io/kubernetes/test/utils/density_utils.go
generated
vendored
@ -18,6 +18,7 @@ package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
@ -99,7 +100,7 @@ func VerifyLabelsRemoved(c clientset.Interface, nodeName string, labelKeys []str
|
||||
}
|
||||
for _, labelKey := range labelKeys {
|
||||
if node.Labels != nil && len(node.Labels[labelKey]) != 0 {
|
||||
return fmt.Errorf("Failed removing label " + labelKey + " of the node " + nodeName)
|
||||
return errors.New("Failed removing label " + labelKey + " of the node " + nodeName)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
3
vendor/k8s.io/kubernetes/test/utils/deployment.go
generated
vendored
3
vendor/k8s.io/kubernetes/test/utils/deployment.go
generated
vendored
@ -18,6 +18,7 @@ package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@ -226,7 +227,7 @@ func WaitForDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName
|
||||
})
|
||||
if wait.Interrupted(err) {
|
||||
LogReplicaSetsOfDeployment(deployment, nil, newRS, logf)
|
||||
err = fmt.Errorf(reason)
|
||||
err = errors.New(reason)
|
||||
}
|
||||
if newRS == nil {
|
||||
return fmt.Errorf("deployment %q failed to create new replica set", deploymentName)
|
||||
|
14
vendor/k8s.io/kubernetes/test/utils/image/manifest.go
generated
vendored
14
vendor/k8s.io/kubernetes/test/utils/image/manifest.go
generated
vendored
@ -28,7 +28,7 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
yaml "sigs.k8s.io/yaml/goyaml.v2"
|
||||
)
|
||||
|
||||
// RegistryList holds public and private image registries
|
||||
@ -163,10 +163,6 @@ const (
|
||||
AuthenticatedWindowsNanoServer
|
||||
// BusyBox image
|
||||
BusyBox
|
||||
// CudaVectorAdd image
|
||||
CudaVectorAdd
|
||||
// CudaVectorAdd2 image
|
||||
CudaVectorAdd2
|
||||
// DistrolessIptables Image
|
||||
DistrolessIptables
|
||||
// Etcd image
|
||||
@ -220,17 +216,15 @@ const (
|
||||
|
||||
func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config) {
|
||||
configs := map[ImageID]Config{}
|
||||
configs[Agnhost] = Config{list.PromoterE2eRegistry, "agnhost", "2.52"}
|
||||
configs[Agnhost] = Config{list.PromoterE2eRegistry, "agnhost", "2.53"}
|
||||
configs[AgnhostPrivate] = Config{list.PrivateRegistry, "agnhost", "2.6"}
|
||||
configs[AuthenticatedAlpine] = Config{list.GcAuthenticatedRegistry, "alpine", "3.7"}
|
||||
configs[AuthenticatedWindowsNanoServer] = Config{list.GcAuthenticatedRegistry, "windows-nanoserver", "v1"}
|
||||
configs[APIServer] = Config{list.PromoterE2eRegistry, "sample-apiserver", "1.29.2"}
|
||||
configs[AppArmorLoader] = Config{list.PromoterE2eRegistry, "apparmor-loader", "1.4"}
|
||||
configs[BusyBox] = Config{list.PromoterE2eRegistry, "busybox", "1.36.1-1"}
|
||||
configs[CudaVectorAdd] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "1.0"}
|
||||
configs[CudaVectorAdd2] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "2.3"}
|
||||
configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.5.9"}
|
||||
configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.15-0"}
|
||||
configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.6.6"}
|
||||
configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.16-0"}
|
||||
configs[Httpd] = Config{list.PromoterE2eRegistry, "httpd", "2.4.38-4"}
|
||||
configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-4"}
|
||||
configs[InvalidRegistryImage] = Config{list.InvalidRegistry, "alpine", "3.1"}
|
||||
|
2
vendor/k8s.io/kubernetes/test/utils/node.go
generated
vendored
2
vendor/k8s.io/kubernetes/test/utils/node.go
generated
vendored
@ -16,7 +16,7 @@ limitations under the License.
|
||||
|
||||
package utils
|
||||
|
||||
import "k8s.io/api/core/v1"
|
||||
import v1 "k8s.io/api/core/v1"
|
||||
|
||||
// GetNodeCondition extracts the provided condition from the given status and returns that.
|
||||
// Returns nil and -1 if the condition is not present, and the index of the located condition.
|
||||
|
10
vendor/k8s.io/kubernetes/test/utils/runners.go
generated
vendored
10
vendor/k8s.io/kubernetes/test/utils/runners.go
generated
vendored
@ -664,7 +664,7 @@ func (config *RCConfig) start(ctx context.Context) error {
|
||||
*config.CreatedPods = startupStatus.Created
|
||||
}
|
||||
if !config.Silent {
|
||||
config.RCConfigLog(startupStatus.String(config.Name))
|
||||
config.RCConfigLog("%s", startupStatus.String(config.Name))
|
||||
}
|
||||
|
||||
if config.PodStatusFile != nil {
|
||||
@ -688,8 +688,8 @@ func (config *RCConfig) start(ctx context.Context) error {
|
||||
if podDeletionsCount > config.MaxAllowedPodDeletions {
|
||||
// Number of pods which disappeared is over threshold
|
||||
err := fmt.Errorf("%d pods disappeared for %s: %v", podDeletionsCount, config.Name, strings.Join(deletedPods, ", "))
|
||||
config.RCConfigLog(err.Error())
|
||||
config.RCConfigLog(diff.String(sets.NewString()))
|
||||
config.RCConfigLog("%s", err.Error())
|
||||
config.RCConfigLog("%s", diff.String(sets.NewString()))
|
||||
return err
|
||||
}
|
||||
|
||||
@ -1194,6 +1194,10 @@ func CreatePodWithPersistentVolume(ctx context.Context, client clientset.Interfa
|
||||
// PVs are cluster-wide resources.
|
||||
// Prepend a namespace to make the name globally unique.
|
||||
pv.Name = fmt.Sprintf("%s-%s", namespace, pv.Name)
|
||||
pvs := pv.Spec.PersistentVolumeSource
|
||||
if pvs.CSI != nil {
|
||||
pvs.CSI.VolumeHandle = pv.Name
|
||||
}
|
||||
if bindVolume {
|
||||
// bind pv to "pvc-$i"
|
||||
pv.Spec.ClaimRef = &v1.ObjectReference{
|
||||
|
9
vendor/k8s.io/kubernetes/test/utils/update_resources.go
generated
vendored
9
vendor/k8s.io/kubernetes/test/utils/update_resources.go
generated
vendored
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package utils
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@ -35,9 +36,9 @@ const (
|
||||
waitRetryTimeout = 5 * time.Minute
|
||||
)
|
||||
|
||||
func RetryErrorCondition(condition wait.ConditionFunc) wait.ConditionFunc {
|
||||
return func() (bool, error) {
|
||||
done, err := condition()
|
||||
func RetryErrorCondition(condition wait.ConditionWithContextFunc) wait.ConditionWithContextFunc {
|
||||
return func(ctx context.Context) (bool, error) {
|
||||
done, err := condition(ctx)
|
||||
return done, err
|
||||
}
|
||||
}
|
||||
@ -50,7 +51,7 @@ func ScaleResourceWithRetries(scalesGetter scaleclient.ScalesGetter, namespace,
|
||||
}
|
||||
waitForReplicas := scale.NewRetryParams(waitRetryInterval, waitRetryTimeout)
|
||||
cond := RetryErrorCondition(scale.ScaleCondition(scaler, preconditions, namespace, name, size, nil, gvr, false))
|
||||
err := wait.PollImmediate(updateRetryInterval, updateRetryTimeout, cond)
|
||||
err := wait.PollUntilContextTimeout(context.Background(), updateRetryInterval, updateRetryTimeout, true, cond)
|
||||
if err == nil {
|
||||
err = scale.WaitForScaleHasDesiredReplicas(scalesGetter, gvr.GroupResource(), name, namespace, size, waitForReplicas)
|
||||
}
|
||||
|
Reference in New Issue
Block a user