Richard Jankowski | 00a0466 | 2019-02-05 12:18:53 -0500 | [diff] [blame^] | 1 | # Copyright 2019-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. |
| 14 | |
| 15 | apiVersion: v1 |
| 16 | kind: Service |
| 17 | metadata: |
| 18 | name: onu |
| 19 | namespace: voltha |
| 20 | labels: |
| 21 | name: onu |
| 22 | spec: |
| 23 | ports: |
| 24 | - name: grpc |
| 25 | port: 50061 |
| 26 | targetPort: 50061 |
| 27 | selector: |
| 28 | app: onu |
| 29 | --- |
| 30 | apiVersion: apps/v1beta1 |
| 31 | kind: Deployment |
| 32 | metadata: |
| 33 | name: onu |
| 34 | namespace: voltha |
| 35 | spec: |
| 36 | replicas: 3 |
| 37 | template: |
| 38 | metadata: |
| 39 | labels: |
| 40 | app: onu |
| 41 | annotations: |
| 42 | cni: "calico,pon0" |
| 43 | spec: |
| 44 | containers: |
| 45 | - name: onu |
| 46 | image: "voltha-ponsim" |
| 47 | env: |
| 48 | - name: POD_IP |
| 49 | valueFrom: |
| 50 | fieldRef: |
| 51 | fieldPath: status.podIP |
| 52 | - name: NAMESPACE |
| 53 | valueFrom: |
| 54 | fieldRef: |
| 55 | fieldPath: metadata.namespace |
| 56 | |
| 57 | args: |
| 58 | - "/app/ponsim" |
| 59 | - "-device_type" |
| 60 | - "ONU" |
| 61 | - "-parent_addr" |
| 62 | - "olt" |
| 63 | - "-grpc_port" |
| 64 | - "50061" |
| 65 | - "-internal_if" |
| 66 | - "eth0" |
| 67 | - "-external_if" |
| 68 | - "eth1" |
| 69 | - "-promiscuous" |
| 70 | |
| 71 | ports: |
| 72 | - containerPort: 50061 |
| 73 | name: grpc-port |
| 74 | |
| 75 | imagePullPolicy: IfNotPresent |