blob: 0721b88ffd0cc9f21748ed20a7264d65408f6acb [file] [log] [blame]
David Bainbridge2f9b76f2019-05-15 13:48:11 -07001# 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---
16apiVersion: v1
17kind: Service
18metadata:
19 name: adapter-simulated-olt
20 namespace: {{ .Release.Namespace }}
21spec:
22 clusterIP: None
23 selector:
24 app: adapter-simulated-olt
25
26---
27apiVersion: apps/v1
28kind: Deployment
29metadata:
30 name: adapter-simulated-olt
31 namespace: {{ .Release.Namespace }}
32spec:
33 replicas: {{ .Values.replicas.adapter_simulated_olt }}
34 selector:
35 matchLabels:
36 app: adapter-simulated-olt
37 template:
38 metadata:
39 labels:
40 app: adapter-simulated-olt
41 annotations:
42 cni: "calico"
43 spec:
44 containers:
45 - name: adapter-simulated-olt
46 image: {{ .Values.registry }}{{ .Values.images.adapter_simulated_olt.repository }}:{{ tpl .Values.images.adapter_simulated_olt.tag . }}
47 imagePullPolicy: {{ .Values.images.adapter_simulated_olt.pullPolicy }}
48 env:
49 - name: NAMESPACE
50 value: {{ quote .Release.Namespace }}
51 - name: ETCD_SERVICE
52 value: "{{ .Values.services.etcd.service }}"
53 - name: ETCD_SERVICE_PORT
54 value: "{{ .Values.services.etcd.port }}"
55 - name: ADAPTER_KAFKA_SERVICE
56 value: "{{ .Values.services.kafka.adapter.service }}"
57 - name: ADAPTER_KAFKA_SERVICE_PORT
58 value: "{{ .Values.services.kafka.adapter.port }}"
59 - name: CLUSTER_KAFKA_SERVICE
60 value: "{{ .Values.services.kafka.cluster.service }}"
61 - name: CLUSTER_KAFKA_SERVICE_PORT
62 value: "{{ .Values.services.kafka.cluster.port }}"
63 args:
64 - "/app/simulated_olt"
65 - "-kafka_adapter_host=$(ADAPTER_KAFKA_SERVICE)"
66 - "-kafka_adapter_port=$(ADAPTER_KAFKA_SERVICE_PORT)"
67 - "-kafka_cluster_host=$(CLUSTER_KAFKA_SERVICE)"
68 - "-kafka_cluster_port=$(CLUSTER_KAFKA_SERVICE_PORT)"
69 - "-core_topic=rwcore"
70 - "-simulator_topic=simulated_olt"
71 - "-kv_store_host=$(ETCD_SERVICE)"
72 - "-kv_store_port=$(ETCD_SERVICE_PORT)"
73 - "-onu_number=100"
74---
75apiVersion: v1
76kind: Service
77metadata:
78 name: adapter-simulated-onu
79 namespace: {{ .Release.Namespace }}
80spec:
81 clusterIP: None
82 selector:
83 app: adapter-simulated-onu
84
85---
86apiVersion: apps/v1
87kind: Deployment
88metadata:
89 name: adapter-simulated-onu
90 namespace: {{ .Release.Namespace }}
91spec:
92 replicas: {{ .Values.replicas.adapter_simulated_onu }}
93 selector:
94 matchLabels:
95 app: adapter-simulated-onu
96 template:
97 metadata:
98 labels:
99 app: adapter-simulated-onu
100 annotations:
101 cni: "calico"
102 spec:
103 containers:
104 - name: adapter-simulated-onu
105 image: {{ .Values.registry }}{{ .Values.images.adapter_simulated_onu.repository }}:{{ tpl .Values.images.adapter_simulated_onu.tag . }}
106 imagePullPolicy: {{ .Values.images.adapter_simulated_onu.pullPolicy }}
107 env:
108 - name: NAMESPACE
109 value: {{ quote .Release.Namespace }}
110 - name: ETCD_SERVICE
111 value: "{{ .Values.services.etcd.service }}"
112 - name: ETCD_SERVICE_PORT
113 value: "{{ .Values.services.etcd.port }}"
114 - name: ADAPTER_KAFKA_SERVICE
115 value: "{{ .Values.services.kafka.adapter.service }}"
116 - name: ADAPTER_KAFKA_SERVICE_PORT
117 value: "{{ .Values.services.kafka.adapter.port }}"
118 - name: CLUSTER_KAFKA_SERVICE
119 value: "{{ .Values.services.kafka.cluster.service }}"
120 - name: CLUSTER_KAFKA_SERVICE_PORT
121 value: "{{ .Values.services.kafka.cluster.port }}"
122 args:
123 - "/app/simulated_onu"
124 - "-kafka_adapter_host=$(ADAPTER_KAFKA_SERVICE)"
125 - "-kafka_adapter_port=$(ADAPTER_KAFKA_SERVICE_PORT)"
126 - "-kafka_cluster_host=$(CLUSTER_KAFKA_SERVICE)"
127 - "-kafka_cluster_port=$(CLUSTER_KAFKA_SERVICE_PORT)"
128 - "-core_topic=rwcore"
129 - "-kv_store_host=$(ETCD_SERVICE)"
130 - "-kv_store_port=$(ETCD_SERVICE_PORT)"
131 - "-simulator_topic=simulated_onu"