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" }}
24 name: {{ include "common.deploymentname.appmgr" . }}
25 namespace: {{ include "common.namespace.platform" . }}
27 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
28 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
29 release: {{ .Release.Name }}
30 heritage: {{ .Release.Service }}
32 replicas: {{ .Values.appmgr.replicaCount }}
35 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
36 release: {{ .Release.Name }}
39 {{- if .Values.appmgr.annotations }}
41 {{- .Values.appmgr.annotations | nindent 8 -}}
44 app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
45 release: {{ .Release.Name }}
47 hostname: {{ include "common.name.appmgr" . }}
48 serviceAccountName: {{ include "common.serviceaccountname.appmgr" . }}
50 - name: {{ include "common.repositoryCred" . }}
51 {{- if or (eq ( include "common.tillerTLSVerify" $ctx ) "true" ) (eq ( include "common.tillerTLSAuthenticate" $ctx ) "true") }}
53 - name: {{ include "common.containername.appmgr" . }}-copy-tiller-secret
54 image: {{ include "common.repository" . }}/{{ .Values.appmgr.image.init.name }}:{{ .Values.appmgr.image.init.tag }}
55 imagePullPolicy: {{ default "IfNotPresent" .pullPolicy }}
58 value: {{ include "common.serviceaccountname.appmgr" . }}
60 value: {{ default "kubernetes" .Values.global.clusterName }}
62 value: /tmp/kubeconfig
64 value: "kubernetes.default.svc.{{ default "cluster.local" .Values.global.dnsDomain }}"
65 - name: SECRET_NAMESPACE
66 value: {{ include "common.tillerDeployNameSpace" $ctx }}
68 value: {{ include "common.tillerHelmClientTLSSecret" $ctx }}
71 name: {{ include "common.configmapname.appmgr" . }}-env
72 command: ["/appmgr-tiller-secret-copier.sh"]
74 - name: helm-secret-volume
75 mountPath: {{ $secretPath }}
77 - name: appmgr-bin-volume
78 mountPath: /svcacct-to-kubeconfig.sh
79 subPath: svcacct-to-kubeconfig.sh
80 - name: appmgr-bin-volume
81 mountPath: /appmgr-tiller-secret-copier.sh
82 subPath: appmgr-tiller-secret-copier.sh
85 - name: {{ include "common.containername.appmgr" . }}
86 image: {{ include "common.repository" . }}/{{ .Values.appmgr.image.name }}:{{ .Values.appmgr.image.tag }}
87 imagePullPolicy: {{ include "common.pullPolicy" . }}
90 containerPort: {{ include "common.serviceport.appmgr.http" . }}
93 containerPort: {{ include "common.serviceport.appmgr.rmr.route" . }}
96 containerPort: {{ include "common.serviceport.appmgr.rmr.data" . }}
100 mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml
103 mountPath: {{ .Values.appmgr.appcertpath }}
104 - name: helm-secret-volume
105 mountPath: {{ $secretPath }}
107 - name: secret-volume
108 mountPath: {{ $secretPath }}/helm_repo_username
109 subPath: helm_repo_username
110 - name: secret-volume
111 mountPath: {{ $secretPath }}/helm_repo_password
112 subPath: helm_repo_password
115 name: {{ include "common.configmapname.appmgr" . }}-env
121 # - ps -ef | grep {{ .Values.livenessprocessname }}| grep -v "grep"
122 #initialDelaySeconds: 120
128 restartPolicy: Always
132 #allowPrivilegeEscalation: false
134 - name: config-volume
136 name: {{ include "common.configmapname.appmgr" . }}-appconfig
139 name: {{ include "common.helmrepositorycert" . }}
140 - name: secret-volume
142 secretName: {{ include "common.helmrepositorycred" . }}
143 - name: helm-secret-volume
145 - name: appmgr-bin-volume
147 name: {{ include "common.configmapname.appmgr" . }}-bin