k8s: the gateway's group reads the store credential files nginx includes
This commit is contained in:
parent
0d6065cf8f
commit
f65aed2147
1 changed files with 119 additions and 64 deletions
|
|
@ -826,9 +826,9 @@ pkgs.testers.runNixOSTest {
|
|||
assert password not in kube(machine, f"get pod {pod_name} -o json")
|
||||
assert machine.succeed(f"stat -c '%a %U %G' {EXPORTER_PASSWORD} {EXPORTER_CONF} {EXPORTER_HASH_FILE} {STORE_AUTH_DIR}").split("\n")[:4] == [
|
||||
"600 root root",
|
||||
"640 root nginx",
|
||||
"600 root root",
|
||||
"600 root root",
|
||||
"700 root root",
|
||||
"750 root nginx",
|
||||
]
|
||||
login = base64.b64encode(f"swarm-exporter:{password}".encode()).decode()
|
||||
assert machine.succeed(f"cat {EXPORTER_CONF}").strip() == f'proxy_set_header Authorization "Basic {login}";'
|
||||
|
|
|
|||
Loading…
Reference in a new issue