blob: 750300b8a0fb8ccd244846ce3ba8c5c86930f481 [file] [log] [blame]
PUSHP RAJ7c521fa2021-12-06 14:19:03 +00001# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
2#
3# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
5apiVersion: apps/v1
6kind: Deployment
7metadata:
8 name: {{ template "chronos-exporter.fullname" . }}
9 namespace: {{ .Release.Namespace }}
10 labels:
11 name: {{ template "chronos-exporter.fullname" . }}
12spec:
13 replicas: {{ .Values.replicaCount }}
14 selector:
15 matchLabels:
16 {{- include "chronos-exporter.selectorLabels" . | nindent 6 }}
17 template:
18 metadata:
19 labels:
20 name: {{ template "chronos-exporter.fullname" . }}
21 {{- include "chronos-exporter.selectorLabels" . | nindent 8 }}
22 spec:
23 {{- with .Values.imagePullSecrets }}
24 imagePullSecrets:
25 {{- toYaml . | nindent 6 }}
26 {{- end }}
27 securityContext:
28 {{- toYaml .Values.podSecurityContext | nindent 8 }}
29 containers:
30 - name: {{ .Chart.Name }}
31 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
32 imagePullPolicy: {{ .Values.image.pullPolicy }}
33 env:
34 - name: POD_NAMESPACE
35 valueFrom:
36 fieldRef:
37 fieldPath: metadata.namespace
38 - name: POD_NAME
39 valueFrom:
40 fieldRef:
41 fieldPath: metadata.name
42 - name: NODE_NAME
43 valueFrom:
44 fieldRef:
45 fieldPath: spec.nodeName
46 args:
47 - "/usr/local/bin/chronos-exporter"
Sean Condonfbc563d2021-12-08 15:54:26 -080048 - "--config"
49 - {{ .Values.configfile }}
PUSHP RAJ2b6a6e32022-02-01 18:06:01 +000050 - "--alert"
51 - {{ .Values.alertfile }}
PUSHP RAJ7c521fa2021-12-06 14:19:03 +000052 ports:
53 - name: metrics
54 containerPort: 2112
55 readinessProbe:
56 httpGet:
57 path: /metrics
58 port: 2112
59 initialDelaySeconds: 5
60 periodSeconds: 10
61 livenessProbe:
62 httpGet:
63 path: /metrics
64 port: 2112
65 initialDelaySeconds: 15
66 periodSeconds: 20
Sean Condonfbc563d2021-12-08 15:54:26 -080067 volumeMounts:
68 - name: exporter-config
69 mountPath: /etc/chronos-exporter/configs
70 readOnly: true
PUSHP RAJcb8d3e52022-01-07 18:55:39 +000071 - name: exporter-images
72 mountPath: /opt/images
73 readOnly: true
74 - name: exporter-site-plans
Sean Condon86544492022-01-28 19:06:48 +000075 mountPath: /opt/site-plans/fremont
PUSHP RAJcb8d3e52022-01-07 18:55:39 +000076 readOnly: true
PUSHP RAJ2b6a6e32022-02-01 18:06:01 +000077 - name: exporter-alert
78 mountPath: /etc/chronos-exporter/alerts
79 readOnly: true
PUSHP RAJ7c521fa2021-12-06 14:19:03 +000080 volumes:
81 - name: secret
82 secret:
Sean Condonfbc563d2021-12-08 15:54:26 -080083 secretName: {{ template "chronos-exporter.fullname" . }}-secret
84 - name: exporter-config
85 configMap:
86 name: {{ template "chronos-exporter.fullname" . }}-config
PUSHP RAJcb8d3e52022-01-07 18:55:39 +000087 - name: exporter-images
88 configMap:
89 name: {{ template "chronos-exporter.fullname" . }}-images
90 - name: exporter-site-plans
91 configMap:
92 name: {{ template "chronos-exporter.fullname" . }}-site-plans
PUSHP RAJ2b6a6e32022-02-01 18:06:01 +000093 - name: exporter-alert
94 configMap:
95 name: {{ template "chronos-exporter.fullname" . }}-alert