-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a Secret to store S3 keys in K8S deployment
- Passing the access and secret keys directly as environment variables can inadvertently leak them in a multitenant system, as anyone with the `view` ClusterRole or higher on the namespace will have the ability to read the spec of the `Job`. - Instead, create a secret with the keys and mount them as environment variables from there.
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ include "warp.fullname" . }}-credentials | ||
labels: | ||
{{- include "warp.labels" . | nindent 4 }} | ||
data: | ||
access_key: {{ .Values.warpConfiguration.s3AccessKey | b64enc }} | ||
secret_key: {{ .Values.warpConfiguration.s3SecretKey | b64enc }} |