blob: bf4a9445aaa6a1662074bea53b4c8d9f9876067e [file] [log] [blame]
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -07001{{/*
2# Copyright 2019 Intel Corporation, Inc
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/}}
16
17apiVersion: extensions/v1beta1
18kind: Deployment
19metadata:
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070026 heritage: {{ .Release.Service }}
27spec:
28 replicas: {{ .Values.replicaCount }}
29 template:
30 metadata:
31 labels:
32 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010033 release: {{ include "common.release" . }}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070034 spec:
35 containers:
36 - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
37 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 name: {{ include "common.name" . }}
39 command: ["/opt/multicloud/k8splugin/k8plugin"]
40 workingDir: /opt/multicloud/k8splugin
41 ports:
42 - containerPort: {{ .Values.service.internalPort }}
43 {{- if eq .Values.liveness.enabled true }}
44 livenessProbe:
45 tcpSocket:
46 port: {{ .Values.service.internalPort }}
47 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
48 periodSeconds: {{ .Values.liveness.periodSeconds }}
49 {{ end -}}
50 readinessProbe:
51 tcpSocket:
52 port: {{ .Values.service.internalPort }}
53 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
54 periodSeconds: {{ .Values.readiness.periodSeconds }}
55 volumeMounts:
56 - mountPath: /etc/localtime
57 name: localtime
58 readOnly: true
59 - mountPath: /opt/multicloud/k8splugin/k8sconfig.json
60 name: {{ include "common.name" .}}
61 subPath: k8sconfig.json
62 resources:
63{{ include "common.resources" . | indent 10 }}
64 {{- if .Values.nodeSelector }}
65 nodeSelector:
66{{ toYaml .Values.nodeSelector | indent 10 }}
67 {{- end -}}
68 {{- if .Values.affinity }}
69 affinity:
70{{ toYaml .Values.affinity | indent 10 }}
71 {{- end }}
liboNet80f587a2019-05-17 01:30:16 +080072 - image: "{{ include "common.repository" . }}/{{ .Values.global.artifactImage }}"
73 name: framework-artifactbroker
74 command: ["/opt/app/distribution/bin/artifact-dist.sh"]
75 args: ["/opt/app/distribution/etc/mounted/config.json"]
76 ports:
77 - containerPort: {{ .Values.artifactbroker.internalPort }}
78 protocol: TCP
79 volumeMounts:
80 - mountPath: /opt/app/distribution/etc/mounted/config.json
81 name: {{ include "common.name" .}}
82 subPath: config.json
83 - mountPath: /data
84 name: artifact-data
85
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070086 volumes:
87 - name: localtime
88 hostPath:
89 path: /etc/localtime
90 - name : {{ include "common.name" . }}
91 configMap:
92 name: {{ include "common.fullname" . }}
liboNet80f587a2019-05-17 01:30:16 +080093 - name: artifact-data
94 emptyDir: {}
Kiran Kaminenie2ba7c82019-04-22 17:52:13 -070095 imagePullSecrets:
96 - name: "{{ include "common.namespace" . }}-docker-registry-key"