blob: f04d7723545e4a30f8670f726e649210d8096580 [file] [log] [blame]
jasmineWen09bc80d2018-03-21 18:21:17 +00001# Copyright © 2017 Amdocs, Bell Canada
Mukul2b4e7532018-08-03 10:41:29 +00002# Modifications Copyright © 2018 AT&T
jasmineWen09bc80d2018-03-21 18:21:17 +00003#
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
16apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 replicas: {{ .Values.replicaCount }}
28 selector:
29 matchLabels:
30 app: {{ include "common.name" . }}
31 template:
32 metadata:
33 labels:
34 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 name: {{ include "common.name" . }}
37 spec:
BorislavG339b7492018-05-07 09:02:35 +000038 imagePullSecrets:
39 - name: "{{ include "common.namespace" . }}-docker-registry-key"
jasmineWen09bc80d2018-03-21 18:21:17 +000040 containers:
Mike Elliott0440a322018-04-25 14:24:51 -040041 - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
BorislavG9a637a92018-04-12 13:57:58 +000042 command:
43 - /bin/sh
44 - "-c"
45 - |
Mohammadreza Pasandidehb642ee52018-06-19 15:19:53 -040046 apk update && apk add jq
BorislavG9a637a92018-04-12 13:57:58 +000047 cp /tmp/consul/config/* /consul/config
Priyanka Jain1fda9682018-05-09 08:42:50 +000048 /usr/local/bin/docker-entrypoint.sh agent -client 0.0.0.0 -enable-script-checks -retry-join {{ .Values.consulServer.nameOverride }}
jasmineWen09bc80d2018-03-21 18:21:17 +000049 name: {{ include "common.name" . }}
Mohammadreza Pasandidehb642ee52018-06-19 15:19:53 -040050 env:
51 - name: SDNC_ODL_COUNT
52 value: "{{ .Values.sdnc.replicaCount }}"
53 - name: SDNC_IS_PRIMARY_CLUSTER
54 value: "{{ .Values.sdnc.config.isPrimaryCluster }}"
jasmineWen09bc80d2018-03-21 18:21:17 +000055 volumeMounts:
BorislavG9a637a92018-04-12 13:57:58 +000056 - mountPath: /tmp/consul/config
jasmineWen09bc80d2018-03-21 18:21:17 +000057 name: consul-agent-config
58 - mountPath: /consul/scripts
59 name: consul-agent-scripts-config
60 - mountPath: /consul/certs
61 name: consul-agent-certs-config
62 volumes:
63 - configMap:
64 name: {{ include "common.fullname" . }}-configmap
65 name: consul-agent-config
66 - configMap:
67 name: {{ include "common.fullname" . }}-scripts-configmap
68 defaultMode: 0755
69 name: consul-agent-scripts-config
70 - secret:
71 secretName: {{ include "common.fullname" . }}-certs-secret
72 name: consul-agent-certs-config