mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Remove the temporary fix for pre-1.0 mirror pods
This commit is contained in:
@@ -154,68 +154,6 @@ func TestCompatibility_v1_PodSecurityContext(t *testing.T) {
|
||||
"spec.hostPID",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reseting defaults for pre-v1.1 mirror pods",
|
||||
input: `
|
||||
{
|
||||
"kind":"Pod",
|
||||
"apiVersion":"v1",
|
||||
"metadata":{
|
||||
"name":"my-pod-name",
|
||||
"namespace":"my-pod-namespace",
|
||||
"annotations": {
|
||||
"kubernetes.io/config.mirror": "mirror"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers":[{
|
||||
"name":"a",
|
||||
"image":"my-container-image",
|
||||
"resources": {
|
||||
"limits": {
|
||||
"cpu": "100m"
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
`,
|
||||
absentKeys: []string{
|
||||
"spec.terminationGracePeriodSeconds",
|
||||
"spec.containers[0].resources.requests",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "preserving defaults for v1.1+ mirror pods",
|
||||
input: `
|
||||
{
|
||||
"kind":"Pod",
|
||||
"apiVersion":"v1",
|
||||
"metadata":{
|
||||
"name":"my-pod-name",
|
||||
"namespace":"my-pod-namespace",
|
||||
"annotations": {
|
||||
"kubernetes.io/config.mirror": "cbe924f710c7e26f7693d6a341bcfad0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers":[{
|
||||
"name":"a",
|
||||
"image":"my-container-image",
|
||||
"resources": {
|
||||
"limits": {
|
||||
"cpu": "100m"
|
||||
}
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
`,
|
||||
expectedKeys: map[string]string{
|
||||
"spec.terminationGracePeriodSeconds": "30",
|
||||
"spec.containers[0].resources.requests": "map[cpu:100m]",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
validator := func(obj runtime.Object) field.ErrorList {
|
||||
|
||||
Reference in New Issue
Block a user