blob: 3604f41ed9f5eae01cd7b4495ee0719152a526ad [file] [log] [blame]
# SPDX-FileCopyrightText: 2022-present Intel Corporation
# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
#
# SPDX-License-Identifier: Apache-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "sdcore-prom-kafka.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
name: {{ template "sdcore-prom-kafka.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "sdcore-prom-kafka.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
name: {{ template "sdcore-prom-kafka.fullname" . }}
{{- include "sdcore-prom-kafka.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 6 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
args:
- "/usr/local/bin/sdcore-kafka"
{{ if .Values.kafkaURI }}
- "-kafka_uri={{ .Values.kafkaURI }}"
{{ end }}
{{ if .Values.prometheusEndpoint }}
- "-endpoint={{ .Values.prometheusEndpoint }}"
{{ end }}
volumeMounts:
- name: logconfig
mountPath: /etc/onos/config
readOnly: true
volumes:
- name: logconfig
configMap:
name: {{ template "sdcore-prom-kafka.fullname" . }}-logconfig