Skip to content

Commit

Permalink
node_e2e: Fix createStaticSystemNodeCriticalPod's invalid spec
Browse files Browse the repository at this point in the history
This fixes `createStaticSystemNodeCriticalPod` to set pod's
restartPolicy instead of container's restartPolicy.
  • Loading branch information
gjkim42 committed Jul 20, 2023
1 parent fa88c0b commit e0a6eb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e_node/system_node_critical_test.go
Expand Up @@ -146,11 +146,11 @@ spec:
containers:
- name: %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"]
restartPolicy: %s
`
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)
if err != nil {
Expand Down

0 comments on commit e0a6eb9

Please sign in to comment.