blob: 4611e9a6013f11aa9cc2c0b0419169af9941b0f0 [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-di-api
20 image: curlimages/curl:7.78.0
21 imagePullPolicy: IfNotPresent
Yi Tseng8ffe5ff2022-02-24 13:33:23 -080022 command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}:{{ .Values.diPort }}; do echo waiting for gateway svc; sleep 2; done"]
Yi Tsengd04bb642022-01-26 17:43:14 -080023 containers:
24 - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
25 imagePullPolicy: {{ .Values.image.pullPolicy }}
26 name: {{ .Values.name }}
27 command:
28 - "./di-metrics-exporter"
29 - "-S"
30 - {{ .Values.diAddr | quote }}
Yi Tseng8ffe5ff2022-02-24 13:33:23 -080031 - "--server-port"
32 - {{ .Values.diPort | quote }}
Yi Tsengd04bb642022-01-26 17:43:14 -080033 - "-t"
34 - {{ .Values.periodToQuery | quote }}
35 - "--watch"
36 - "--watch-period"
37 - {{ .Values.watchPeriod | quote }}
38 {{- range $i, $val := .Values.subnets }}
39 - {{ $val | quote }}
40 {{- end }}
41 {{- if hasKey .Values.image "pullSecrets" }}
42 imagePullSecrets:
43 {{- range .Values.image.pullSecrets }}
44 - name: {{ . | quote }}
45 {{- end }}
46 {{- end }}