blob: 9797fa49d876ce574142783f5ded31bb16132f44 [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 }}
Yi Tseng5d687fb2022-02-07 18:06:30 -080031 command:
32 - "./topo_watchdog"
33 - "--di-addr"
34 - "{{ .Values.diAddr }}"
35 - "--onos-addr"
36 - "{{ .Values.onosAddr }}"
Yi Tsengd04bb642022-01-26 17:43:14 -080037 {{- if .Values.withEndHost }}
Yi Tseng5d687fb2022-02-07 18:06:30 -080038 - "--k8s-subnet"
39 - "{{ .Values.k8sSubnet }}"
40 - "--node-iface-no"
41 - "{{ .Values.nodeIfaceNo }}"
42 {{- end }}
43 {{- if .Values.enableP4RuntimeTranslation }}
44 - "--enable-p4runtime-translation"
Yi Tsengd04bb642022-01-26 17:43:14 -080045 {{- end }}
46 {{- if hasKey .Values.image "pullSecrets" }}
47 imagePullSecrets:
48 {{- range .Values.image.pullSecrets }}
49 - name: {{ . | quote }}
50 {{- end }}
51 {{- end }}