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 | ed24cac | 2019-08-26 20:52:20 -0500 | [diff] [blame^] | 30 | serviceName: mme |
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 | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 62 | - name: mme-dep-check |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 63 | image: {{ .Values.images.tags.depCheck | quote }} |
| 64 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 65 | securityContext: |
| 66 | allowPrivilegeEscalation: false |
| 67 | readOnlyRootFilesystem: false |
| 68 | runAsUser: 0 |
| 69 | env: |
| 70 | - name: POD_NAME |
| 71 | valueFrom: |
| 72 | fieldRef: |
| 73 | apiVersion: v1 |
| 74 | fieldPath: metadata.name |
| 75 | - name: NAMESPACE |
| 76 | valueFrom: |
| 77 | fieldRef: |
| 78 | apiVersion: v1 |
| 79 | fieldPath: metadata.namespace |
| 80 | - name: PATH |
| 81 | value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/ |
| 82 | - name: COMMAND |
| 83 | value: "echo done" |
| 84 | - name: DEPENDENCY_POD_JSON |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 85 | value: '[{"labels": {"app": "hss"}, "requireSameNode": false}]' |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 86 | # add dependency job for make_certs.sh |
| 87 | command: |
| 88 | - kubernetes-entrypoint |
| 89 | volumeMounts: |
| 90 | [] |
| 91 | - name: mme-init |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 92 | image: {{ .Values.images.tags.mme | quote }} |
| 93 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 94 | command: ["/opt/mme/scripts/mme-init.sh"] |
| 95 | env: |
Hyunsun Moon | 16d7092 | 2019-08-25 04:57:25 -0500 | [diff] [blame] | 96 | - name: POD_IP |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 97 | valueFrom: |
| 98 | fieldRef: |
| 99 | fieldPath: status.podIP |
| 100 | volumeMounts: |
| 101 | - name: scripts |
| 102 | mountPath: /opt/mme/scripts/mme-init.sh |
| 103 | subPath: mme-init.sh |
| 104 | - name: configs |
| 105 | mountPath: /opt/mme/config |
| 106 | - name: shared-data |
| 107 | mountPath: /opt/mme/config/shared |
| 108 | containers: |
| 109 | - name: mme-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 110 | image: {{ .Values.images.tags.mme | quote }} |
| 111 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 112 | command: ["bash", "-xc"] |
| 113 | args: |
| 114 | - /opt/mme/scripts/mme-run.sh mme-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 115 | {{- if .Values.resources.enabled }} |
| 116 | resources: |
| 117 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 118 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 119 | volumeMounts: |
| 120 | - name: scripts |
| 121 | mountPath: /opt/mme/scripts/mme-run.sh |
| 122 | subPath: mme-run.sh |
| 123 | - name: shared-data |
| 124 | mountPath: /opt/mme/config/shared |
| 125 | - name: shared-app |
| 126 | mountPath: /tmp |
| 127 | - name: s1ap-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 128 | image: {{ .Values.images.tags.mme | quote }} |
| 129 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 130 | command: ["bash", "-xc"] |
| 131 | args: |
| 132 | - /opt/mme/scripts/mme-run.sh s1ap-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 133 | {{- if .Values.resources.enabled }} |
| 134 | resources: |
| 135 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 136 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 137 | volumeMounts: |
| 138 | - name: scripts |
| 139 | mountPath: /opt/mme/scripts/mme-run.sh |
| 140 | subPath: mme-run.sh |
| 141 | - name: shared-data |
| 142 | mountPath: /opt/mme/config/shared |
| 143 | - name: shared-app |
| 144 | mountPath: /tmp |
| 145 | - name: s6a-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 146 | image: {{ .Values.images.tags.mme | quote }} |
| 147 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 148 | command: ["bash", "-xc"] |
| 149 | args: |
| 150 | - /opt/mme/scripts/mme-run.sh s6a-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 151 | {{- if .Values.resources.enabled }} |
| 152 | resources: |
| 153 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 154 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 155 | volumeMounts: |
| 156 | - name: scripts |
| 157 | mountPath: /opt/mme/scripts/mme-run.sh |
| 158 | subPath: mme-run.sh |
| 159 | - name: shared-data |
| 160 | mountPath: /opt/mme/config/shared |
| 161 | - name: shared-app |
| 162 | mountPath: /tmp |
| 163 | - name: s11-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 164 | image: {{ .Values.images.tags.mme | quote }} |
| 165 | imagePullPolicy: {{ .Values.images.pullPolicy }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 166 | command: ["bash", "-xc"] |
| 167 | args: |
| 168 | - /opt/mme/scripts/mme-run.sh s11-app |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 169 | {{- if .Values.resources.enabled }} |
| 170 | resources: |
| 171 | {{ toYaml .Values.resources.mme | indent 10 }} |
| 172 | {{- end }} |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 173 | volumeMounts: |
| 174 | - name: scripts |
| 175 | mountPath: /opt/mme/scripts/mme-run.sh |
| 176 | subPath: mme-run.sh |
| 177 | - name: shared-data |
| 178 | mountPath: /opt/mme/config/shared |
| 179 | - name: shared-app |
| 180 | mountPath: /tmp |
| 181 | volumes: |
| 182 | - name: scripts |
| 183 | configMap: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 184 | name: mme |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 185 | defaultMode: 493 |
| 186 | - name: configs |
| 187 | configMap: |
Hyunsun Moon | 06f9855 | 2019-08-15 13:44:47 -0600 | [diff] [blame] | 188 | name: mme |
Hyunsun Moon | 636e17d | 2019-07-03 12:52:15 -0500 | [diff] [blame] | 189 | defaultMode: 420 |
| 190 | - name: shared-data |
| 191 | emptyDir: {} |
| 192 | - name: shared-app |
| 193 | emptyDir: {} |