blob: 3604f41ed9f5eae01cd7b4495ee0719152a526ad [file] [log] [blame]
Scott Baker2f8fe3a2022-05-09 10:48:16 -07001# SPDX-FileCopyrightText: 2022-present Intel Corporation
2# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
3#
4# SPDX-License-Identifier: Apache-2.0
5
6apiVersion: apps/v1
7kind: Deployment
8metadata:
9 name: {{ template "sdcore-prom-kafka.fullname" . }}
10 namespace: {{ .Release.Namespace }}
11 labels:
12 name: {{ template "sdcore-prom-kafka.fullname" . }}
13spec:
14 replicas: {{ .Values.replicaCount }}
15 selector:
16 matchLabels:
17 {{- include "sdcore-prom-kafka.selectorLabels" . | nindent 6 }}
18 template:
19 metadata:
20 labels:
21 name: {{ template "sdcore-prom-kafka.fullname" . }}
22 {{- include "sdcore-prom-kafka.selectorLabels" . | nindent 8 }}
23 spec:
24 {{- with .Values.imagePullSecrets }}
25 imagePullSecrets:
26 {{- toYaml . | nindent 6 }}
27 {{- end }}
28 securityContext:
29 {{- toYaml .Values.podSecurityContext | nindent 8 }}
30 containers:
31 - name: {{ .Chart.Name }}
32 image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
33 imagePullPolicy: {{ .Values.image.pullPolicy }}
34 env:
35 - name: POD_NAMESPACE
36 valueFrom:
37 fieldRef:
38 fieldPath: metadata.namespace
39 - name: POD_NAME
40 valueFrom:
41 fieldRef:
42 fieldPath: metadata.name
43 - name: NODE_NAME
44 valueFrom:
45 fieldRef:
46 fieldPath: spec.nodeName
47 args:
48 - "/usr/local/bin/sdcore-kafka"
49 {{ if .Values.kafkaURI }}
50 - "-kafka_uri={{ .Values.kafkaURI }}"
51 {{ end }}
52 {{ if .Values.prometheusEndpoint }}
53 - "-endpoint={{ .Values.prometheusEndpoint }}"
54 {{ end }}
55 volumeMounts:
56 - name: logconfig
57 mountPath: /etc/onos/config
58 readOnly: true
59 volumes:
60 - name: logconfig
61 configMap:
62 name: {{ template "sdcore-prom-kafka.fullname" . }}-logconfig
63