Skip to content

Commit

Permalink
Rework AWS credentials secret data
Browse files Browse the repository at this point in the history
Since CAPI operator supports credentials secret with
AWS_B64ENCODED_CREDENTIALS key only.
  • Loading branch information
eromanova committed Aug 23, 2024
1 parent 89243cc commit bd17433
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ dev-templates: templates-generate

.PHONY: dev-aws
dev-aws: yq
@$(YQ) e ".data.credentials = \"${AWS_CREDENTIALS}\"" config/dev/awscredentials.yaml | $(KUBECTL) -n $(NAMESPACE) apply -f -
@$(YQ) e ".stringData.AWS_B64ENCODED_CREDENTIALS = \"${AWS_CREDENTIALS}\"" config/dev/awscredentials.yaml | $(KUBECTL) -n $(NAMESPACE) apply -f -

.PHONY: dev-apply
dev-apply: kind-deploy registry-deploy dev-push dev-deploy dev-templates dev-aws
Expand Down
4 changes: 2 additions & 2 deletions config/dev/awscredentials.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
data:
credentials: Cg==
stringData:
AWS_B64ENCODED_CREDENTIALS: Cg==
kind: Secret
metadata:
labels:
Expand Down
2 changes: 1 addition & 1 deletion docs/aws/credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ export AWS_B64ENCODED_CREDENTIALS=$(clusterawsadm bootstrap credentials encode-a
4. Create the secret with AWS credentials in the `hmc-system` namespace:

```
kubectl create secret generic aws-credentials -n hmc-system --from-literal credentials="$(echo $AWS_B64ENCODED_CREDENTIALS | base64 -d)"
kubectl create secret generic aws-credentials -n hmc-system --from-literal AWS_B64ENCODED_CREDENTIALS="$AWS_B64ENCODED_CREDENTIALS"
```

0 comments on commit bd17433

Please sign in to comment.