Merge "Drop the submodule nexus-repository-helm"
[it/dep.git] / ric-infra / 10-Nexus / helm / nexus / templates / deployment.yaml
1 ################################################################################
2 #   Copyright (c) 2019 AT&T Intellectual Property.                             #
3 #   Copyright (c) 2019 Nokia.                                                  #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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
18 apiVersion: apps/v1beta2
19 kind: Deployment
20 metadata:
21   name: {{ include "common.deploymentname.nexus" .}}
22   labels:
23     app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
24     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25     release: {{ .Release.Name }}
26     heritage: {{ .Release.Service }}
27 spec:
28   replicas: {{ .Values.nexus.replicaCount }}
29   selector:
30     matchLabels:
31       app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
32       release: {{ .Release.Name }}
33   template:
34     metadata:
35       labels:
36         app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
37         release: {{ .Release.Name }}
38     spec:
39       hostname: {{ .Chart.Name }}
40       imagePullSecrets:
41         - name: {{ include "common.repositoryCred" . }}
42       containers:
43         - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
44           image: {{ include "common.repository" . }}/{{ .Values.nexus.image.name }}:{{ .Values.nexus.image.tag }}
45           imagePullPolicy: {{ include "common.pullPolicy" . }}
46           #          volumeMounts:
47           #- name: certs
48           #  mountPath: /var/run/certs
49           #  readOnly: true
50           ports:
51             - name: nexus
52               containerPort: {{ .Values.nexus.service.nexus.containerPort }}
53               #containerPort: 8081
54               protocol: TCP
55             - name: docker
56               containerPort: {{ .Values.nexus.service.docker.containerPort }}
57               #containerPort: 10001
58               protocol: TCP
59           volumeMounts:
60             - name: nexus-config
61               mountPath: /nexus-data
62       volumes:
63         - name: nexus-config
64           persistentVolumeClaim:
65             claimName: pvc-{{ include "common.name.nexus" . }}