* Set all images in values.yaml so they can be overridden
to pull from other private/public registry
* Set imagePullSecrets to be list to support for multible
private registries, the one in default value is used for
registry.local:9001 on StarlingX
* Change the default values for binaryData which can't be
empty string, or it fails with:
Error: unable to build kubernetes objects from release manifest: error
validating "": error validating data: unknown object type "nil" in
ConfigMap.binaryData.config.json
* docs: keep the o2 image name in local registry consistent
with the upstream one:
- nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms:2.0.0
- registry.local:9001/o-ran-sc/pti-o2imsdms:2.0.0
Issue-ID: INF-336
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I125f9f01661cc4618bf1d81f4e0fc59d46bb9d99
(cherry picked from commit
14fc8de3f80b6e1ab1e8351017383e99628cb8e3)
### Push O2 service images to local registry (with auth user admin)
```sh
### Push O2 service images to local registry (with auth user admin)
```sh
-sudo docker tag o2imsdms:latest registry.local:9001/admin/o2imsdms:0.1.4
-sudo docker image push registry.local:9001/admin/o2imsdms:0.1.4
+sudo docker tag o2imsdms:latest registry.local:9001/o-ran-sc/pti-o2imsdms:2.0.0
+sudo docker image push registry.local:9001/o-ran-sc/pti-o2imsdms:2.0.0
cd /home/sysadmin/
source /etc/platform/openrc
cat <<EOF>ocloud-override.yaml
cd /home/sysadmin/
source /etc/platform/openrc
cat <<EOF>ocloud-override.yaml
+imagePullSecrets:
+ - default-registry-key
+
o2ims:
serviceaccountname: admin-oran-o2
image:
o2ims:
serviceaccountname: admin-oran-o2
image:
- repository: registry.local:9001/admin/o2imsdms
- tag: 0.1.4
+ img_o2: registry.local:9001/o-ran-sc/pti-o2imsdms:2.0.0
+ img_postgres: postgres:9.6
+ img_redis: redis:alpine
pullPolicy: IfNotPresent
logginglevel: "DEBUG"
pullPolicy: IfNotPresent
logginglevel: "DEBUG"
app: o2api
spec:
serviceAccountName: {{ .Values.o2ims.serviceaccountname }}
app: o2api
spec:
serviceAccountName: {{ .Values.o2ims.serviceaccountname }}
- # imagePullSecrets:
- # - name: {{ .Values.o2ims.imagePullSecrets }}
+ {{- if .Values.imagePullSecrets }}
- - name: {{ .Values.o2ims.serviceaccountname }}-registry-secret
+ {{- range .Values.imagePullSecrets }}
+ - name: {{ . }}
+ {{- end }}
+ {{- end }}
{{- if .Values.o2ims.affinity }}
affinity:
{{ toYaml .Values.o2ims.affinity | indent 8 }}
{{- end }}
containers:
- name: postgres
{{- if .Values.o2ims.affinity }}
affinity:
{{ toYaml .Values.o2ims.affinity | indent 8 }}
{{- end }}
containers:
- name: postgres
+ image: "{{ .Values.o2ims.image.img_postgres }}"
ports:
- containerPort: 5432
env:
ports:
- containerPort: 5432
env:
- name: db-pv
mountPath: /var/lib/postgresql/data
- name: redis
- name: db-pv
mountPath: /var/lib/postgresql/data
- name: redis
+ image: "{{ .Values.o2ims.image.img_redis }}"
ports:
- containerPort: 6379
- name: o2pubsub
ports:
- containerPort: 6379
- name: o2pubsub
- image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
+ image: "{{ .Values.o2ims.image.img_o2 }}"
command: ["/bin/bash", "/opt/o2pubsub_start.sh"]
env:
- name: DB_HOST
command: ["/bin/bash", "/opt/o2pubsub_start.sh"]
env:
- name: DB_HOST
mountPath: /configs/smoca.crt
subPath: config.json
- name: watcher
mountPath: /configs/smoca.crt
subPath: config.json
- name: watcher
- image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
+ image: "{{ .Values.o2ims.image.img_o2 }}"
command: ["/bin/bash", "/opt/o2watcher_start.sh"]
env:
- name: API_HOST_EXTERNAL_FLOATING
command: ["/bin/bash", "/opt/o2watcher_start.sh"]
env:
- name: API_HOST_EXTERNAL_FLOATING
subPath: config.json
readOnly: true
- name: o2api
subPath: config.json
readOnly: true
- name: o2api
- image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
+ image: "{{ .Values.o2ims.image.img_o2 }}"
ports:
- containerPort: 80
env:
ports:
- containerPort: 80
env:
readOnly: true
{{- if .Values.o2dms.helm_cli_enable }}
- name: helmcli
readOnly: true
{{- if .Values.o2dms.helm_cli_enable }}
- name: helmcli
- image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
+ image: "{{ .Values.o2ims.image.img_o2 }}"
ports:
- containerPort: 22
env:
ports:
- containerPort: 22
env:
nameOverride: ""
fullnameOverride: ""
nameOverride: ""
fullnameOverride: ""
-applicationconfig: ""
-
-servercrt: ""
-
-serverkey: ""
-
-smocacrt: ""
+# The default value "" doesn't work with binaryData,
+# So generate the value with:
+# echo "" | base64
+# Cg==
+applicationconfig: Cg==
+servercrt: Cg==
+serverkey: Cg==
+smocacrt: Cg==
+# ImagePullSecrets for operator ServiceAccount, list of secrets in the same
+# namespace used to pull operator image. Must be set for any cluster configured
+# with private docker registry.
+imagePullSecrets:
+ - default-registry-key
+
o2ims:
serviceaccountname: admin-oran-o2
image:
o2ims:
serviceaccountname: admin-oran-o2
image:
- repository: registry.local:9001/admin/o2imsdms
- tag: 0.1.1
+ img_o2: nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms:2.0.0
+ img_postgres: postgres:9.6
+ img_redis: redis:alpine
pullPolicy: IfNotPresent
logginglevel: "WARNING"
pullPolicy: IfNotPresent
logginglevel: "WARNING"
cat <<EOF>o2service-override.yaml
cat <<EOF>o2service-override.yaml
+ imagePullSecrets:
+ - default-registry-key
+
o2ims:
serviceaccountname: admin-oran-o2
image:
o2ims:
serviceaccountname: admin-oran-o2
image:
- repository: nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms
- tag: 2.0.0
+ img_o2: nexus3.o-ran-sc.org:10004/o-ran-sc/pti-o2imsdms:2.0.0
+ img_postgres: postgres:9.6
+ img_redis: redis:alpine
pullPolicy: IfNotPresent
logginglevel: "DEBUG"
pullPolicy: IfNotPresent
logginglevel: "DEBUG"