1 ################################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property. #
3 # Copyright (c) 2019 Nokia. #
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 implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 {{- $tillerKey := .Values.appmgr.tillerkey | default "ricxapp" }}
19 {{- $ctx := dict "ctx" $topCtx "key" $tillerKey }}
20 {{- $secretPath := .Values.appmgr.appsecretpath | default "/opt/ric/secret" }}
21 {{- $certName := include "common.tillerHelmClientTLSSecret" $ctx }}
25 name: {{ include "common.deploymentname.appmgr" . }}
26 namespace: {{ include "common.namespace.platform" . }}
28 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
29 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
30 release: {{ .Release.Name }}
31 heritage: {{ .Release.Service }}
33 replicas: {{ .Values.appmgr.replicaCount }}
36 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
37 release: {{ .Release.Name }}
40 {{- if .Values.appmgr.annotations }}
42 {{- .Values.appmgr.annotations | nindent 8 -}}
45 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
46 release: {{ .Release.Name }}
48 hostname: {{ include "common.name.appmgr" . }}
49 serviceAccountName: {{ include "common.serviceaccountname.appmgr" . }}
51 {{- $newctx := dict "ctx" $topCtx "defaultregistry" .Values.appmgr.image.init.registry }}
52 - name: {{ include "common.dockerregistry.credential" $newctx -}}
53 {{- if or (eq ( include "common.tillerTLSVerify" $ctx ) "true" ) (eq ( include "common.tillerTLSAuthenticate" $ctx ) "true") }}
55 - name: {{ include "common.containername.appmgr" . }}-copy-tiller-secret
56 {{- $newctx := dict "ctx" $topCtx "defaultregistry" .Values.appmgr.image.init.registry }}
57 image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.appmgr.image.init.name }}:{{ .Values.appmgr.image.init.tag }}
58 {{- $newctx := dict "ctx" $topCtx "defaultpullpolicy" .Values.appmgr.imagePullPolicy }}
59 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }}
62 value: {{ include "common.serviceaccountname.appmgr" . }}
64 value: {{ default "kubernetes" .Values.appmgr.clusterName }}
66 value: /tmp/kubeconfig
68 value: {{ default "https://kubernetes.default.svc.cluster.local/" .Values.common.k8sAPIHost }}
69 - name: SECRET_NAMESPACE
70 value: {{ include "common.tillerDeployNameSpace" $ctx }}
72 value: {{ include "common.tillerHelmClientTLSSecret" $ctx }}
75 name: {{ include "common.configmapname.appmgr" . }}-env
76 command: ["/appmgr-tiller-secret-copier.sh"]
78 - name: helm-secret-volume
79 mountPath: {{ $secretPath }}
81 - name: appmgr-bin-volume
82 mountPath: /svcacct-to-kubeconfig.sh
83 subPath: svcacct-to-kubeconfig.sh
84 - name: appmgr-bin-volume
85 mountPath: /appmgr-tiller-secret-copier.sh
86 subPath: appmgr-tiller-secret-copier.sh
89 - name: {{ include "common.containername.appmgr" . }}
90 {{- $newctx := dict "ctx" $topCtx "defaultregistry" .Values.appmgr.image.appmgr.registry }}
91 image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.appmgr.image.appmgr.name }}:{{ .Values.appmgr.image.appmgr.tag }}
92 {{- $newctx := dict "ctx" $topCtx "defaultpullpolicy" .Values.appmgr.imagePullPolicy }}
93 imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }}
96 containerPort: {{ include "common.serviceport.appmgr.http" . }}
99 containerPort: {{ include "common.serviceport.appmgr.rmr.route" . }}
102 containerPort: {{ include "common.serviceport.appmgr.rmr.data" . }}
105 - name: config-volume
106 mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml
108 - name: helm-secret-volume
109 mountPath: {{ $secretPath }}
111 - name: secret-volume
112 mountPath: {{ $secretPath }}/helm_repo_username
113 subPath: helm_repo_username
114 - name: secret-volume
115 mountPath: {{ $secretPath }}/helm_repo_password
116 subPath: helm_repo_password
119 name: {{ include "common.configmapname.appmgr" . }}-env
121 name: {{ include "common.configmapname.dbaas" . }}-appconfig
127 # - ps -ef | grep {{ .Values.livenessprocessname }}| grep -v "grep"
128 #initialDelaySeconds: 120
134 restartPolicy: Always
138 #allowPrivilegeEscalation: false
140 - name: config-volume
142 name: {{ include "common.configmapname.appmgr" . }}-appconfig
143 - name: secret-volume
145 secretName: {{ include "common.secretname.appmgr" . }}
146 - name: helm-secret-volume
148 - name: appmgr-bin-volume
150 name: {{ include "common.configmapname.appmgr" . }}-bin