Zack Williams | c8c32e0 | 2018-11-04 14:43:21 -0700 | [diff] [blame] | 1 | --- |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 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 |
| 7 | # |
| 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 | apiVersion: v1 |
| 17 | kind: Service |
| 18 | metadata: |
| 19 | name: vcore |
| 20 | namespace: {{ .Values.global.namespace }} |
| 21 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 22 | labels: |
| 23 | name: vcore |
| 24 | spec: |
| 25 | clusterIP: None |
| 26 | ports: |
| 27 | - name: rest |
| 28 | port: 8880 |
| 29 | targetPort: 8880 |
| 30 | - name: mystery |
| 31 | port: 18880 |
| 32 | targetPort: 18880 |
| 33 | - name: grpc |
| 34 | port: 50556 |
| 35 | targetPort: 50556 |
| 36 | selector: |
| 37 | app: vcore |
| 38 | --- |
Gopinath Taget | 7f357cf | 2018-07-03 12:34:38 -0700 | [diff] [blame] | 39 | apiVersion: apps/v1 |
| 40 | kind: StatefulSet |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 41 | metadata: |
| 42 | name: vcore |
| 43 | namespace: {{ .Values.global.namespace }} |
| 44 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 45 | spec: |
Gopinath Taget | 7f357cf | 2018-07-03 12:34:38 -0700 | [diff] [blame] | 46 | serviceName: vcore |
Gopinath Taget | fff8934 | 2018-04-16 12:12:17 -0700 | [diff] [blame] | 47 | replicas: {{ .Values.replicas.vcore }} |
Gopinath Taget | 7f357cf | 2018-07-03 12:34:38 -0700 | [diff] [blame] | 48 | updateStrategy: |
| 49 | type: RollingUpdate |
| 50 | selector: |
| 51 | matchLabels: |
| 52 | app: vcore |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 53 | template: |
| 54 | metadata: |
| 55 | labels: |
| 56 | app: vcore |
| 57 | annotations: |
Gopinath Taget | 7f357cf | 2018-07-03 12:34:38 -0700 | [diff] [blame] | 58 | cni: "calico" |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 59 | spec: |
Gopinath Taget | 7f357cf | 2018-07-03 12:34:38 -0700 | [diff] [blame] | 60 | terminationGracePeriodSeconds: 0 |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 61 | serviceAccountName: {{ .Values.global.namespace }}-serviceaccount |
| 62 | containers: |
| 63 | - name: voltha |
Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 64 | image: {{ .Values.global.registry }}{{ .Values.images.vcore.repository }}:{{ tpl .Values.images.vcore.tag . }} |
| 65 | imagePullPolicy: {{ .Values.images.vcore.pullPolicy }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 66 | env: |
| 67 | - name: NAMESPACE |
| 68 | valueFrom: |
| 69 | fieldRef: |
| 70 | fieldPath: metadata.namespace |
| 71 | args: |
Gopinath Taget | 5e49fe3 | 2018-06-25 17:02:05 -0700 | [diff] [blame] | 72 | {{ include "voltha-vcore.cmd" . | indent 12 }} |
Gopinath Taget | e2dff4d | 2018-03-15 17:22:28 -0700 | [diff] [blame] | 73 | ports: |
| 74 | - containerPort: 8880 |
| 75 | name: rest-port |
| 76 | - containerPort: 18880 |
| 77 | name: mystery-port |
| 78 | - containerPort: 50556 |
| 79 | name: grpc-port |
Zack Williams | c8c32e0 | 2018-11-04 14:43:21 -0700 | [diff] [blame] | 80 | volumeMounts: |
| 81 | - name: vcore-logconfig-vol |
| 82 | mountPath: /voltha/voltha/logconfig.yml |
| 83 | subPath: logconfig.yml |
| 84 | volumes: |
| 85 | - name: vcore-logconfig-vol |
| 86 | configMap: |
| 87 | name: vcore-logconfig |
| 88 | items: |
| 89 | - key: logconfig |
| 90 | path: logconfig.yml |