| # 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-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: |
| - "./di-metrics-exporter" |
| - "-S" |
| - {{ .Values.diAddr | quote }} |
| - "--server-port" |
| - {{ .Values.diPort | quote }} |
| - "-t" |
| - {{ .Values.periodToQuery | quote }} |
| - "--watch" |
| - "--watch-period" |
| - {{ .Values.watchPeriod | quote }} |
| {{- range $i, $val := .Values.subnets }} |
| - {{ $val | quote }} |
| {{- end }} |
| {{- if hasKey .Values.image "pullSecrets" }} |
| imagePullSecrets: |
| {{- range .Values.image.pullSecrets }} |
| - name: {{ . | quote }} |
| {{- end }} |
| {{- end }} |