Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Error Creating a raft cluster on OpenShift #1034

Open
EyalPazz opened this issue Jun 24, 2024 · 1 comment
Open

Bug: Error Creating a raft cluster on OpenShift #1034

EyalPazz opened this issue Jun 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@EyalPazz
Copy link

EyalPazz commented Jun 24, 2024

Describe the bug
When Installing a raft cluster like explained here https://developer.hashicorp.com/vault/docs/platform/k8s/helm/openshift, the StatfulSets pods are crashing with the following error:

Error initializing storage of type raft: error parsing config: open /vault/data/node-id: permission denied
2024-06-24T08:19:33.517Z [INFO] proxy environment: http_proxy="" https_proxy="" no_proxy=""

also tried changing runAsNonRoot and allowPrivilegeEscalation in the server's securityContext, didn't work

To Reproduce
Steps to reproduce the behavior:

  1. Have an openshift cluster
  2. Run helm install vault hashicorp/vault \ --set='global.openshift=true' \ --set='server.ha.enabled=true' \ --set='server.ha.raft.enabled=true'

Expected behavior
No Errors

Environment

  • Kubernetes version: 1.27
    • Distribution or cloud vendor (OpenShift, EKS, GKE, AKS, etc.): Openshift
    • Other configuration options or runtime services (istio, etc.): None
  • vault-helm version: 0.28.0

Chart values:
defaults, only overrides are the command ones

@EyalPazz EyalPazz added the bug Something isn't working label Jun 24, 2024
@Filas312
Copy link

Filas312 commented Dec 7, 2024

@EyalPazz not a maintainer, but did you try using values.openshift.yaml to make the install? It also sets a different server image for Vault, which is important.

IME it might be enough to use this image (registry.connect.redhat.com/hashicorp/vault:1.18.1-ubi) to run correctly; the error for /vault/data/node-id is caused either by an immutable root filesystem setting (you'd be looking at readOnlyRootFilesystem SCC part then, not necessarily allowPrivilegeEscalation/runAsNonRoot) or lack of write permissions for the UID that Vault runs as, I would assume that either would be fixed in RH image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants