diff options
author | BorislavG <Borislav.Glozman@amdocs.com> | 2018-05-09 14:34:14 +0000 |
---|---|---|
committer | BorislavG <Borislav.Glozman@amdocs.com> | 2018-05-10 15:02:10 +0000 |
commit | 254272e292bdc81dd788efecfcd16ae7051eb3c7 (patch) | |
tree | 4ca571d3b8d889c2053250828329b5e8690f326d /kubernetes/common | |
parent | 4cd76a6ee6d441389d486851d01432ea5bd5318b (diff) |
Improve docker registry secret management
Change-Id: I2d1ff878c215becc9856af184eb0b11defd75e1d
Issue-ID: OOM-1064
Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
Diffstat (limited to 'kubernetes/common')
-rw-r--r-- | kubernetes/common/common/templates/_repository.tpl | 19 | ||||
-rw-r--r-- | kubernetes/common/common/values.yaml | 1 | ||||
-rw-r--r-- | kubernetes/common/dgbuilder/values.yaml | 1 | ||||
-rw-r--r-- | kubernetes/common/mariadb-galera/values.yaml | 1 | ||||
-rw-r--r-- | kubernetes/common/mysql/values.yaml | 1 | ||||
-rw-r--r-- | kubernetes/common/postgres/values.yaml | 1 |
6 files changed, 18 insertions, 6 deletions
diff --git a/kubernetes/common/common/templates/_repository.tpl b/kubernetes/common/common/templates/_repository.tpl index e054b571ad..364ba7dc4c 100644 --- a/kubernetes/common/common/templates/_repository.tpl +++ b/kubernetes/common/common/templates/_repository.tpl @@ -28,4 +28,21 @@ {{else}} {{- default .Values.repository .Values.global.repository -}} {{end}} -{{- end -}}
\ No newline at end of file +{{- end -}} + + +{{/* + Resolve the image repository secret token. + The value for .Values.global.repositoryCred is used: + repositoryCred: + user: user + password: password + mail: email (optional) +*/}} +{{- define "common.repository.secret" -}} + {{- $repo := include "common.repository" . }} + {{- $cred := .Values.global.repositoryCred }} + {{- $mail := default "@" $cred.mail }} + {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }} + {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $cred.user $cred.password $mail $auth | b64enc -}} +{{- end -}} diff --git a/kubernetes/common/common/values.yaml b/kubernetes/common/common/values.yaml index f834896677..f7098ee80f 100644 --- a/kubernetes/common/common/values.yaml +++ b/kubernetes/common/common/values.yaml @@ -23,7 +23,6 @@ global: # image repositories repository: nexus3.onap.org:10001 - repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== # readiness check readinessRepository: oomk8s diff --git a/kubernetes/common/dgbuilder/values.yaml b/kubernetes/common/dgbuilder/values.yaml index c200c557d0..e7c18c4140 100644 --- a/kubernetes/common/dgbuilder/values.yaml +++ b/kubernetes/common/dgbuilder/values.yaml @@ -8,7 +8,6 @@ global: # image repositories repository: nexus3.onap.org:10001 - repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== # readiness check readinessRepository: oomk8s diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml index bf51443ff9..6e5fb5a972 100644 --- a/kubernetes/common/mariadb-galera/values.yaml +++ b/kubernetes/common/mariadb-galera/values.yaml @@ -3,7 +3,6 @@ ################################################################# global: nodePortPrefix: 302 - repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== persistence: {} repository: nexus3.onap.org:10001 diff --git a/kubernetes/common/mysql/values.yaml b/kubernetes/common/mysql/values.yaml index 028a440c01..306c2d7fe0 100644 --- a/kubernetes/common/mysql/values.yaml +++ b/kubernetes/common/mysql/values.yaml @@ -17,7 +17,6 @@ ################################################################# global: nodePortPrefix: 302 - repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== persistence: {} readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 diff --git a/kubernetes/common/postgres/values.yaml b/kubernetes/common/postgres/values.yaml index 0ae7459074..a570028900 100644 --- a/kubernetes/common/postgres/values.yaml +++ b/kubernetes/common/postgres/values.yaml @@ -17,7 +17,6 @@ ################################################################# global: nodePortPrefix: 302 - repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== persistence: {} readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 |