808cb9e40a76bcf8c6cf80c6510afce7d31e9130
[it/dep.git] / smo-install / oran_oom / ru-simulator / templates / deployment.yaml
1 {{- range $i, $ru := .Values.rus }}
2 ---
3 apiVersion: apps/v1
4 kind: Deployment
5 metadata:
6   name: {{ $ru.name }}
7   labels:
8     sim-name: {{ $ru.name }}
9     release: {{ $.Release.Name }}
10     chart: {{ $.Chart.Name }}
11 spec:
12   replicas: 1
13   selector:
14     matchLabels:
15       sim-name: {{ $ru.name }}
16   template:
17     metadata:
18       labels:
19         sim-name: {{ $ru.name }}
20         release: {{ $.Release.Name }}
21         chart: {{ $.Chart.Name }}
22       annotations:
23         checksum/config: {{ print $ru | sha256sum }}
24     spec:
25       hostname: "{{ $ru.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: {{ $ru.name }}-configmapenv
35           volumeMounts:
36             - name: {{ $ru.name }}-config-volume
37               subPath: config.json
38               mountPath: /opt/dev/ntsim-ng/config/config.json
39             - name: {{ $ru.name }}-config-volume
40               subPath: ietf-hardware-operational.json
41               mountPath: /opt/dev/deploy/data/ietf-hardware-operational.json
42             - name: {{ $ru.name }}-config-volume
43               subPath: ietf-hardware-running.json
44               mountPath: /opt/dev/deploy/data/ietf-hardware-running.json
45             - name: {{ $ru.name }}-config-volume
46               subPath: ietf-interfaces-operational.xml
47               mountPath: /opt/dev/deploy/data/ietf-interfaces-operational.xml
48             - name: {{ $ru.name }}-config-volume
49               subPath: ietf-interfaces-running.xml
50               mountPath: /opt/dev/deploy/data/ietf-interfaces-running.xml
51           securityContext:
52             capabilities:
53               add:
54                 - SYS_ADMIN
55                 - SYS_PTRACE
56       volumes:
57         - name: {{ $ru.name }}-config-volume
58           configMap:
59             name: {{ $ru.name }}-configmap
60             items:
61               - key: config.json
62                 path: config.json
63               - key: ietf-hardware-operational.json
64                 path: ietf-hardware-operational.json
65               - key: ietf-hardware-running.json
66                 path: ietf-hardware-running.json
67               - key: ietf-interfaces-operational.xml
68                 path: ietf-interfaces-operational.xml
69               - key: ietf-interfaces-running.xml
70                 path: ietf-interfaces-running.xml
71
72
73 {{- end }}