Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 1 | {{/* |
| 2 | Copyright 2019-present Open Networking Foundation |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 3 | |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 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 |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 7 | |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 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 | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 17 | {{ tuple "mme" . | include "omec-control-plane.service_account" }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 18 | --- |
| 19 | apiVersion: apps/v1 |
| 20 | kind: StatefulSet |
| 21 | metadata: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 22 | name: mme |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 23 | labels: |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 24 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 25 | spec: |
| 26 | replicas: 1 |
| 27 | selector: |
| 28 | matchLabels: |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 29 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 6 }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 30 | template: |
| 31 | metadata: |
| 32 | labels: |
Hyunsun Moon | 7a007bb | 2019-08-19 16:41:36 -0600 | [diff] [blame] | 33 | {{ tuple "mme" . | include "omec-control-plane.metadata_labels" | indent 8 }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 34 | spec: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 35 | {{- if .Values.nodeSelectors.enabled }} |
| 36 | nodeSelector: |
| 37 | {{ .Values.nodeSelectors.mme.label }}: {{ .Values.nodeSelectors.mme.value }} |
| 38 | {{- end }} |
| 39 | serviceAccountName: mme |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 40 | initContainers: |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 41 | {{- if not (hasKey .Values.config.spgwc "mmeAddr") }} |
| 42 | - name: mme-configmap-mme-ip |
| 43 | image: {{ .Values.images.tags.init | quote }} |
| 44 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 45 | env: |
| 46 | - name: NAMESPACE |
| 47 | valueFrom: |
| 48 | fieldRef: |
| 49 | apiVersion: v1 |
| 50 | fieldPath: metadata.namespace |
| 51 | - name: POD_IP |
| 52 | valueFrom: |
| 53 | fieldRef: |
| 54 | fieldPath: status.podIP |
| 55 | command: ["/opt/mme/scripts/mme-ip.sh"] |
| 56 | volumeMounts: |
| 57 | - name: scripts |
| 58 | mountPath: /opt/mme/scripts/mme-ip.sh |
| 59 | subPath: mme-ip.sh |
| 60 | {{- end }} |
Hyunsun Moon | ece8698 | 2019-09-27 17:44:59 -0500 | [diff] [blame] | 61 | - name: mme-load-sctp-module |
| 62 | image: {{ .Values.images.tags.init | quote }} |
| 63 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
| 64 | securityContext: |
| 65 | privileged: true |
| 66 | runAsUser: 0 |
| 67 | command: ["bash", "-xc"] |
| 68 | args: |
| 69 | - > |
| 70 | if chroot /mnt/host-rootfs modinfo nf_conntrack_proto_sctp > /dev/null 2>&1; then \ |
| 71 | chroot /mnt/host-rootfs modprobe nf_conntrack_proto_sctp; \ |
| 72 | fi |
| 73 | volumeMounts: |
| 74 | - name: host-rootfs |
| 75 | mountPath: /mnt/host-rootfs |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 76 | - name: mme-dep-check |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 77 | image: {{ .Values.images.tags.depCheck | quote }} |
| 78 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 79 | securityContext: |
| 80 | allowPrivilegeEscalation: false |
| 81 | readOnlyRootFilesystem: false |
| 82 | runAsUser: 0 |
| 83 | env: |
| 84 | - name: POD_NAME |
| 85 | valueFrom: |
| 86 | fieldRef: |
| 87 | apiVersion: v1 |
| 88 | fieldPath: metadata.name |
| 89 | - name: NAMESPACE |
| 90 | valueFrom: |
| 91 | fieldRef: |
| 92 | apiVersion: v1 |
| 93 | fieldPath: metadata.namespace |
| 94 | - name: PATH |
| 95 | value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ |
| 96 | - name: COMMAND |
| 97 | value: "echo done" |
| 98 | - name: DEPENDENCY_POD_JSON |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 99 | value: '[{"labels": {"app": "hss"}, "requireSameNode": false}]' |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 100 | # add dependency job for make_certs.sh |
| 101 | command: |
| 102 | - kubernetes-entrypoint |
| 103 | volumeMounts: |
| 104 | [] |
| 105 | - name: mme-init |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 106 | image: {{ .Values.images.tags.mme | quote }} |
| 107 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 108 | command: ["/opt/mme/scripts/mme-init.sh"] |
| 109 | env: |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 110 | - name: POD_IP |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 111 | valueFrom: |
| 112 | fieldRef: |
| 113 | fieldPath: status.podIP |
| 114 | volumeMounts: |
| 115 | - name: scripts |
| 116 | mountPath: /opt/mme/scripts/mme-init.sh |
| 117 | subPath: mme-init.sh |
| 118 | - name: configs |
| 119 | mountPath: /opt/mme/config |
| 120 | - name: shared-data |
| 121 | mountPath: /opt/mme/config/shared |
| 122 | containers: |
| 123 | - name: mme-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 124 | image: {{ .Values.images.tags.mme | quote }} |
| 125 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 126 | command: ["bash", "-xc"] |
| 127 | args: |
| 128 | - /opt/mme/scripts/mme-run.sh mme-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 129 | {{- if .Values.resources.enabled }} |
| 130 | resources: |
| 131 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 132 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 133 | volumeMounts: |
| 134 | - name: scripts |
| 135 | mountPath: /opt/mme/scripts/mme-run.sh |
| 136 | subPath: mme-run.sh |
| 137 | - name: shared-data |
| 138 | mountPath: /opt/mme/config/shared |
Ajay Lotan Thakur | ff2cad6 | 2019-12-01 04:41:58 -0800 | [diff] [blame] | 139 | - name: configs |
| 140 | mountPath: /opt/mme/config |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 141 | - name: shared-app |
| 142 | mountPath: /tmp |
| 143 | - name: s1ap-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 144 | image: {{ .Values.images.tags.mme | quote }} |
| 145 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 146 | command: ["bash", "-xc"] |
| 147 | args: |
| 148 | - /opt/mme/scripts/mme-run.sh s1ap-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 149 | {{- if .Values.resources.enabled }} |
| 150 | resources: |
| 151 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 152 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 153 | volumeMounts: |
| 154 | - name: scripts |
| 155 | mountPath: /opt/mme/scripts/mme-run.sh |
| 156 | subPath: mme-run.sh |
| 157 | - name: shared-data |
| 158 | mountPath: /opt/mme/config/shared |
| 159 | - name: shared-app |
| 160 | mountPath: /tmp |
| 161 | - name: s6a-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 162 | image: {{ .Values.images.tags.mme | quote }} |
| 163 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 164 | command: ["bash", "-xc"] |
| 165 | args: |
| 166 | - /opt/mme/scripts/mme-run.sh s6a-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 167 | {{- if .Values.resources.enabled }} |
| 168 | resources: |
| 169 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 170 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 171 | volumeMounts: |
| 172 | - name: scripts |
| 173 | mountPath: /opt/mme/scripts/mme-run.sh |
| 174 | subPath: mme-run.sh |
| 175 | - name: shared-data |
| 176 | mountPath: /opt/mme/config/shared |
| 177 | - name: shared-app |
| 178 | mountPath: /tmp |
| 179 | - name: s11-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 180 | image: {{ .Values.images.tags.mme | quote }} |
| 181 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 182 | command: ["bash", "-xc"] |
| 183 | args: |
| 184 | - /opt/mme/scripts/mme-run.sh s11-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 185 | {{- if .Values.resources.enabled }} |
| 186 | resources: |
| 187 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 188 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 189 | volumeMounts: |
| 190 | - name: scripts |
| 191 | mountPath: /opt/mme/scripts/mme-run.sh |
| 192 | subPath: mme-run.sh |
| 193 | - name: shared-data |
| 194 | mountPath: /opt/mme/config/shared |
| 195 | - name: shared-app |
| 196 | mountPath: /tmp |
| 197 | volumes: |
| 198 | - name: scripts |
| 199 | configMap: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 200 | name: mme |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 201 | defaultMode: 493 |
| 202 | - name: configs |
| 203 | configMap: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 204 | name: mme |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 205 | defaultMode: 420 |
| 206 | - name: shared-data |
| 207 | emptyDir: {} |
| 208 | - name: shared-app |
| 209 | emptyDir: {} |
Hyunsun Moon | ece8698 | 2019-09-27 17:44:59 -0500 | [diff] [blame] | 210 | - name: host-rootfs |
| 211 | hostPath: |
| 212 | path: / |