Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2022-present Open Networking Foundation <info@opennetworking.org> |
Charles Chan | d1b4bf9 | 2022-02-02 16:27:10 -0800 | [diff] [blame] | 2 | # SPDX-License-Identifier: Apache-2.0 |
Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 3 | kind: Deployment |
| 4 | apiVersion: apps/v1 |
| 5 | metadata: |
| 6 | name: {{ .Values.name }} |
| 7 | spec: |
| 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 |
Yi Tseng | 8ffe5ff | 2022-02-24 13:33:23 -0800 | [diff] [blame] | 22 | command: ['sh', '-c', "until curl -I -s {{ .Values.onosAddr }}:{{ .Values.onosPort }}; do echo waiting for ONOS API; sleep 2; done"] |
Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 23 | - name: wait-di-api |
| 24 | image: curlimages/curl:7.78.0 |
| 25 | imagePullPolicy: IfNotPresent |
Yi Tseng | 8ffe5ff | 2022-02-24 13:33:23 -0800 | [diff] [blame] | 26 | command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}:{{ .Values.diPort }}; do echo waiting for gateway svc; sleep 2; done"] |
Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 27 | containers: |
| 28 | - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
| 29 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 30 | name: {{ .Values.name }} |
Yi Tseng | 5d687fb | 2022-02-07 18:06:30 -0800 | [diff] [blame] | 31 | command: |
| 32 | - "./topo_watchdog" |
| 33 | - "--di-addr" |
| 34 | - "{{ .Values.diAddr }}" |
Yi Tseng | 8ffe5ff | 2022-02-24 13:33:23 -0800 | [diff] [blame] | 35 | - "--di-port" |
| 36 | - "{{ .Values.diPort }}" |
Yi Tseng | 5d687fb | 2022-02-07 18:06:30 -0800 | [diff] [blame] | 37 | - "--onos-addr" |
| 38 | - "{{ .Values.onosAddr }}" |
Yi Tseng | 8ffe5ff | 2022-02-24 13:33:23 -0800 | [diff] [blame] | 39 | - "--onos-port" |
| 40 | - "{{ .Values.onosPort }}" |
Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 41 | {{- if .Values.withEndHost }} |
Yi Tseng | 5d687fb | 2022-02-07 18:06:30 -0800 | [diff] [blame] | 42 | - "--k8s-subnet" |
| 43 | - "{{ .Values.k8sSubnet }}" |
| 44 | - "--node-iface-no" |
| 45 | - "{{ .Values.nodeIfaceNo }}" |
| 46 | {{- end }} |
| 47 | {{- if .Values.enableP4RuntimeTranslation }} |
| 48 | - "--enable-p4runtime-translation" |
Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 49 | {{- end }} |
Yi Tseng | 8ffe5ff | 2022-02-24 13:33:23 -0800 | [diff] [blame] | 50 | {{- if .Values.withUp4 }} |
| 51 | - "--with-up4" |
| 52 | - "--up4-port" |
| 53 | - "{{ .Values.up4Port }}" |
| 54 | {{- end }} |
Yi Tseng | d04bb64 | 2022-01-26 17:43:14 -0800 | [diff] [blame] | 55 | {{- if hasKey .Values.image "pullSecrets" }} |
| 56 | imagePullSecrets: |
| 57 | {{- range .Values.image.pullSecrets }} |
| 58 | - name: {{ . | quote }} |
| 59 | {{- end }} |
| 60 | {{- end }} |