blob: aab2e15a50a4388db242c029cfdf1b7efb702e59 [file] [log] [blame]
Wei-Yu Chen16d59142022-06-08 18:25:01 +08001{{/*
2# Copyright 2022-present Open Networking Foundation
3
4# SPDX-License-Identifier: Apache-2.0
5*/}}
6
7apiVersion: apps/v1
8kind: Deployment
9metadata:
10 name: {{ include "aether-enodebd.fullname" . }}
11 labels:
12 {{- include "aether-enodebd.labels" . | nindent 4 }}
13spec:
14 {{- if not .Values.autoscaling.enabled }}
15 replicas: {{ .Values.replicaCount }}
16 {{- end }}
17 selector:
18 matchLabels:
19 {{- include "aether-enodebd.selectorLabels" . | nindent 6 }}
20 template:
21 metadata:
22 {{- with .Values.podAnnotations }}
23 annotations:
24 {{- toYaml . | nindent 8 }}
25 {{- end }}
26 labels:
27 {{- include "aether-enodebd.selectorLabels" . | nindent 8 }}
28 spec:
29 {{- with .Values.imagePullSecrets }}
30 imagePullSecrets:
31 {{- toYaml . | nindent 8 }}
32 {{- end }}
33 containers:
34 - name: {{ .Chart.Name }}
35 securityContext:
36 {{- toYaml .Values.securityContext | nindent 12 }}
37 image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
38 imagePullPolicy: {{ .Values.image.pullPolicy }}
39 ports:
40 {{- with .Values.ports }}
41 {{- range $key, $port := . }}
42 - name: {{ $key }}
43 {{ toYaml $port | nindent 14 }}
44 {{- end }}
45 {{- end }}
46 resources:
47 {{- toYaml .Values.resources | nindent 12 }}
48 volumeMounts:
49 - name: config-volume
50 mountPath: /opt/enodebd/magma_configs/enodebd.yml
51 subPath: enodebd.yml
52 volumes:
53 - name: config-volume
54 configMap:
55 name: {{ template "aether-enodebd.fullname" . }}
56 {{- with .Values.nodeSelector }}
57 nodeSelector:
58 {{- toYaml . | nindent 8 }}
59 {{- end }}
60 {{- with .Values.affinity }}
61 affinity:
62 {{- toYaml . | nindent 8 }}
63 {{- end }}
64 {{- with .Values.tolerations }}
65 tolerations:
66 {{- toYaml . | nindent 8 }}
67 {{- end }}