Jail/chroot nginx process inside controller container (#8337)

* Initial work on chrooting nginx process

* More improvements in chroot

* Fix charts and some file locations

* Fix symlink on non chrooted container

* fix psp test

* Add e2e tests to chroot image

* Fix logger

* Add internal logger in controller

* Fix overlay for chrooted tests

* Fix tests

* fix boilerplates

* Fix unittest to point to the right pid

* Fix PR review
This commit is contained in:
Ricardo Katz 2022-04-09 01:48:04 -03:00 committed by GitHub
parent 83ce21b4dd
commit 3def835a6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 456 additions and 49 deletions

View file

@ -18,12 +18,15 @@ package framework
import (
"context"
"time"
"k8s.io/client-go/kubernetes"
)
// Logs returns the log entries of a given Pod.
func Logs(client kubernetes.Interface, namespace, podName string) (string, error) {
// Logs from jails take a bigger time to get shipped due to the need of tailing them
Sleep(3 * time.Second)
logs, err := client.CoreV1().RESTClient().Get().
Resource("pods").
Namespace(namespace).