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

feat: HCP Vault Secrets provider #238

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

carnei-ro
Copy link
Contributor

Provider to fetch secrets from HashiCorp Cloud Platform - Vault Secrets, based on the official HashiCorp Cloud Platform Go SDK.

It works:

$ make
go build -ldflags "-X main.version=v0.34.1-18-g8083b26-dirty -X main.commit=8083b264e2169745b76dcc7ce8b724d6193a5160" -o bin/vals ./cmd/vals

$ cat myyaml.yaml 
baz:
  gitlab: ref+hcpvaultsecrets://istio-oauth2/gitlab
  client_id: ref+hcpvaultsecrets://istio-oauth2/gitlab#client_id
  simple_secret: ref+hcpvaultsecrets://istio-oauth2/simple_secret

$ cat myyaml.yaml | bin/vals eval -f -
baz:
  client_id: 9fb884902383c34a2f12f50428f47672213b64fad4cc5ae21ab8c79751df7c9c
  gitlab: '{   "client_id": "9fb884902383c34a2f12f50428f47672213b64fad4cc5ae21ab8c79751df7c9c",   "client_secret": "gloas-17c3c8fee7c79b943c9a8ea29b2f974c7547f8143a189f8afa76ae78bf04efa0" }'
  simple_secret: this is a simple secret

$ env | grep HCP_
HCP_CLIENT_SECRET=rf3axREDACTED
HCP_CLIENT_ID=jhsl1REDACTED

image

@carnei-ro carnei-ro force-pushed the feat/hcp-vault-secrets branch 2 times, most recently from 66fb5cd to 38b4f6a Compare February 23, 2024 19:07
@yxxhero
Copy link
Member

yxxhero commented Feb 23, 2024

@carnei-ro please add some tests for this feature.

@carnei-ro carnei-ro force-pushed the feat/hcp-vault-secrets branch from 38b4f6a to addb901 Compare February 26, 2024 01:05
@carnei-ro
Copy link
Contributor Author

@yxxhero added the tests using Azure Key Vault as example

@carnei-ro carnei-ro force-pushed the feat/hcp-vault-secrets branch from addb901 to 9a6f483 Compare February 27, 2024 13:19
Signed-off-by: Leandro Carneiro <leandro@carnei.ro>
@carnei-ro carnei-ro force-pushed the feat/hcp-vault-secrets branch from 9a6f483 to 7520b69 Compare February 27, 2024 13:23
@carnei-ro
Copy link
Contributor Author

@yxxhero I added the feature of fetching a pinned version of a secret; I think this is now ready to review / merge.

@yxxhero yxxhero merged commit 6896e1e into helmfile:main Feb 27, 2024
4 checks passed
@carnei-ro carnei-ro deleted the feat/hcp-vault-secrets branch February 27, 2024 13:44
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

Successfully merging this pull request may close these issues.

2 participants