Skip to content

Commit

Permalink
Use slashes instead of dashes for secret namespacing (#9)
Browse files Browse the repository at this point in the history
* Use slashes instead of dashes for secret namespacing

* Add how to use section to readme
  • Loading branch information
aramkarapetian authored Nov 10, 2021
1 parent 41c258c commit 57e8818
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.12
version: 0.1.13

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.12"
appVersion: "0.1.13"
14 changes: 14 additions & 0 deletions charts/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ my-app-base:
tag: 1.2.3
```

External secrets
```
my-app-base:
...
product: my-product
env: production
secrets:
- secret1
- secret2
- secret3
```
This will produce externals ecrets which will ask secrets from store my-app-production.
Values in Secret Manager should be put in my-product/production/my-app matching secret1, secret2, secret2.

Run
```
helm upgrade --install my-app .
Expand Down
2 changes: 1 addition & 1 deletion charts/base/templates/external-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
{{ $property := $secret }}
- secretKey: {{ $key }}
remoteRef:
key: {{ $.Values.product }}-{{ $.Values.env }}-{{ $fullName }}
key: {{ $.Values.product }}/{{ $.Values.env }}/{{ $fullName }}
property: {{ $property }}
{{- end }}
{{- end }}

0 comments on commit 57e8818

Please sign in to comment.