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

How can I use template.source instead of contents in case of ConfigMap ? #283

Open
ShriprasadM opened this issue Aug 31, 2020 · 0 comments

Comments

@ShriprasadM
Copy link

  1. My application is already having application.yml
  2. I am trying to use application.yml as the consul template itself. I think it would be easy migration to the vault.
  3. I declared new configmap as follows with consul hcl file as follows

    "template" = {
    "source" = "/etc/configforvault/app-resources.yml"
    "destination" = "/vault/secrets/db-creds"
    }

  4. When I deploy the application in k8s it gives following error

2020-08-31T14:08:02.517Z [ERROR] template.server: template server failed to create: error="failed to read template: >open /etc/configforvault/app-resources.yml: no such file or directory"
2020-08-31T14:08:02.517Z [INFO] template.server: template server stopped
2020-08-31T14:08:02.525Z [INFO] auth.handler: authentication successful, sending token to sinks

  1. I have tried creating /etc/configforvault/app-resources.yml in vault-0, vault-agent-injector-XXXXX and inside application container too, but still getting the same error.
    Can someone help me here? I am using Kubernetes and vault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant