Skip to content

Commit

Permalink
chore: update AWS auth config
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
  • Loading branch information
TylerGillson committed Nov 28, 2023
1 parent cb0cf32 commit a3733e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 3 additions & 7 deletions chart/validator/templates/plugin-secret-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ kind: Secret
metadata:
name: {{ required ".Values.pluginSecrets.aws.secretName is required!" .Values.pluginSecrets.aws.secretName }}
stringData:
credentials: |
[default]
aws_access_key_id={{ required ".Values.pluginSecrets.aws.accessKeyId is required!" .Values.pluginSecrets.aws.accessKeyId }}
aws_secret_access_key={{ required ".Values.pluginSecrets.aws.secretAccessKey is required!" .Values.pluginSecrets.aws.secretAccessKey }}
{{- if .Values.pluginSecrets.aws.sessionToken }}
aws_session_token={{ $.Values.pluginSecrets.aws.sessionToken }}
{{- end }}
{{- range $key, $val := .Values.pluginSecrets.aws.env }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
13 changes: 9 additions & 4 deletions chart/validator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ plugins:
targetPort: https
type: ClusterIP
auth:
# Option 1: Leave secret undefined for implicit auth (node instance role, IMDSv2, etc.)
# Option 1: Leave secret undefined for implicit auth (node instance IAM role, IMDSv2, etc.)
# Option 2: Create a secret via pluginSecrets (see below). Note: secretName and pluginSecrets.aws.secretName must match.
# Option 3: Specify the name of a preexisting secret in your target cluster and leave pluginSecrets.aws undefined.
#
secret: {} # Delete these curly braces if you're specifying secretName!
# secretName: aws-creds
# Override the service account used by AWS validator (optional, could be used for IMDSv2 on EKS)
# WARNING: the chosen service account must include all RBAC privileges found in the AWS plugin template:
# https://github.com/spectrocloud-labs/validator-plugin-aws/blob/main/chart/validator-plugin-aws/templates/manager-rbac.yaml
Expand Down Expand Up @@ -347,9 +348,13 @@ pluginSecrets:
#
aws: {} # Don't forget to delete these curly braces if you're specifying credentials here!
# secretName: aws-creds # ensure this matches the AWS plugin values above
# accessKeyId: ""
# secretAccessKey: ""
# sessionToken: ""
#
# Any valid combination of AWS credential environment variables, per the options defined in:
# https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#environment-variables.
# env:
# AWS_ACCESS_KEY_ID: ""
# AWS_SECRET_ACCESS_KEY: ""
# AWS_SESSION_TOKEN: ""

# If installing the Azure plugin, the below config is required unless one of the following applies:
# - The target cluster already contains a secret with the correct format and you've specified its name above.
Expand Down

0 comments on commit a3733e1

Please sign in to comment.