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