Skip to content

Commit

Permalink
Sync AWS credential secret keys with installer.
Browse files Browse the repository at this point in the history
Installer was using this format instead, it's more consistent with
~/.aws/credentials and we're soon to have code that will need to read
both, preferably we should sync on the format.
  • Loading branch information
dgoodwin committed Nov 29, 2018
1 parent 8e1708f commit 744c5ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions config/templates/cluster-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ objects:
name: ${CLUSTER_NAME}-aws-creds
type: Opaque
stringData:
awsAccessKeyId: ${AWS_ACCESS_KEY_ID}
awsSecretAccessKey: ${AWS_SECRET_ACCESS_KEY}
aws_access_key_id: ${AWS_ACCESS_KEY_ID}
aws_secret_access_key: ${AWS_SECRET_ACCESS_KEY}

- apiVersion: v1
kind: Secret
Expand Down
4 changes: 2 additions & 2 deletions pkg/awsclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import (
)

const (
awsCredsSecretIDKey = "awsAccessKeyId"
awsCredsSecretAccessKey = "awsSecretAccessKey"
awsCredsSecretIDKey = "aws_access_key_id"
awsCredsSecretAccessKey = "aws_secret_access_key"
)

//go:generate mockgen -source=./client.go -destination=./mock/client_generated.go -package=mock
Expand Down
4 changes: 2 additions & 2 deletions pkg/install/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func GenerateInstallerJob(
ValueFrom: &corev1.EnvVarSource{
SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: cd.Spec.PlatformSecrets.AWS.Credentials,
Key: "awsAccessKeyId",
Key: "aws_access_key_id",
},
},
},
Expand All @@ -135,7 +135,7 @@ func GenerateInstallerJob(
ValueFrom: &corev1.EnvVarSource{
SecretKeyRef: &corev1.SecretKeySelector{
LocalObjectReference: cd.Spec.PlatformSecrets.AWS.Credentials,
Key: "awsSecretAccessKey",
Key: "aws_secret_access_key",
},
},
},
Expand Down

0 comments on commit 744c5ef

Please sign in to comment.