blob: 363850586b89a7004b183f99b039290ddc2ca4c3 [file] [log] [blame]
Yi Tsengd04bb642022-01-26 17:43:14 -08001# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
Charles Chand1b4bf92022-02-02 16:27:10 -08002# SPDX-License-Identifier: Apache-2.0
Yi Tsengd04bb642022-01-26 17:43:14 -08003kind: Deployment
4apiVersion: apps/v1
5metadata:
6 name: {{ .Values.name }}
7spec:
8 replicas: {{ .Values.replicas }}
9 revisionHistoryLimit: 10
10 selector:
11 matchLabels:
12 name: {{ .Values.name }}
13 template:
14 metadata:
15 labels:
16 name: {{ .Values.name }}
17 spec:
18 initContainers:
19 - name: wait-onos-api
20 image: curlimages/curl:7.78.0
21 imagePullPolicy: IfNotPresent
22 command: ['sh', '-c', "until curl -I -s {{ .Values.onosAddr }}; do echo waiting for ONOS API; sleep 2; done"]
23 - name: wait-di-api
24 image: curlimages/curl:7.78.0
25 imagePullPolicy: IfNotPresent
26 command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}; do echo waiting for gateway svc; sleep 2; done"]
27 containers:
28 - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
29 imagePullPolicy: {{ .Values.image.pullPolicy }}
30 name: {{ .Values.name }}
31 {{- if .Values.withEndHost }}
32 command: ["./topo_watchdog", "--di-addr", "{{ .Values.diAddr }}", "--onos-addr", "{{ .Values.onosAddr }}", "--k8s-subnet", "{{ .Values.k8sSubnet }}", "--node-iface-no", "{{ .Values.nodeIfaceNo }}"]
33 {{- else }}
34 command: ["./topo_watchdog", "--di-addr", "{{ .Values.diAddr }}", "--onos-addr", "{{ .Values.onosAddr }}"]
35 {{- end }}
36 {{- if hasKey .Values.image "pullSecrets" }}
37 imagePullSecrets:
38 {{- range .Values.image.pullSecrets }}
39 - name: {{ . | quote }}
40 {{- end }}
41 {{- end }}