blob: c536e90d67a5968ac8f18a2981a7cd6b08b69fa5 [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
22 command: ['sh', '-c', "until curl -I -s -k https://{{ .Values.diAddr }}; do echo waiting for gateway svc; sleep 2; done"]
23 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 }}
31 - "-t"
32 - {{ .Values.periodToQuery | quote }}
33 - "--watch"
34 - "--watch-period"
35 - {{ .Values.watchPeriod | quote }}
36 {{- range $i, $val := .Values.subnets }}
37 - {{ $val | quote }}
38 {{- end }}
39 {{- if hasKey .Values.image "pullSecrets" }}
40 imagePullSecrets:
41 {{- range .Values.image.pullSecrets }}
42 - name: {{ . | quote }}
43 {{- end }}
44 {{- end }}