value: o2ims123
- name: POSTGRES_USER
value: o2ims
+ - name: PGDATA
+ value: /var/lib/postgresql/data/pgdata
command: ["/bin/bash", "/opt/postgres_start.sh"]
volumeMounts:
- name: scripts
mountPath: /opt
+ - name: db-pv
+ mountPath: /var/lib/postgresql/data
- name: redis
image: redis:alpine
ports:
mountPath: /configs/server.key
subPath: config.json
readOnly: true
+ {{- if .Values.o2dms.helm_cli_enable }}
- name: helmcli
image: "{{ .Values.o2ims.image.repository }}:{{ .Values.o2ims.image.tag }}"
ports:
volumeMounts:
- name: scripts
mountPath: /opt
+ {{- end }}
volumes:
- name: scripts
configMap:
- configMap:
name: {{ .Chart.Name }}-smocacrt
name: smocacrt
+ - name: db-pv
+ persistentVolumeClaim:
+ claimName: {{ .Chart.Name }}-db-pv
---
--- /dev/null
+# Copyright (C) 2022 Wind River Systems, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: {{ .Chart.Name }}-db-pv
+ namespace: {{ .Values.global.namespace }}
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: {{ .Values.db.storageSize }}
+ storageClassName: general
+---
\ No newline at end of file
kind: ServiceAccount
metadata:
name: {{ .Values.o2ims.serviceaccountname }}
- namespace: oran-o2
+ namespace: {{ .Values.global.namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
name: {{ .Values.o2ims.serviceaccountname }}
subjects:
- kind: ServiceAccount
- namespace: oran-o2
+ namespace: {{ .Values.global.namespace }}
name: {{ .Values.o2ims.serviceaccountname }}
roleRef:
apiGroup: rbac.authorization.k8s.io