mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Assign label to pod when exec 'kubectl run' command with flags "--expose=true" and "--restart=Never"
This commit is contained in:
@@ -417,7 +417,8 @@ func TestGeneratePod(t *testing.T) {
|
||||
},
|
||||
expected: &v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "foo",
|
||||
Name: "foo",
|
||||
Labels: map[string]string{"run": "foo"},
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
Containers: []v1.Container{
|
||||
@@ -451,7 +452,8 @@ func TestGeneratePod(t *testing.T) {
|
||||
},
|
||||
expected: &v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "foo",
|
||||
Name: "foo",
|
||||
Labels: map[string]string{"run": "foo"},
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
Containers: []v1.Container{
|
||||
@@ -484,7 +486,8 @@ func TestGeneratePod(t *testing.T) {
|
||||
},
|
||||
expected: &v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "foo",
|
||||
Name: "foo",
|
||||
Labels: map[string]string{"run": "foo"},
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
Containers: []v1.Container{
|
||||
@@ -513,7 +516,8 @@ func TestGeneratePod(t *testing.T) {
|
||||
},
|
||||
expected: &v1.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "foo",
|
||||
Name: "foo",
|
||||
Labels: map[string]string{"run": "foo"},
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
Containers: []v1.Container{
|
||||
|
||||
Reference in New Issue
Block a user