mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #101312 from harche/ContainerLogPath_fix
Add SELinux security context to ContainerLogPath test
This commit is contained in:
commit
032007e007
@ -18,6 +18,7 @@ package e2enode
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/uuid"
|
||||
@ -74,7 +75,12 @@ var _ = SIGDescribe("ContainerLogPath [NodeConformance]", func() {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Image: busyboxImage,
|
||||
Name: podName,
|
||||
SecurityContext: &v1.SecurityContext{
|
||||
SELinuxOptions: &v1.SELinuxOptions{
|
||||
Type: "container_logreader_t",
|
||||
},
|
||||
},
|
||||
Name: podName,
|
||||
// If we find expected log file and contains right content, exit 0
|
||||
// else, keep checking until test timeout
|
||||
Command: []string{"sh", "-c", "while true; do if [ -e " + expectedLogPath + " ] && grep -q " + log + " " + expectedLogPath + "; then exit 0; fi; sleep 1; done"},
|
||||
|
Loading…
Reference in New Issue
Block a user