Commit c8525ec9 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31642 from jfrazelle/fix-upgrade-e2e-gke-1.3-1.4-kubectl-skew

Automatic merge from submit-queue fixes upgrade tests for kubectl skew from 1.3 to master <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note ``` This PR modified the output from "QoS Tier" to "QoS Class" which broke the kubectl skew upgrade test from 1.3 to 1.4 https://github.com/kubernetes/kubernetes/pull/27749 this fixes that
parents b921c675 7ca6673e
...@@ -541,24 +541,48 @@ var _ = framework.KubeDescribe("Kubectl client", func() { ...@@ -541,24 +541,48 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
By("Waiting for Redis master to start.") By("Waiting for Redis master to start.")
waitForOrFailWithDebug(1) waitForOrFailWithDebug(1)
// Pod // Pod
forEachPod(func(pod api.Pod) { // this is terrible but we want 1.4.0 alpha to count as well
output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag) classVersion, err := framework.KubectlVersionGTE(version.MustParse("v1.4.0-alpha"))
requiredStrings := [][]string{ Expect(err).NotTo(HaveOccurred())
{"Name:", "redis-master-"}, if classVersion {
{"Namespace:", ns}, forEachPod(func(pod api.Pod) {
{"Node:"}, output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag)
{"Labels:", "app=redis"}, requiredStrings := [][]string{
{"role=master"}, {"Name:", "redis-master-"},
{"Status:", "Running"}, {"Namespace:", ns},
{"IP:"}, {"Node:"},
{"Controllers:", "ReplicationController/redis-master"}, {"Labels:", "app=redis"},
{"Image:", redisImage}, {"role=master"},
{"State:", "Running"}, {"Status:", "Running"},
{"QoS Class:", "BestEffort"}, {"IP:"},
} {"Controllers:", "ReplicationController/redis-master"},
checkOutput(output, requiredStrings) {"Image:", redisImage},
}) {"State:", "Running"},
{"QoS Class:", "BestEffort"},
}
checkOutput(output, requiredStrings)
})
} else {
forEachPod(func(pod api.Pod) {
output := framework.RunKubectlOrDie("describe", "pod", pod.Name, nsFlag)
requiredStrings := [][]string{
{"Name:", "redis-master-"},
{"Namespace:", ns},
{"Node:"},
{"Labels:", "app=redis"},
{"role=master"},
{"Status:", "Running"},
{"IP:"},
{"Controllers:", "ReplicationController/redis-master"},
{"Image:", redisImage},
{"State:", "Running"},
{"QoS Tier:", "BestEffort"},
}
checkOutput(output, requiredStrings)
})
}
// Rc // Rc
output := framework.RunKubectlOrDie("describe", "rc", "redis-master", nsFlag) output := framework.RunKubectlOrDie("describe", "rc", "redis-master", nsFlag)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment