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] Getting "mapping values are not allowed in this context" with multi-key-value-secret #737

Open
mimartin12 opened this issue Aug 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mimartin12
Copy link

mimartin12 commented Aug 6, 2024

Note: Make sure to check out known issues (https://akv2k8s.io/troubleshooting/known-issues/) before submitting

Components and versions
Select which component(s) the bug relates to with [X].

[X] Controller, version: 1.6.0 (docker image tag)
[X] Env-Injector (webhook), version: 1.6.0 (docker image tag)
[ ] Other

Describe the bug
A clear and concise description of what the bug is.
When using the example YAML from the documentation, or even my own, in an Azure Key Vault secret. I am able unable to get the secret to sync into the K8s cluster. When describing the AzureKeyVaultSecret resource, it shows this error.

  Warning  ErrAzureVault  25s (x18 over 86s)  azurekeyvaultcontroller  Failed to get secret for 'xxxxxxx' from Azure Key Vault 'cluster': yaml: mapping values are not allowed in this context

To Reproduce
Steps to reproduce the behavior:

  1. Create Azure Key Vault Secret with YAML.
key1: value1
key2: value2
key3: value3

image

  1. Apply manifest
apiVersion: spv.no/v2beta1
kind: AzureKeyVaultSecret
metadata:
  name: cloud-credentials
spec:
  vault:
    name: xxxxxx
    object:
      name: xxxxxx
      type: multi-key-value-secret
      contentType: application/x-yaml
  output:
    secret: 
      name: cloud-credentials

Expected behavior
A clear and concise description of what you expected to happen.

When applying the manifest, the Kubernetes secret is created.

Logs
If applicable, add logs to help explain your problem.

paste log here...

Additional context
Add any other context about the problem here.

@mimartin12 mimartin12 added the bug Something isn't working label Aug 6, 2024
mimartin12 added a commit to bitwarden/ephemeral-environment-charts that referenced this issue Aug 6, 2024
- Create a single secret with multiple values
- Values include smtp and yubico, but can be extended
- This can be combined into a single azkv2k8s resource once SparebankenVest/azure-key-vault-to-kubernetes#737 is resolved.
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

1 participant