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