Open taitelman opened 1 year ago
the only solution I found so far is to add root privileges , which is a complete bypass:
securityContext:
privileged: true <--- workaround
capabilities:
add:
- IPC_LOCK
and of course not secured at all for running a pod.
I suspect the other issue with vault + mlock + external plugins is the
rpc error: code = Unavailable desc = error reading from server: read unix @->/tmp/plugin4213242693: use of closed network connection
it might be a side effect due to plugin not up but maybe vault plugin uses unix pipes for RPC. that may require more linux capabilities
not really relevant or interesting but the /vault/config.hcl
is:
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 1
}
storage "inmem" {}
plugin_directory = "/vault/plugins"
api_addr = "http://127.0.0.1:8200"
log_level = "Debug"
log_format = "json"
Describe the bug if I set
VAULT_DISABLE_MLOCK=true
all works well. however, if I reverse that flag my plugin will crash upon plugin startup:is that related to ulimit ?
vault version: 1.9.6 Docker of: Red Hat Enterprise Linux release 9.1 (Plow)
Dockerfile has ofcourse:
Deployed to Kubernetes 1.24 As vault a container (via
deployment.yaml
) has special securityContext (run as nonRoot).however, it seems that this capability prevents vault from spawning an external plugin (fork will fail).