Zack Williams | 41513bf | 2018-07-07 20:08:35 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 14 | apiVersion: v1 |
| 15 | kind: Service |
| 16 | metadata: |
| 17 | name: vcore |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 18 | namespace: voltha |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 19 | labels: |
| 20 | name: vcore |
| 21 | spec: |
| 22 | clusterIP: None |
| 23 | ports: |
| 24 | - name: rest |
| 25 | port: 8880 |
| 26 | targetPort: 8880 |
| 27 | - name: mystery |
| 28 | port: 18880 |
| 29 | targetPort: 18880 |
| 30 | - name: grpc |
| 31 | port: 50556 |
| 32 | targetPort: 50556 |
| 33 | selector: |
| 34 | app: vcore |
| 35 | --- |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 36 | apiVersion: apps/v1 |
| 37 | kind: StatefulSet |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 38 | metadata: |
| 39 | name: vcore |
Richard Jankowski | d445438 | 2018-02-08 16:21:43 -0500 | [diff] [blame] | 40 | namespace: voltha |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 41 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 42 | serviceName: vcore |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 43 | replicas: 3 |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 44 | updateStrategy: |
| 45 | type: RollingUpdate |
| 46 | selector: |
| 47 | matchLabels: |
| 48 | app: vcore |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 49 | template: |
| 50 | metadata: |
| 51 | labels: |
| 52 | app: vcore |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 53 | annotations: |
Stephane Barbarie | 2d4e07f | 2018-03-26 16:46:45 -0400 | [diff] [blame] | 54 | cni: "calico" |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 55 | spec: |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 56 | terminationGracePeriodSeconds: 0 |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 57 | containers: |
| 58 | - name: voltha |
Richard Jankowski | c3c291c | 2018-02-02 13:57:33 -0500 | [diff] [blame] | 59 | image: voltha-voltha |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 60 | env: |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 61 | - name: NAMESPACE |
| 62 | valueFrom: |
| 63 | fieldRef: |
| 64 | fieldPath: metadata.namespace |
| 65 | args: |
| 66 | - "voltha/voltha/main.py" |
| 67 | - "-v" |
Richard Jankowski | e585808 | 2018-01-15 18:25:38 -0500 | [diff] [blame] | 68 | - "--etcd=etcd.$(NAMESPACE).svc.cluster.local:2379" |
| 69 | - "--kafka=kafka.$(NAMESPACE).svc.cluster.local" |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 70 | - "--rest-port=8880" |
| 71 | - "--grpc-port=50556" |
| 72 | - "--interface=eth1" |
| 73 | - "--backend=etcd" |
Stephane Barbarie | 5e8d9e4 | 2018-02-07 16:15:05 -0500 | [diff] [blame] | 74 | - "--pon-subnet=10.38.0.0/12" |
| 75 | - "--ponsim-comm=grpc" |
Richard Jankowski | 4ea2663 | 2018-05-14 17:45:38 -0400 | [diff] [blame] | 76 | - "--core-number-extractor=^.*-([0-9]+)_.*$" |
Richard Jankowski | 54f7a86 | 2017-12-20 13:31:10 -0500 | [diff] [blame] | 77 | ports: |
| 78 | - containerPort: 8880 |
| 79 | name: rest-port |
| 80 | - containerPort: 18880 |
| 81 | name: mystery-port |
| 82 | - containerPort: 50556 |
| 83 | name: grpc-port |
| 84 | imagePullPolicy: Never |
| 85 | |
| 86 | |