mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-18 17:16:51 +02:00
fix(setup): Use single-line command
This commit is contained in:
@@ -80,17 +80,10 @@ spec:
|
||||
serviceAccountName: sa-ecr-token-helper
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- /bin/sh
|
||||
args:
|
||||
- -c
|
||||
- |-
|
||||
TOKEN=`aws ecr get-login-password --region ${REGION} | cut -d' ' -f6`
|
||||
kubectl delete secret -n {{ .name }} --ignore-not-found $SECRET_NAME
|
||||
kubectl create secret -n {{ .name }} docker-registry $SECRET_NAME \
|
||||
--docker-server=$ECR_REPOSITORY \
|
||||
--docker-username=AWS \
|
||||
--docker-password=$TOKEN \
|
||||
--namespace={{ .name }}
|
||||
kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"'$SECRET_NAME'"}]}' -n {{ .name }}
|
||||
- TOKEN=`aws ecr get-login-password --region $REGION | cut -d' ' -f6`; kubectl delete secret -n {{ .name }} --ignore-not-found $SECRET_NAME; kubectl create secret -n {{ .name }} docker-registry $SECRET_NAME --docker-server=$ECR_REPOSITORY --docker-username=AWS --docker-password=$TOKEN; kubectl patch serviceaccount default -p '{"imagePullSecrets":[{"name":"$SECRET_NAME"}]}' -n {{ .name }}
|
||||
env:
|
||||
- name: SECRET_NAME
|
||||
value: 'ecrcred'
|
||||
|
||||
Reference in New Issue
Block a user