b5d8decc6f9263717265dcde939de16b8832a44e
[it/dep.git] / smo-install / oran_oom / du-simulator / templates / deployment.yaml
1 {{- range $i, $du := .Values.dus }}
2 ---
3 apiVersion: apps/v1
4 kind: Deployment
5 metadata:
6   name: {{ $du.name }}
7   labels:
8     sim-name: {{ $du.name }}
9     release: {{ $.Release.Name }}
10     chart: {{ $.Chart.Name }}
11 spec:
12   replicas: 1
13   selector:
14     matchLabels:
15       sim-name: {{ $du.name }}
16   template:
17     metadata:
18       labels:
19         sim-name: {{ $du.name }}
20         release: {{ $.Release.Name }}
21         chart: {{ $.Chart.Name }}
22       annotations:
23         checksum/config: {{ print $du | sha256sum }}
24     spec:    
25       hostname: "{{ $du.name }}"
26       containers:
27         - name: {{ $.Chart.Name }}
28           image: "{{ $.Values.image.repository }}/{{ $.Values.image.name}}:{{ $.Values.image.tag }}"
29           imagePullPolicy: {{ $.Values.image.pullPolicy }}
30           tty: true
31           stdin: true
32           envFrom:
33             - configMapRef:
34                 name: {{ $du.name }}-configmapenv
35           volumeMounts:
36             - name: {{ $du.name }}-config-volume
37               subPath: config.json
38               mountPath: /opt/dev/ntsim-ng/config/config.json
39             - name: {{ $du.name }}-config-volume
40               subPath: o-ran-sc-du-hello-world-running.xml
41               mountPath: /opt/dev/deploy/data/o-ran-sc-du-hello-world-running.xml
42             - name: {{ $du.name }}-config-volume
43               subPath: o-ran-sc-du-hello-world-operational.xml
44               mountPath: /opt/dev/deploy/data/o-ran-sc-du-hello-world-operational.xml
45           securityContext:
46             capabilities:
47               add:
48                 - SYS_ADMIN
49                 - SYS_PTRACE
50       volumes: 
51         - name: {{ $du.name }}-config-volume
52           configMap:
53             name: {{ $du.name }}-configmap
54             items:
55               - key: config.json
56                 path: config.json
57               - key: o-ran-sc-du-hello-world-running.xml
58                 path: o-ran-sc-du-hello-world-running.xml
59               - key: o-ran-sc-du-hello-world-operational.xml
60                 path: o-ran-sc-du-hello-world-operational.xml
61
62 {{- end }}