| # 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 }}:{{ .Values.onosPort }}; 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 }}:{{ .Values.diPort }}; do echo waiting for gateway svc; sleep 2; done"] |
| containers: |
| - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
| imagePullPolicy: {{ .Values.image.pullPolicy }} |
| name: {{ .Values.name }} |
| command: |
| - "./topo_watchdog" |
| - "--di-addr" |
| - "{{ .Values.diAddr }}" |
| - "--di-port" |
| - "{{ .Values.diPort }}" |
| - "--onos-addr" |
| - "{{ .Values.onosAddr }}" |
| - "--onos-port" |
| - "{{ .Values.onosPort }}" |
| {{- if .Values.withEndHost }} |
| - "--k8s-subnet" |
| - "{{ .Values.k8sSubnet }}" |
| - "--node-iface-no" |
| - "{{ .Values.nodeIfaceNo }}" |
| {{- end }} |
| {{- if .Values.enableP4RuntimeTranslation }} |
| - "--enable-p4runtime-translation" |
| {{- end }} |
| {{- if .Values.withUp4 }} |
| - "--with-up4" |
| - "--up4-port" |
| - "{{ .Values.up4Port }}" |
| {{- end }} |
| {{- if hasKey .Values.image "pullSecrets" }} |
| imagePullSecrets: |
| {{- range .Values.image.pullSecrets }} |
| - name: {{ . | quote }} |
| {{- end }} |
| {{- end }} |