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

chore: update AWS auth config #134

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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