Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | Copyright 2019-present Open Networking 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 | |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 17 | {{ tuple "ue" . | include "oaisim.service_account" }} |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 18 | --- |
| 19 | apiVersion: apps/v1 |
| 20 | kind: StatefulSet |
| 21 | metadata: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 22 | name: ue |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 23 | labels: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 24 | {{ tuple "ue" . | include "oaisim.metadata_labels" | indent 4 }} |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 25 | spec: |
| 26 | replicas: 1 |
Scott Baker | acbd36c | 2020-09-29 23:35:08 -0700 | [diff] [blame] | 27 | serviceName: oaisim-ue |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 28 | selector: |
| 29 | matchLabels: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 30 | {{ tuple "ue" . | include "oaisim.metadata_labels" | indent 6 }} |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 31 | template: |
| 32 | metadata: |
| 33 | labels: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 34 | {{ tuple "ue" . | include "oaisim.metadata_labels" | indent 8 }} |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 35 | spec: |
Hyunsun Moon | 43eadcc | 2019-08-20 16:16:08 -0600 | [diff] [blame] | 36 | {{- if .Values.nodeSelectors.enabled }} |
| 37 | nodeSelector: |
| 38 | {{ .Values.nodeSelectors.ue.label }}: {{ .Values.nodeSelectors.ue.value }} |
| 39 | {{- end }} |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 40 | serviceAccountName: ue |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 41 | hostNetwork: true |
| 42 | initContainers: |
| 43 | - name: ue-dep-check |
| 44 | image: {{ .Values.images.tags.dep_check | quote }} |
| 45 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 46 | securityContext: |
| 47 | allowPrivilegeEscalation: false |
| 48 | readOnlyRootFilesystem: false |
| 49 | runAsUser: 0 |
| 50 | env: |
| 51 | - name: POD_NAME |
| 52 | valueFrom: |
| 53 | fieldRef: |
| 54 | apiVersion: v1 |
| 55 | fieldPath: metadata.name |
| 56 | - name: NAMESPACE |
| 57 | valueFrom: |
| 58 | fieldRef: |
| 59 | apiVersion: v1 |
| 60 | fieldPath: metadata.namespace |
| 61 | - name: PATH |
| 62 | value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ |
| 63 | - name: COMMAND |
| 64 | value: "echo done" |
| 65 | - name: DEPENDENCY_POD_JSON |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 66 | value: '[{"labels": {"app": "enb"}, "requireSameNode": true}]' |
| 67 | - name: DEPENDENCY_JOBS |
| 68 | value: ue-setup-if |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 69 | command: |
| 70 | - kubernetes-entrypoint |
| 71 | volumeMounts: |
| 72 | [] |
| 73 | - name: ue-gen-usim |
| 74 | image: {{ .Values.images.tags.ue | quote }} |
| 75 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 76 | command: |
| 77 | - /opt/oaisim/ue/scripts/ue-gen-usim.sh |
| 78 | volumeMounts: |
| 79 | - name: script |
| 80 | mountPath: /opt/oaisim/ue/scripts/ue-gen-usim.sh |
| 81 | subPath: ue-gen-usim.sh |
| 82 | - name: config |
| 83 | mountPath: /opt/oaisim/ue/config |
| 84 | - name: pod-share |
| 85 | mountPath: /etc/oaisim/ue |
| 86 | - name: ue-init |
| 87 | image: {{ .Values.images.tags.ue | quote }} |
| 88 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 89 | securityContext: |
| 90 | privileged: true |
| 91 | command: |
| 92 | - /opt/oaisim/ue/scripts/ue-init.sh |
| 93 | volumeMounts: |
| 94 | - name: script |
| 95 | mountPath: /opt/oaisim/ue/scripts/ue-init.sh |
| 96 | subPath: ue-init.sh |
| 97 | containers: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 98 | - name: ue |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 99 | image: {{ .Values.images.tags.ue | quote }} |
| 100 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 101 | securityContext: |
| 102 | privileged: true |
| 103 | command: |
| 104 | - /opt/oaisim/ue/scripts/ue-run.sh |
| 105 | - start |
| 106 | lifecycle: |
| 107 | preStop: |
| 108 | exec: |
| 109 | command: |
| 110 | - /opt/oaisim/enb/scripts/ue-run.sh |
| 111 | - stop |
| 112 | env: |
| 113 | - name: UE_LOCAL_IP |
| 114 | valueFrom: |
| 115 | fieldRef: |
| 116 | fieldPath: status.podIP |
| 117 | volumeMounts: |
| 118 | - name: script |
| 119 | mountPath: /opt/oaisim/ue/scripts/ue-run.sh |
| 120 | subPath: ue-run.sh |
| 121 | - name: config |
| 122 | mountPath: /opt/oaisim/ue/config |
| 123 | - name: pod-share |
| 124 | mountPath: /etc/oaisim/ue |
| 125 | volumes: |
| 126 | - name: config |
| 127 | configMap: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 128 | name: ue |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 129 | defaultMode: 420 |
| 130 | - name: script |
| 131 | configMap: |
Hyunsun Moon | 1015230 | 2019-10-24 20:23:35 -0500 | [diff] [blame] | 132 | name: ue |
Hyunsun Moon | ed19c09 | 2019-07-10 15:24:45 -0600 | [diff] [blame] | 133 | defaultMode: 493 |
| 134 | - name: pod-share |
| 135 | emptyDir: {} |