mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #53673 from timothysc/downward_hostip_e2e
Automatic merge from submit-queue (batch tested with PRs 53678, 53677, 53682, 53673). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fix to prevent downward api change break on older versions Signed-off-by: Timothy St. Clair <timothysc@gmail.com> **What this PR does / why we need it**: Prevents "should provide pod and host IP as an env var [Conformance]" from running on older versions whose api does not have that field and will break on those clusters. This is not a upstream tested configuration, but downstream folks do this regularly. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: N/A **Special notes for your reviewer**: N/A **Release note**: ``` Prevent downward api-change from breaking on older version ``` /cc @kubernetes/sig-testing-bugs @jpbetz @marun
This commit is contained in:
commit
3ac4762db9
@ -41,6 +41,7 @@ go_library(
|
||||
"//pkg/kubelet:go_default_library",
|
||||
"//pkg/kubelet/sysctl:go_default_library",
|
||||
"//pkg/security/apparmor:go_default_library",
|
||||
"//pkg/util/version:go_default_library",
|
||||
"//test/e2e/framework:go_default_library",
|
||||
"//test/utils:go_default_library",
|
||||
"//test/utils/image:go_default_library",
|
||||
|
@ -23,11 +23,14 @@ import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
utilversion "k8s.io/kubernetes/pkg/util/version"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
)
|
||||
|
||||
var hostIPVersion = utilversion.MustParseSemantic("v1.8.0")
|
||||
|
||||
var _ = framework.KubeDescribe("Downward API", func() {
|
||||
f := framework.NewDefaultFramework("downward-api")
|
||||
|
||||
@ -63,6 +66,7 @@ var _ = framework.KubeDescribe("Downward API", func() {
|
||||
})
|
||||
|
||||
It("should provide pod and host IP as an env var [Conformance]", func() {
|
||||
framework.SkipUnlessServerVersionGTE(hostIPVersion, f.ClientSet.Discovery())
|
||||
podName := "downward-api-" + string(uuid.NewUUID())
|
||||
env := []v1.EnvVar{
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user