mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update kubernetes to v1.25.0
update kubernetes to latest v1.25.0 release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
f47839d73d
commit
e3bf375035
3
vendor/k8s.io/kubernetes/test/utils/admission_webhook.go
generated
vendored
3
vendor/k8s.io/kubernetes/test/utils/admission_webhook.go
generated
vendored
@ -86,7 +86,8 @@ func AdmissionWebhookHandler(t *testing.T, admit func(*v1beta1.AdmissionReview)
|
||||
}
|
||||
|
||||
// LocalhostCert was generated from crypto/tls/generate_cert.go with the following command:
|
||||
// go run generate_cert.go --rsa-bits 2048 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
||||
//
|
||||
// go run generate_cert.go --rsa-bits 2048 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
|
||||
var LocalhostCert = []byte(`-----BEGIN CERTIFICATE-----
|
||||
MIIDGDCCAgCgAwIBAgIQTKCKn99d5HhQVCLln2Q+eTANBgkqhkiG9w0BAQsFADAS
|
||||
MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw
|
||||
|
12
vendor/k8s.io/kubernetes/test/utils/image/csi_manifest.go
generated
vendored
12
vendor/k8s.io/kubernetes/test/utils/image/csi_manifest.go
generated
vendored
@ -24,20 +24,20 @@ import (
|
||||
"strings"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/yaml"
|
||||
"k8s.io/kubernetes/test/e2e/testing-manifests"
|
||||
e2etestingmanifests "k8s.io/kubernetes/test/e2e/testing-manifests"
|
||||
)
|
||||
|
||||
// All of the image tags are of the format k8s.gcr.io/sig-storage/hostpathplugin:v1.7.3.
|
||||
// All of the image tags are of the format registry.k8s.io/sig-storage/hostpathplugin:v1.7.3.
|
||||
var imageRE = regexp.MustCompile(`^(.*)/([^/:]*):(.*)$`)
|
||||
|
||||
// appendCSIImageConfigs extracts image repo, name and version from
|
||||
// the YAML files under test/e2e/testing-manifests/storage-csi and
|
||||
// creates new config entries for them.
|
||||
func appendCSIImageConfigs(configs map[int]Config) {
|
||||
embeddedFS := testing_manifests.GetE2ETestingManifestsFS().EmbeddedFS
|
||||
func appendCSIImageConfigs(configs map[ImageID]Config) {
|
||||
embeddedFS := e2etestingmanifests.GetE2ETestingManifestsFS().EmbeddedFS
|
||||
|
||||
// We add our images with index numbers that start after the highest existing number.
|
||||
index := 0
|
||||
// We add our images with ImageID numbers that start after the highest existing number.
|
||||
index := ImageID(0)
|
||||
for i := range configs {
|
||||
if i > index {
|
||||
index = i
|
||||
|
71
vendor/k8s.io/kubernetes/test/utils/image/manifest.go
generated
vendored
71
vendor/k8s.io/kubernetes/test/utils/image/manifest.go
generated
vendored
@ -123,16 +123,16 @@ func readFromURL(url string, writer io.Writer) error {
|
||||
var (
|
||||
initRegistry = RegistryList{
|
||||
GcAuthenticatedRegistry: "gcr.io/authenticated-image-pulling",
|
||||
PromoterE2eRegistry: "k8s.gcr.io/e2e-test-images",
|
||||
BuildImageRegistry: "k8s.gcr.io/build-image",
|
||||
PromoterE2eRegistry: "registry.k8s.io/e2e-test-images",
|
||||
BuildImageRegistry: "registry.k8s.io/build-image",
|
||||
InvalidRegistry: "invalid.registry.k8s.io/invalid",
|
||||
GcEtcdRegistry: "k8s.gcr.io",
|
||||
GcRegistry: "k8s.gcr.io",
|
||||
SigStorageRegistry: "k8s.gcr.io/sig-storage",
|
||||
GcEtcdRegistry: "registry.k8s.io",
|
||||
GcRegistry: "registry.k8s.io",
|
||||
SigStorageRegistry: "registry.k8s.io/sig-storage",
|
||||
PrivateRegistry: "gcr.io/k8s-authenticated-test",
|
||||
MicrosoftRegistry: "mcr.microsoft.com",
|
||||
DockerLibraryRegistry: "docker.io/library",
|
||||
CloudProviderGcpRegistry: "k8s.gcr.io/cloud-provider-gcp",
|
||||
CloudProviderGcpRegistry: "registry.k8s.io/cloud-provider-gcp",
|
||||
}
|
||||
|
||||
registry = initReg()
|
||||
@ -141,9 +141,11 @@ var (
|
||||
imageConfigs, originalImageConfigs = initImageConfigs(registry)
|
||||
)
|
||||
|
||||
type ImageID int
|
||||
|
||||
const (
|
||||
// None is to be used for unset/default images
|
||||
None = iota
|
||||
None ImageID = iota
|
||||
// Agnhost image
|
||||
Agnhost
|
||||
// AgnhostPrivate image
|
||||
@ -162,10 +164,8 @@ const (
|
||||
CudaVectorAdd
|
||||
// CudaVectorAdd2 image
|
||||
CudaVectorAdd2
|
||||
// DebianIptables Image
|
||||
DebianIptables
|
||||
// EchoServer image
|
||||
EchoServer
|
||||
// DistrolessIptables Image
|
||||
DistrolessIptables
|
||||
// Etcd image
|
||||
Etcd
|
||||
// GlusterDynamicProvisioner image
|
||||
@ -229,9 +229,9 @@ const (
|
||||
WindowsServer
|
||||
)
|
||||
|
||||
func initImageConfigs(list RegistryList) (map[int]Config, map[int]Config) {
|
||||
configs := map[int]Config{}
|
||||
configs[Agnhost] = Config{list.PromoterE2eRegistry, "agnhost", "2.39"}
|
||||
func initImageConfigs(list RegistryList) (map[ImageID]Config, map[ImageID]Config) {
|
||||
configs := map[ImageID]Config{}
|
||||
configs[Agnhost] = Config{list.PromoterE2eRegistry, "agnhost", "2.40"}
|
||||
configs[AgnhostPrivate] = Config{list.PrivateRegistry, "agnhost", "2.6"}
|
||||
configs[AuthenticatedAlpine] = Config{list.GcAuthenticatedRegistry, "alpine", "3.7"}
|
||||
configs[AuthenticatedWindowsNanoServer] = Config{list.GcAuthenticatedRegistry, "windows-nanoserver", "v1"}
|
||||
@ -240,9 +240,8 @@ func initImageConfigs(list RegistryList) (map[int]Config, map[int]Config) {
|
||||
configs[BusyBox] = Config{list.PromoterE2eRegistry, "busybox", "1.29-2"}
|
||||
configs[CudaVectorAdd] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "1.0"}
|
||||
configs[CudaVectorAdd2] = Config{list.PromoterE2eRegistry, "cuda-vector-add", "2.2"}
|
||||
configs[DebianIptables] = Config{list.BuildImageRegistry, "debian-iptables", "bullseye-v1.3.0"}
|
||||
configs[EchoServer] = Config{list.PromoterE2eRegistry, "echoserver", "2.4"}
|
||||
configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.3-0"}
|
||||
configs[DistrolessIptables] = Config{list.BuildImageRegistry, "distroless-iptables", "v0.1.1"}
|
||||
configs[Etcd] = Config{list.GcEtcdRegistry, "etcd", "3.5.4-0"}
|
||||
configs[GlusterDynamicProvisioner] = Config{list.PromoterE2eRegistry, "glusterdynamic-provisioner", "v1.3"}
|
||||
configs[Httpd] = Config{list.PromoterE2eRegistry, "httpd", "2.4.38-2"}
|
||||
configs[HttpdNew] = Config{list.PromoterE2eRegistry, "httpd", "2.4.39-2"}
|
||||
@ -256,11 +255,11 @@ func initImageConfigs(list RegistryList) (map[int]Config, map[int]Config) {
|
||||
configs[NginxNew] = Config{list.PromoterE2eRegistry, "nginx", "1.15-2"}
|
||||
configs[NodePerfNpbEp] = Config{list.PromoterE2eRegistry, "node-perf/npb-ep", "1.2"}
|
||||
configs[NodePerfNpbIs] = Config{list.PromoterE2eRegistry, "node-perf/npb-is", "1.2"}
|
||||
configs[NodePerfTfWideDeep] = Config{list.PromoterE2eRegistry, "node-perf/tf-wide-deep", "1.1"}
|
||||
configs[NodePerfTfWideDeep] = Config{list.PromoterE2eRegistry, "node-perf/tf-wide-deep", "1.2"}
|
||||
configs[Nonewprivs] = Config{list.PromoterE2eRegistry, "nonewprivs", "1.3"}
|
||||
configs[NonRoot] = Config{list.PromoterE2eRegistry, "nonroot", "1.2"}
|
||||
// Pause - when these values are updated, also update cmd/kubelet/app/options/container_runtime.go
|
||||
configs[Pause] = Config{list.GcRegistry, "pause", "3.7"}
|
||||
configs[Pause] = Config{list.GcRegistry, "pause", "3.8"}
|
||||
configs[Perl] = Config{list.PromoterE2eRegistry, "perl", "5.26"}
|
||||
configs[PrometheusDummyExporter] = Config{list.GcRegistry, "prometheus-dummy-exporter", "v0.1.0"}
|
||||
configs[PrometheusToSd] = Config{list.GcRegistry, "prometheus-to-sd", "v0.5.0"}
|
||||
@ -274,7 +273,7 @@ func initImageConfigs(list RegistryList) (map[int]Config, map[int]Config) {
|
||||
configs[VolumeRBDServer] = Config{list.PromoterE2eRegistry, "volume/rbd", "1.0.4"}
|
||||
configs[WindowsServer] = Config{list.MicrosoftRegistry, "windows", "1809"}
|
||||
|
||||
// This adds more config entries. Those have no pre-defined index number,
|
||||
// This adds more config entries. Those have no pre-defined ImageID number,
|
||||
// but will be used via ReplaceRegistryInImageURL when deploying
|
||||
// CSI drivers (test/e2e/storage/util/create.go).
|
||||
appendCSIImageConfigs(configs)
|
||||
@ -290,8 +289,8 @@ func initImageConfigs(list RegistryList) (map[int]Config, map[int]Config) {
|
||||
|
||||
// GetMappedImageConfigs returns the images if they were mapped to the provided
|
||||
// image repository.
|
||||
func GetMappedImageConfigs(originalImageConfigs map[int]Config, repo string) map[int]Config {
|
||||
configs := make(map[int]Config)
|
||||
func GetMappedImageConfigs(originalImageConfigs map[ImageID]Config, repo string) map[ImageID]Config {
|
||||
configs := make(map[ImageID]Config)
|
||||
for i, config := range originalImageConfigs {
|
||||
switch i {
|
||||
case InvalidRegistryImage, AuthenticatedAlpine,
|
||||
@ -303,7 +302,7 @@ func GetMappedImageConfigs(originalImageConfigs map[int]Config, repo string) map
|
||||
continue
|
||||
}
|
||||
|
||||
// Build a new tag with a the index, a hash of the image spec (to be unique) and
|
||||
// Build a new tag with the ImageID, a hash of the image spec (to be unique) and
|
||||
// shorten and make the pull spec "safe" so it will fit in the tag
|
||||
configs[i] = getRepositoryMappedConfig(i, config, repo)
|
||||
}
|
||||
@ -316,11 +315,11 @@ var (
|
||||
)
|
||||
|
||||
// getRepositoryMappedConfig maps an existing image to the provided repo, generating a
|
||||
// tag that is unique with the input config. The tag will contain the index, a hash of
|
||||
// tag that is unique with the input config. The tag will contain the imageID, a hash of
|
||||
// the image spec (to be unique) and shorten and make the pull spec "safe" so it will
|
||||
// fit in the tag to allow a human to recognize the value. If index is -1, then no
|
||||
// index will be added to the tag.
|
||||
func getRepositoryMappedConfig(index int, config Config, repo string) Config {
|
||||
// fit in the tag to allow a human to recognize the value. If imageID is None, then no
|
||||
// imageID will be added to the tag.
|
||||
func getRepositoryMappedConfig(imageID ImageID, config Config, repo string) Config {
|
||||
parts := strings.SplitN(repo, "/", 2)
|
||||
registry, name := parts[0], parts[1]
|
||||
|
||||
@ -337,10 +336,10 @@ func getRepositoryMappedConfig(index int, config Config, repo string) Config {
|
||||
shortName = shortName[len(shortName)-maxLength:]
|
||||
}
|
||||
var version string
|
||||
if index == -1 {
|
||||
if imageID == None {
|
||||
version = fmt.Sprintf("e2e-%s-%s", shortName, hash)
|
||||
} else {
|
||||
version = fmt.Sprintf("e2e-%d-%s-%s", index, shortName, hash)
|
||||
version = fmt.Sprintf("e2e-%d-%s-%s", imageID, shortName, hash)
|
||||
}
|
||||
|
||||
return Config{
|
||||
@ -351,22 +350,22 @@ func getRepositoryMappedConfig(index int, config Config, repo string) Config {
|
||||
}
|
||||
|
||||
// GetOriginalImageConfigs returns the configuration before any mapping rules.
|
||||
func GetOriginalImageConfigs() map[int]Config {
|
||||
func GetOriginalImageConfigs() map[ImageID]Config {
|
||||
return originalImageConfigs
|
||||
}
|
||||
|
||||
// GetImageConfigs returns the map of imageConfigs
|
||||
func GetImageConfigs() map[int]Config {
|
||||
func GetImageConfigs() map[ImageID]Config {
|
||||
return imageConfigs
|
||||
}
|
||||
|
||||
// GetConfig returns the Config object for an image
|
||||
func GetConfig(image int) Config {
|
||||
func GetConfig(image ImageID) Config {
|
||||
return imageConfigs[image]
|
||||
}
|
||||
|
||||
// GetE2EImage returns the fully qualified URI to an image (including version)
|
||||
func GetE2EImage(image int) string {
|
||||
func GetE2EImage(image ImageID) string {
|
||||
return fmt.Sprintf("%s/%s:%s", imageConfigs[image].registry, imageConfigs[image].name, imageConfigs[image].version)
|
||||
}
|
||||
|
||||
@ -394,10 +393,10 @@ func replaceRegistryInImageURLWithList(imageURL string, reg RegistryList) (strin
|
||||
registryAndUser := strings.Join(parts[:countParts-1], "/")
|
||||
|
||||
if repo := os.Getenv("KUBE_TEST_REPO"); len(repo) > 0 {
|
||||
index := -1
|
||||
imageID := None
|
||||
for i, v := range originalImageConfigs {
|
||||
if v.GetE2EImage() == imageURL {
|
||||
index = i
|
||||
imageID = i
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -405,7 +404,7 @@ func replaceRegistryInImageURLWithList(imageURL string, reg RegistryList) (strin
|
||||
if len(last) == 1 {
|
||||
return "", fmt.Errorf("image %q is required to be in an image:tag format", imageURL)
|
||||
}
|
||||
config := getRepositoryMappedConfig(index, Config{
|
||||
config := getRepositoryMappedConfig(imageID, Config{
|
||||
registry: parts[0],
|
||||
name: strings.Join([]string{strings.Join(parts[1:countParts-1], "/"), last[0]}, "/"),
|
||||
version: last[1],
|
||||
|
4
vendor/k8s.io/kubernetes/test/utils/runners.go
generated
vendored
4
vendor/k8s.io/kubernetes/test/utils/runners.go
generated
vendored
@ -1319,7 +1319,7 @@ func MakePodSpec() v1.PodSpec {
|
||||
return v1.PodSpec{
|
||||
Containers: []v1.Container{{
|
||||
Name: "pause",
|
||||
Image: "k8s.gcr.io/pause:3.7",
|
||||
Image: "registry.k8s.io/pause:3.8",
|
||||
Ports: []v1.ContainerPort{{ContainerPort: 80}},
|
||||
Resources: v1.ResourceRequirements{
|
||||
Limits: v1.ResourceList{
|
||||
@ -1741,7 +1741,7 @@ type DaemonConfig struct {
|
||||
|
||||
func (config *DaemonConfig) Run() error {
|
||||
if config.Image == "" {
|
||||
config.Image = "k8s.gcr.io/pause:3.7"
|
||||
config.Image = "registry.k8s.io/pause:3.8"
|
||||
}
|
||||
nameLabel := map[string]string{
|
||||
"name": config.Name + "-daemon",
|
||||
|
Reference in New Issue
Block a user