1 {{- if .Values.lcm.enabled -}}
2 #######################################################################################
3 # Copyright ETSI Contributors and Others.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 #######################################################################################
23 {{- include "osm.labels" . | nindent 4 }}
25 replicas: {{ .Values.lcm.replicaCount | default .Values.global.replicaCount }}
28 app.kubernetes.io/component: lcm
29 {{- include "osm.selectorLabels" . | nindent 6 }}
32 {{- with .Values.global.podAnnotations }}
34 {{- toYaml . | nindent 8 }}
37 app.kubernetes.io/component: lcm
38 {{- include "osm.selectorLabels" . | nindent 8 }}
40 {{- with .Values.global.imagePullSecrets }}
42 {{- toYaml . | nindent 8 }}
44 serviceAccountName: {{ include "osm.serviceAccountName" . }}
46 {{- toYaml .Values.global.podSecurityContext | nindent 8 }}
48 - name: kafka-ro-mongo-test
50 command: ["sh", "-c", "until (nc -zvw1 kafka 9092 && nc -zvw1 ro 9090 && nc -zvw1 mongodb-k8s 27017); do sleep 3; done; exit 0"]
54 # readOnlyRootFilesystem: true
55 allowPrivilegeEscalation: false
57 {{- toYaml .Values.global.securityContext | nindent 12 }}
58 image: {{ include "osm.lcm.image" . }}
59 imagePullPolicy: {{ .Values.global.image.pullPolicy }}
67 name: {{ include "osm.fullname" . }}-lcm-configmap
68 {{- if not .Values.lcm.useOsmSecret }}
70 name: {{ .Values.lcm.secretName | default "lcm-secret" }}
72 {{- if or .Values.vca.enabled .Values.lcm.useOsmSecret }}
74 {{- if .Values.vca.enabled }}
75 - name: OSMLCM_VCA_HOST
78 name: {{ include "osm.fullname" . }}-vca-secret
80 - name: OSMLCM_VCA_SECRET
83 name: {{ include "osm.fullname" . }}-vca-secret
85 - name: OSMLCM_VCA_PUBKEY
88 name: {{ include "osm.fullname" . }}-vca-secret
90 - name: OSMLCM_VCA_CACERT
93 name: {{ include "osm.fullname" . }}-vca-secret
96 {{- if .Values.lcm.useOsmSecret }}
97 - name: OSMLCM_DATABASE_COMMONKEY
100 name: {{ include "osm.fullname" . }}-secret
101 key: OSM_DATABASE_COMMONKEY
105 - mountPath: /etc/ssl/certs/osm-ca.crt
109 - mountPath: /etc/ssl/lcm-client/
110 name: lcm-client-cert
120 - name: lcm-client-cert
123 secretName: lcm-client-cert
124 {{- with .Values.global.nodeSelector }}
126 {{- toYaml . | nindent 8 }}
128 {{- with .Values.global.affinity }}
130 {{- toYaml . | nindent 8 }}
132 {{- with .Values.global.tolerations }}
134 {{- toYaml . | nindent 8 }}