hashicorp / vault-secrets-operator

The Vault Secrets Operator (VSO) allows Pods to consume Vault secrets natively from Kubernetes Secrets.

Home Page:https://hashicorp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to set up VaultAuthList

monicabiswal147 opened this issue · comments

Trying to set up the VaultAuthList using the API reference - https://developer.hashicorp.com/vault/docs/platform/k8s/vso/api-reference#vaultauthlist. My YAML for the same is as below:

apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuthList
metadata:
  name: vault-auth-list
spec:
  items:
  - apiVersion: secrets.hashicorp.com/v1beta1
    kind: VaultAuth
    metadata:
      name: vault-auth
      namespace: sit
    spec:
      vaultConnectionRef: vso-connection
      method: kubernetes
      mount: sit
      kubernetes:
        role: sit-kubernetes
        serviceAccount: sit-sa

I get an error - the server could not find the requested resource (post vaultauthlists.secrets.hashicorp.com)

Hi @monicabiswal147, the VaultAuthList type in our API reference docs is just the concrete kind used when getting a collection of VaultAuth's from the Kubernetes API. You'll also see it as the listKind in the CRD definition

So in your case you'd want to create a separate VaultAuth for each item in the list.

I can certainly understand the confusion here, so we may want to omit the List types from the website docs, since they aren't really useful for creating things.