AETHER-761 Add support of private image registry with auth enabled
Change-Id: I25e804570357c513bfd1822ab9d971c7ed1c5405
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/Chart.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/Chart.yaml
index 2b0966b..c4c25b8 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-common/Chart.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/Chart.yaml
@@ -9,4 +9,4 @@
description: A Helm chart to install Accelleran common to run Accelleran CU on CBRS band
icon: https://guide.opencord.org/logos/cord.svg
-version: 0.2.0
+version: 0.2.1
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/secret-registry.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/secret-registry.yaml
new file mode 100644
index 0000000..1502049
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/secret-registry.yaml
@@ -0,0 +1,18 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.images.credentials }}
+---
+kind: Secret
+apiVersion: v1
+metadata:
+ name: {{ .Release.Name }}.registry
+ labels:
+ release: {{ .Release.Name }}
+type: kubernetes.io/dockerconfigjson
+data:
+ .dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.images.credentials.registry | quote) (printf "%s:%s" .Values.images.credentials.username .Values.images.credentials.password | b64enc) | b64enc | quote }}
+{{- end }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-nats.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-nats.yaml
index fba96bb..38157af 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-nats.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-nats.yaml
@@ -28,6 +28,10 @@
{{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
{{- end }}
serviceAccountName: accelleran-cbrs-nats
+ {{- if .Values.images.credentials }}
+ imagePullSecrets:
+ - name: {{ .Release.Name }}.registry
+ {{- end }}
containers:
- name: nats
image: {{ .Values.images.tags.nats }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-redis.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-redis.yaml
index b244279..ae87b35 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-redis.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-redis.yaml
@@ -29,6 +29,10 @@
{{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
{{- end }}
serviceAccountName: accelleran-cbrs-redis
+ {{- if .Values.images.credentials }}
+ imagePullSecrets:
+ - name: {{ .Release.Name }}.registry
+ {{- end }}
containers:
- name: redis
image: {{ .Values.images.tags.redis }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ric.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ric.yaml
index 3c92ad1..0bc589c 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ric.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ric.yaml
@@ -30,6 +30,10 @@
{{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
{{- end }}
serviceAccountName: accelleran-cbrs-ric
+ {{- if .Values.images.credentials }}
+ imagePullSecrets:
+ - name: {{ .Release.Name }}.registry
+ {{- end }}
initContainers:
- name: redis-init-dep-check
image: {{ .Values.images.tags.depCheck }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ricweb.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ricweb.yaml
index 8ab7958..7152ede 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ricweb.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/templates/statefulset-accelleran-cbrs-ricweb.yaml
@@ -29,6 +29,10 @@
nodeSelector:
{{ .Values.nodeSelectors.accelleranCBRSCommon.label }}: {{ .Values.nodeSelectors.accelleranCBRSCommon.value }}
{{- end }}
+ {{- if .Values.images.credentials }}
+ imagePullSecrets:
+ - name: {{ .Release.Name }}.registry
+ {{- end }}
initContainers:
- name: accelleran-cbrs-ric-dep-check
image: {{ .Values.images.tags.depCheck | quote }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-common/values.yaml b/ran/accelleran-cbrs/accelleran-cbrs-common/values.yaml
index 318f943..0a4287d 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-common/values.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-common/values.yaml
@@ -5,13 +5,18 @@
images:
tags:
initCU: docker.io/omecproject/pod-init:1.0.0
- nats: registry.aether.opennetworking.org/aether/accelleran-cu-nats:v1.0.0
- redis: registry.aether.opennetworking.org/aether/accelleran-cu-redis:v1.0.0
+ nats: registry.aetherproject.org/accelleran/accelleran-cu-nats:v1.0.0
+ redis: registry.aetherproject.org/accelleran/accelleran-cu-redis:v1.0.0
redisClient: docker.io/redis:5.0.6-alpine3.10
- ric: registry.aether.opennetworking.org/aether/accelleran-cu-ric:v1.0.0
- ricWeb: registry.aether.opennetworking.org/aether/accelleran-cu-ricweb:v1.0.0
+ ric: registry.aetherproject.org/accelleran/accelleran-cu-ric:v1.0.0
+ ricWeb: registry.aetherproject.org/accelleran/accelleran-cu-ricweb:v1.0.0
depCheck: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
pullPolicy: IfNotPresent
+ credentials: {}
+ # If specified, use this credential to access the image
+ # registry:
+ # username:
+ # password:
nodeSelectors:
enabled: false
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml
index 3dca4f2..5134f6b 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml
@@ -9,4 +9,4 @@
description: A Helm chart to install Accelleran CU on CBRS band
icon: https://guide.opencord.org/logos/cord.svg
-version: 0.1.9
+version: 0.1.10
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/secret-registry.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/secret-registry.yaml
new file mode 100644
index 0000000..1502049
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/secret-registry.yaml
@@ -0,0 +1,18 @@
+{{/*
+# Copyright 2020-present Open Networking Foundation
+
+# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+*/}}
+
+{{- if .Values.images.credentials }}
+---
+kind: Secret
+apiVersion: v1
+metadata:
+ name: {{ .Release.Name }}.registry
+ labels:
+ release: {{ .Release.Name }}
+type: kubernetes.io/dockerconfigjson
+data:
+ .dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.images.credentials.registry | quote) (printf "%s:%s" .Values.images.credentials.username .Values.images.credentials.password | b64enc) | b64enc | quote }}
+{{- end }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml
index 4553d66..a116822 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml
@@ -29,6 +29,10 @@
nodeSelector:
{{ .Values.nodeSelectors.accelleranCBRSCU.label }}: {{ .Values.nodeSelectors.accelleranCBRSCU.value }}
{{- end }}
+ {{- if .Values.images.credentials }}
+ imagePullSecrets:
+ - name: {{ .Release.Name }}.registry
+ {{- end }}
initContainers:
- name: cu-init
image: {{ .Values.images.tags.initCU }}
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml
index e4023fc..d085326 100644
--- a/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml
@@ -5,9 +5,14 @@
images:
tags:
initCU: docker.io/omecproject/pod-init:1.0.0
- vranL3: registry.aether.opennetworking.org/aether/accelleran-cu-l3-tdd:v1.0.2
+ vranL3: registry.aetherproject.org/accelleran/accelleran-cu-l3-tdd:v1.0.2
depCheck: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
pullPolicy: IfNotPresent
+ credentials: {}
+ # If specified, use this credential to access the image
+ # registry:
+ # username:
+ # password:
nodeSelectors:
enabled: false