d1a646bfdea1628417fedf33a9e9eb63bf808e0f
[it/dep.git] / smo-install / oran_oom / a1controller / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2020 Nordix Foundation.                                      #
3 #                                                                              #
4 #   Licensed under the Apache License, Version 2.0 (the "License");            #
5 #   you may not use this file except in compliance with the License.           #
6 #   You may obtain a copy of the License at                                    #
7 #                                                                              #
8 #       http://www.apache.org/licenses/LICENSE-2.0                             #
9 #                                                                              #
10 #   Unless required by applicable law or agreed to in writing, software        #
11 #   distributed under the License is distributed on an "AS IS" BASIS,          #
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
13 #   See the License for the specific language governing permissions and        #
14 #   limitations under the License.                                             #
15 ################################################################################
16
17 kind: Deployment
18 apiVersion: apps/v1
19 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 spec:
21   replicas: {{ .Values.replicaCount }}
22   selector: {{- include "common.selectors" . | nindent 4 }}
23   template:
24     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
25     spec:
26       hostname: {{ include "common.name" . }}
27       containers:
28         - name: {{ include "common.containername" . }}
29           image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
30           imagePullPolicy: {{ .Values.imagePullPolicy }}
31           command:
32             - /opt/onap/sdnc/bin/startODL.sh
33           ports: {{- include "common.containerPorts" . | nindent 10 }}
34           {{- include "common.tcpsocketProbes" . | nindent 10 }}
35           env:
36             - name: MYSQL_ROOT_PASSWORD
37               value: 'itsASecret'
38             - name: MYSQL_USER
39               value: 'sdnctl'
40             - name: MYSQL_PASSWORD
41               value: 'gamma'
42             - name: MYSQL_DATABASE
43               value: 'sdnctl'
44             - name: SDNC_CONFIG_DIR
45               value: '/opt/onap/sdnc/data/properties'
46             - name: SDNC_BIN
47               value: '/opt/onap/sdnc/bin'
48             - name: ODL_CERT_DIR
49               value: '/tmp'
50             - name: ODL_ADMIN_USERNAME
51               value: admin
52             - name: ODL_ADMIN_PASSWORD
53               value: 'Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U'
54             - name: ODL_USERNAME
55               value: admin
56             - name: ODL_PASSWORD
57               value: 'Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U'
58             - name: SDNC_DB_INIT
59               value: 'true'
60             - name: A1_TRUSTSTORE_PASSWORD
61               value: 'a1adapter'
62             - name: AAI_TRUSTSTORE_PASSWORD
63               value: 'changeit'
64 ---
65 apiVersion: apps/v1
66 kind: Deployment
67 metadata: {{- include "common.resourceMetadata" (dict "suffix" "db" "dot" .  ) | nindent 2 }}
68 {{ $selectorsCtx := dict "matchLabels" (dict "app.kubernetes.io/component" "db") "dot" . }}
69 {{ $templateMetadataCtx := dict "labels" (dict "app.kubernetes.io/component" "db") "dot" . }}
70 spec:
71   selector: {{- include "common.selectors" $selectorsCtx | nindent 4 }}
72   template:
73     metadata: {{- include "common.templateMetadata" $templateMetadataCtx | nindent 6 }}
74     spec:
75       containers:
76         - name: sdnc-db-container
77           image: nexus3.o-ran-sc.org:10001/mariadb:10.5
78           imagePullPolicy: IfNotPresent
79           env:
80             - name: MYSQL_ROOT_HOST
81               value: '%'
82             - name: MYSQL_ROOT_PASSWORD
83               value: 'itsASecret'
84           ports:
85             - containerPort: 3306