mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 22:05:59 +00:00
Merge pull request #119473 from gjkim42/fix-e2e-node-to-use-pod-restartpolicy-correctly
node_e2e: Fix `createStaticSystemNodeCriticalPod`'s invalid spec
This commit is contained in:
commit
4457f85eb3
@ -146,11 +146,11 @@ spec:
|
|||||||
containers:
|
containers:
|
||||||
- name: %s
|
- name: %s
|
||||||
image: %s
|
image: %s
|
||||||
restartPolicy: %s
|
|
||||||
command: ["sh", "-c", "i=0; while [ $i -lt %d ]; do %s i=$(($i+1)); done; while true; do sleep 5; done"]
|
command: ["sh", "-c", "i=0; while [ $i -lt %d ]; do %s i=$(($i+1)); done; while true; do sleep 5; done"]
|
||||||
|
restartPolicy: %s
|
||||||
`
|
`
|
||||||
file := staticPodPath(dir, name, namespace)
|
file := staticPodPath(dir, name, namespace)
|
||||||
podYaml := fmt.Sprintf(template, name, namespace, name, image, string(restart), iterations, command)
|
podYaml := fmt.Sprintf(template, name, namespace, name, image, iterations, command, string(restart))
|
||||||
|
|
||||||
f, err := os.OpenFile(file, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0666)
|
f, err := os.OpenFile(file, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user