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

Unable to create a namespace in vault enterprise #31

Closed
kamalverma1 opened this issue Feb 27, 2024 · 2 comments
Closed

Unable to create a namespace in vault enterprise #31

kamalverma1 opened this issue Feb 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kamalverma1
Copy link

What happened?

I am unable to create a namespace in vault-enterprise setup on kubernetes. It shows created while applying the yaml but it never gets created.

How can we reproduce it?

  1. Install upbound provider-vault v0.4.0..
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-vault
spec:
  package: xpkg.upbound.io/upbound/provider-vault:v0.4.0
  1. Create a secret with vault token with below yaml. Refer to the example here.
apiVersion: v1
kind: Secret
metadata:
  name: vault-provider-token
  namespace: vault-ns
type: Opaque
stringData:
  credentials: |
    {
      "token_name": "vault-creds-test-token",
      "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
  1. Create a providerConfig with below yaml. Refer to the example here.
apiVersion: vault.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: vault-provider-config
  namespace: vault-ns
spec:
  address: "https://vault-domain"
  credentials:
    source: Secret
    secretRef:
      name: vault-provider-token
      namespace: vault-enterprise
      key: credentials

I used the below yaml to create a namespace as per the example shared here.

apiVersion: vault.vault.upbound.io/v1alpha1
kind: Namespace
metadata:
  name: ns1
spec:
  forProvider:
    path: ns1
  providerConfigRef:
    name: "vault-provider-config"

$~ kubectl get namespaces.vault.vault.upbound.io

NAME         READY   SYNCED   EXTERNAL-NAME   AGE
ns1                                           1h

$~ kubectl get namespaces.vault.vault.upbound.io ns1

Error from server (NotFound): the server could not find the requested resource (get namespaces.vault.vault.upbound.io ns1)

What environment did it happen in?

Nonprod environment

@kamalverma1 kamalverma1 added the bug Something isn't working label Feb 27, 2024
@jaylevin
Copy link
Contributor

jaylevin commented Apr 4, 2024

This seems to be a duplicate of #12 . I opened a pull request (#35) that fixes this issue by renaming the CRD from Namespace to VaultNamespace. I'm still not 100% certain why this change fixes the error, but it does.

I'm hoping this kickstarts the conversation on the root cause of the issue and we can get a fix out soon.

@haarchri
Copy link
Member

#35

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

3 participants