Stephane Barbarie | a75791c | 2019-01-24 10:58:06 -0500 | [diff] [blame] | 1 | # Copyright 2018 the original author or authors. |
| 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. |
| 14 | |
| 15 | apiVersion: v1 |
| 16 | kind: Service |
| 17 | metadata: |
| 18 | name: ro-core |
| 19 | namespace: voltha |
| 20 | spec: |
| 21 | clusterIP: None |
| 22 | ports: |
| 23 | - name: grpc |
| 24 | port: 50057 |
| 25 | targetPort: 50057 |
| 26 | selector: |
| 27 | app: ro-core |
| 28 | --- |
| 29 | apiVersion: apps/v1 |
| 30 | kind: Deployment |
| 31 | metadata: |
| 32 | name: ro-core |
| 33 | namespace: voltha |
| 34 | spec: |
Richard Jankowski | 00a0466 | 2019-02-05 12:18:53 -0500 | [diff] [blame^] | 35 | replicas: 3 |
Stephane Barbarie | a75791c | 2019-01-24 10:58:06 -0500 | [diff] [blame] | 36 | selector: |
| 37 | matchLabels: |
| 38 | app: ro-core |
| 39 | template: |
| 40 | metadata: |
| 41 | labels: |
| 42 | app: ro-core |
| 43 | annotations: |
| 44 | cni: "calico" |
| 45 | spec: |
| 46 | containers: |
| 47 | - name: voltha |
| 48 | image: voltha-ro-core |
| 49 | env: |
| 50 | - name: NAMESPACE |
| 51 | valueFrom: |
| 52 | fieldRef: |
| 53 | fieldPath: metadata.namespace |
| 54 | - name: POD_IP |
| 55 | valueFrom: |
| 56 | fieldRef: |
| 57 | fieldPath: status.podIP |
| 58 | args: |
| 59 | - "/app/ro_core" |
| 60 | - "-kv_store_type=etcd" |
| 61 | - "-kv_store_host=etcd.$(NAMESPACE).svc.cluster.local" |
| 62 | - "-kv_store_port=2379" |
| 63 | - "-grpc_host=$(POD_IP)" |
| 64 | - "-grpc_port=50057" |
| 65 | - "-banner=true" |
| 66 | - "-ro_core_topic=rocore" |
| 67 | - "-log_level=0" |
| 68 | ports: |
| 69 | - containerPort: 50057 |
| 70 | name: grpc-port |
| 71 | imagePullPolicy: IfNotPresent |
| 72 | |
| 73 | |
| 74 | |