mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/spinnaker] Fix incorrect dockerRegistry password-command quoting (#21987)
* Update the docker-registry command to follow the format of the kubernetes provider below. Remove the string concatenation, which did not work with the 'quote' command - this was incorrectly escaped when sent to Halyard Signed-off-by: Adam Robinson <21spock@gmail.com> * Update README and values for the new command format Signed-off-by: Adam Robinson <21spock@gmail.com> * Update to the latest Spinnaker version and supporting Halyard version Signed-off-by: Adam Robinson <21spock@gmail.com> * Update the Chart version Signed-off-by: Adam Robinson <21spock@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
description: Open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence.
|
||||
name: spinnaker
|
||||
version: 2.0.0-rc2
|
||||
version: 2.0.0-rc3
|
||||
appVersion: 1.16.2
|
||||
home: http://spinnaker.io/
|
||||
sources:
|
||||
|
||||
@@ -104,9 +104,9 @@ dockerRegistries:
|
||||
# password: '<INSERT YOUR SERVICE ACCOUNT JSON HERE>'
|
||||
# email: 1234@5678.com
|
||||
# - name: ecr
|
||||
# address: https://<AWS-ACCOUNT-ID>.dkr.ecr.<REGION>.amazonaws.com
|
||||
# address: <AWS-ACCOUNT-ID>.dkr.ecr.<REGION>.amazonaws.com
|
||||
# username: AWS
|
||||
# passwordCommand: "aws --region <REGION> ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken' | base64 -d | sed 's/^AWS://'"
|
||||
# passwordCommand: aws --region <REGION> ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken' | base64 -d | sed 's/^AWS://'
|
||||
```
|
||||
|
||||
You can provide passwords as a Helm value, or you can use a pre-created secret containing your registry passwords. The secret should have an item per Registry in the format: `<registry name>: <password>`. In which case you'll specify the secret to use in `dockerRegistryAccountSecret` like so:
|
||||
|
||||
@@ -99,21 +99,11 @@ data:
|
||||
PROVIDER_COMMAND='add'
|
||||
fi
|
||||
|
||||
CREDS=""
|
||||
{{ if $registry.username -}}
|
||||
CREDS+="--username {{ $registry.username }}"
|
||||
{{ if $registry.passwordCommand -}}
|
||||
CREDS+=" --password-command {{ $registry.passwordCommand | quote }}"
|
||||
{{- else -}}
|
||||
CREDS+=" --password-file /opt/registry/passwords/{{ $registry.name }}"
|
||||
{{- end -}}
|
||||
{{ if $registry.email }}
|
||||
CREDS+=" --email {{ $registry.email }}"
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
$HAL_COMMAND config provider docker-registry account $PROVIDER_COMMAND {{ $registry.name }} --address {{ $registry.address }} \
|
||||
${CREDS} {{ if $registry.repositories }} --repositories {{ range $index, $repository := $registry.repositories }}{{if $index}},{{end}}{{- $repository }}{{- end }}{{- end }}
|
||||
{{ if $registry.username -}} --username {{ $registry.username }} \
|
||||
{{ if $registry.passwordCommand -}} --password-command "{{ $registry.passwordCommand }}"{{ else -}} --password-file /opt/registry/passwords/{{ $registry.name }}{{- end }} \
|
||||
{{ if $registry.email -}} --email {{ $registry.email }}{{- end -}}{{- end }} \
|
||||
{{ if $registry.repositories -}} --repositories {{ range $index, $repository := $registry.repositories }}{{if $index}},{{end}}{{- $repository }}{{- end }}{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
halyard:
|
||||
spinnakerVersion: 1.16.7
|
||||
spinnakerVersion: 1.19.4
|
||||
image:
|
||||
repository: gcr.io/spinnaker-marketplace/halyard
|
||||
tag: 1.31.1
|
||||
tag: 1.32.0
|
||||
pullSecrets: []
|
||||
# Set to false to disable persistence data volume for halyard
|
||||
persistence:
|
||||
@@ -150,7 +150,7 @@ dockerRegistries:
|
||||
# - name: ecr
|
||||
# address: <AWS-ACCOUNT-ID>.dkr.ecr.<REGION>.amazonaws.com
|
||||
# username: AWS
|
||||
# passwordCommand: "aws --region <REGION> ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken' | base64 -d | sed 's/^AWS://'"
|
||||
# passwordCommand: aws --region <REGION> ecr get-authorization-token --output text --query 'authorizationData[].authorizationToken' | base64 -d | sed 's/^AWS://'
|
||||
|
||||
# If you don't want to put your passwords into a values file
|
||||
# you can use a pre-created secret instead of putting passwords
|
||||
|
||||
Reference in New Issue
Block a user