X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=simulators%2Fe2sim%2Fhelm%2Fe2sim%2Ftemplates%2Fdeployment.yaml;fp=simulators%2Fe2sim%2Fhelm%2Fe2sim%2Ftemplates%2Fdeployment.yaml;h=294c7780d76ae43294816106203820a156b65edf;hb=c5fa07bcd8cbd614bcd813cac698385b789bcfcb;hp=0000000000000000000000000000000000000000;hpb=59f84608ec15c016958a6e0e0ddd813f376c0925;p=it%2Ftest.git diff --git a/simulators/e2sim/helm/e2sim/templates/deployment.yaml b/simulators/e2sim/helm/e2sim/templates/deployment.yaml new file mode 100644 index 0000000..294c778 --- /dev/null +++ b/simulators/e2sim/helm/e2sim/templates/deployment.yaml @@ -0,0 +1,79 @@ +{{/* + Copyright (c) 2019 AT&T Intellectual Property. + Copyright (c) 2019 Nokia. + + 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: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "e2sim.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ include "e2sim.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + spec: + hostNetwork: true + containers: + - name: {{ include "e2sim.name" . }} + image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /e2sim-run.sh + ports: + - containerPort: {{ .Values.service.port }} + env: + - name: E2SIM_NETWORK_TYPE + value: {{ .Values.e2sim.network.type | default "host" }} + - name: E2SIM_PORT + value: {{ .Values.e2sim.network.port | default 36422 |quote}} + - name: E2SIM_BIND_ADDR + value: {{ .Values.e2sim.network.address }} + - name: E2SIM_BIND_IF + value: {{ .Values.e2sim.network.interface }} + - name: E2SIM_BIND_AF + value: {{ .Values.e2sim.network.addressFamily | default "inet" }} + volumeMounts: + - name: dshm + mountPath: /dev/shm + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: e2sim-bin + subPath: e2sim-run.sh + mountPath: /e2sim-run.sh + resources: + volumes: + - name: dshm + emptyDir: + medium: Memory + - name: localtime + hostPath: + path: /etc/localtime + - name: e2sim-bin + configMap: + name: configmap-e2sim-bin + defaultMode: 0755 + imagePullSecrets: + - name: {{ .Values.image.repositoryCred }} +