blob: a1b4f6994aa9bc69127aee0711da07aceec5d4fe [file] [log] [blame]
David Bainbridgecd30e542019-05-31 20:52:56 +00001# 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
15apiVersion: apps/v1
16kind: Deployment
17metadata:
18 name: adapter-open-olt
19 namespace: {{ .Release.Namespace }}
David Bainbridge534a73d2019-08-30 18:57:23 +000020 {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openolt_deployment_labels") }}
21 labels:
22 {{- if hasKey .Values "extra_deployment_labels" }}
23 {{- range $key, $val := .Values.extra_deployment_labels }}
24 {{ $key }}: {{ $val | quote }}
25 {{- end }}
26 {{- end }}
27 {{- if hasKey .Values "openolt_deployment_labels" }}
28 {{- range $key, $val := .Values.openolt_deployment_labels }}
29 {{ $key }}: {{ $val | quote }}
30 {{- end }}
31 {{- end }}
32 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000033spec:
34 replicas: {{ .Values.replicas.adapter_open_olt }}
35 selector:
36 matchLabels:
37 app: adapter-open-olt
38 template:
39 metadata:
40 labels:
41 app: adapter-open-olt
David Bainbridge1f888042019-06-24 18:02:01 +000042 app.kubernetes.io/name: "adapter-open-olt"
43 app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
44 app.kubernetes.io/component: "adapter"
45 app.kubernetes.io/part-of: "voltha"
46 app.kubernetes.io/managed-by: {{ quote .Release.Service }}
47 helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
David Bainbridge534a73d2019-08-30 18:57:23 +000048 {{- if hasKey .Values "extra_pod_labels" }}
49 {{- range $key, $val := .Values.extra_pod_labels }}
50 {{ $key }}: {{ $val | quote }}
51 {{- end }}
52 {{- end }}
53 {{- if hasKey .Values "openolt_pod_labels" }}
54 {{- range $key, $val := .Values.openolt_pod_labels }}
55 {{ $key }}: {{ $val | quote }}
56 {{- end }}
57 {{- end }}
David Bainbridgecd30e542019-05-31 20:52:56 +000058 annotations:
59 cni: "calico"
60 spec:
61 containers:
62 - name: adapter-open-olt
David Bainbridge03706e62019-10-18 17:59:24 +000063 image: '{{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_olt.tag . ) . }}'
David Bainbridgecd30e542019-05-31 20:52:56 +000064 imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }}
65 args:
David Bainbridge6a43d8d2019-06-18 19:09:09 +000066 - "/app/openolt"
67 - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
68 - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
69 - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
70 - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
71 - "--core_topic=rwcore"
72 - "--kv_store_host={{ .Values.services.etcd.service }}"
73 - "--kv_store_port={{ .Values.services.etcd.port }}"