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