mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Don't use zgrep in check-config
if apparmor porfile is enforced (#7939)
* Don't use zgrep if apparmor is enforced for it * Bump e2e se timeouts for reencryption time Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
parent
34617390d0
commit
3eb4e12c3b
@ -25,7 +25,7 @@ if [ $# -gt 0 ]; then
|
||||
CONFIG="$1"
|
||||
fi
|
||||
|
||||
if ! command -v zgrep >/dev/null 2>&1; then
|
||||
if ! command -v zgrep >/dev/null 2>&1 || eval "cat /sys/kernel/security/apparmor/profiles | grep -q 'zgrep (enforce)'"; then
|
||||
zgrep() {
|
||||
zcat "$2" | grep "$1"
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ var _ = Describe("Verify Secrets Encryption Rotation", Ordered, func() {
|
||||
cmd = "k3s secrets-encrypt status"
|
||||
Eventually(func() (string, error) {
|
||||
return e2e.RunCmdOnNode(cmd, serverNodeNames[0])
|
||||
}, "180s", "5s").Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
||||
}, "240s", "10s").Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
||||
|
||||
for _, nodeName := range serverNodeNames[1:] {
|
||||
res, err := e2e.RunCmdOnNode(cmd, nodeName)
|
||||
@ -219,7 +219,7 @@ var _ = Describe("Verify Secrets Encryption Rotation", Ordered, func() {
|
||||
g.Expect(res).Should(ContainSubstring("Encryption Status: Enabled"))
|
||||
g.Expect(res).Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
||||
g.Expect(res).Should(ContainSubstring("Server Encryption Hashes: All hashes match"))
|
||||
}, "420s", "2s").Should(Succeed())
|
||||
}, "420s", "5s").Should(Succeed())
|
||||
}
|
||||
})
|
||||
})
|
||||
@ -237,7 +237,7 @@ var _ = Describe("Verify Secrets Encryption Rotation", Ordered, func() {
|
||||
cmd = "k3s secrets-encrypt status"
|
||||
Eventually(func() (string, error) {
|
||||
return e2e.RunCmdOnNode(cmd, serverNodeNames[0])
|
||||
}, "180s", "5s").Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
||||
}, "240s", "10s").Should(ContainSubstring("Current Rotation Stage: reencrypt_finished"))
|
||||
|
||||
for i, nodeName := range serverNodeNames {
|
||||
Eventually(func(g Gomega) {
|
||||
|
Loading…
Reference in New Issue
Block a user