blob: 363850586b89a7004b183f99b039290ddc2ca4c3 [file] [log] [blame]
# SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
kind: Deployment
apiVersion: apps/v1
metadata:
name: {{ .Values.name }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 10
selector:
matchLabels:
name: {{ .Values.name }}
template:
metadata:
labels:
name: {{ .Values.name }}
spec:
initContainers:
- name: wait-onos-api
image: curlimages/curl:7.78.0
imagePullPolicy: IfNotPresent
command: ['sh', '-c', "until curl -I -s {{ .Values.onosAddr }}; do echo waiting for ONOS API; sleep 2; done"]
- name: wait-di-api
image: curlimages/curl:7.78.0
imagePullPolicy: IfNotPresent
command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}; do echo waiting for gateway svc; sleep 2; done"]
containers:
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Values.name }}
{{- if .Values.withEndHost }}
command: ["./topo_watchdog", "--di-addr", "{{ .Values.diAddr }}", "--onos-addr", "{{ .Values.onosAddr }}", "--k8s-subnet", "{{ .Values.k8sSubnet }}", "--node-iface-no", "{{ .Values.nodeIfaceNo }}"]
{{- else }}
command: ["./topo_watchdog", "--di-addr", "{{ .Values.diAddr }}", "--onos-addr", "{{ .Values.onosAddr }}"]
{{- end }}
{{- if hasKey .Values.image "pullSecrets" }}
imagePullSecrets:
{{- range .Values.image.pullSecrets }}
- name: {{ . | quote }}
{{- end }}
{{- end }}