Merge pull request #45901 from Random-Liu/fix-node-e2e

Automatic merge from submit-queue (batch tested with PRs 44520, 45253, 45838, 44685, 45901)

Fix node e2e panic when not using image config file.

In https://github.com/kubernetes/kubernetes/pull/45430, `resources` field in image config is a pointer, and we only initialize it when using image config file.

However, we still have test specifying images directly without image config file, this will cause those test to panic. See:
* https://k8s-testgrid.appspot.com/google-docker#kubelet
* https://k8s-testgrid.appspot.com/google-docker#e2e-cos

This PR fixes this.

@vishh @mtaufen @kewu1992
This commit is contained in:
Kubernetes Submit Queue 2017-05-16 21:28:02 -07:00 committed by GitHub
commit 23f0fe8632

View File

@ -132,7 +132,7 @@ type internalImageConfig struct {
type internalGCEImage struct {
image string
project string
resources *Resources
resources Resources
metadata *compute.Metadata
machine string
tests []string
@ -209,7 +209,7 @@ func main() {
metadata: getImageMetadata(imageConfig.Metadata),
machine: imageConfig.Machine,
tests: imageConfig.Tests,
resources: &imageConfig.Resources,
resources: imageConfig.Resources,
}
if isRegex && len(images) > 1 {
// Use image name when shortName is not unique.