Andy Bavier | 2259a6b | 2018-07-12 15:27:48 -0700 | [diff] [blame] | 1 | --- |
| 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: onu |
| 20 | namespace: {{ .Values.global.namespace }} |
| 21 | labels: |
| 22 | name: onu |
| 23 | spec: |
| 24 | ports: |
| 25 | - name: grpc |
| 26 | port: 50061 |
| 27 | targetPort: 50061 |
| 28 | selector: |
| 29 | app: onu |
| 30 | --- |
| 31 | apiVersion: apps/v1beta1 |
| 32 | kind: Deployment |
| 33 | metadata: |
| 34 | name: onu |
| 35 | namespace: {{ .Values.global.namespace }} |
| 36 | spec: |
| 37 | replicas: 1 |
| 38 | template: |
| 39 | metadata: |
| 40 | labels: |
| 41 | app: onu |
| 42 | annotations: |
| 43 | cni: "calico,pon0" |
| 44 | spec: |
| 45 | affinity: |
| 46 | podAffinity: |
| 47 | preferredDuringSchedulingIgnoredDuringExecution: |
| 48 | - weight: 100 |
| 49 | podAffinityTerm: |
| 50 | labelSelector: |
| 51 | matchExpressions: |
| 52 | - key: app |
| 53 | operator: In |
| 54 | values: |
| 55 | - rg |
| 56 | topologyKey: kubernetes.io/hostname |
Andy Bavier | 2259a6b | 2018-07-12 15:27:48 -0700 | [diff] [blame] | 57 | containers: |
| 58 | - name: onu |
Zack Williams | 07ef42c | 2018-11-09 13:48:26 -0700 | [diff] [blame] | 59 | image: "{{ .Values.global.registry }}{{ .Values.images.onu.repository }}:{{ tpl .Values.images.onu.tag . }}" |
Zack Williams | 2749ae5 | 2018-09-28 09:43:43 -0700 | [diff] [blame] | 60 | imagePullPolicy: {{ .Values.images.onu.pullPolicy }} |
Andy Bavier | 2259a6b | 2018-07-12 15:27:48 -0700 | [diff] [blame] | 61 | env: |
| 62 | - name: POD_IP |
| 63 | valueFrom: |
| 64 | fieldRef: |
| 65 | fieldPath: status.podIP |
| 66 | - name: NAMESPACE |
| 67 | valueFrom: |
| 68 | fieldRef: |
| 69 | fieldPath: metadata.namespace |
Andy Bavier | 2259a6b | 2018-07-12 15:27:48 -0700 | [diff] [blame] | 70 | args: |
| 71 | - "/app/ponsim" |
| 72 | - "-device_type" |
| 73 | - "ONU" |
| 74 | - "-parent_addr" |
| 75 | - "olt" |
| 76 | - "-grpc_port" |
| 77 | - "50061" |
| 78 | - "-internal_if" |
| 79 | - "eth0" |
| 80 | - "-external_if" |
| 81 | - "eth1" |
| 82 | - "-promiscuous" |
| 83 | |
| 84 | ports: |
| 85 | - containerPort: 50061 |
| 86 | name: grpc-port |