bank-vaults / bank-vaults

A Vault swiss-army knife: A CLI tool to init, unseal and configure Vault (auth methods, secret engines).
https://bank-vaults.dev
Apache License 2.0
2.06k stars 469 forks source link

unable to set CAP_SETFCAP effective capability: Operation not permitted #1170

Closed gris-gris closed 4 years ago

gris-gris commented 4 years ago

Describe the bug: Default vault creation process doesn't have CAP_SETFCAP capability in statefulset (https://github.com/banzaicloud/bank-vaults/blob/master/charts/vault/templates/statefulset.yaml#L125) This causes to CrashLoopBackOff.

Expected behaviour: Vault CR with default parameters created and started successfully

Steps to reproduce the bug:

helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
helm upgrade --install vault-operator banzaicloud-stable/vault-operator
kubectl apply -f operator/deploy/rbac.yaml
kubectl apply -f operator/deploy/cr.yaml

Environment details:

/kind bug

bonifaido commented 4 years ago

fix incoming in https://github.com/banzaicloud/bank-vaults/pull/1176

gris-gris commented 4 years ago

@bonifaido I also fixed this by adding CAP_SETFCAP in https://github.com/banzaicloud/bank-vaults/blob/master/operator/pkg/controller/vault/vault_controller.go#L1986 and rebuild the operator by myself.

bonifaido commented 4 years ago

But if you add the disable_mlock to the config you will get the same results for the operator.