blob: 4c945f460522565535eaa8f419b9c2d25165f81c [file] [log] [blame]
Jakub Latusekd71d26c2020-10-21 13:36:29 +02001{{/*
mayankg2703ced85142018-03-20 05:42:53 +00002# Copyright © 2017 Amdocs, Bell Canada
jhhd4258672020-08-09 12:08:08 -05003# Modifications Copyright © 2018-2020 AT&T Intellectual Property
mayankg2703ced85142018-03-20 05:42:53 +00004#
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.
Jakub Latusekd71d26c2020-10-21 13:36:29 +020016*/}}
mayankg2703ced85142018-03-20 05:42:53 +000017
Grzegorz-Lis4fad3022020-07-31 10:18:21 +020018apiVersion: apps/v1
mayankg2703ced85142018-03-20 05:42:53 +000019kind: Deployment
20metadata:
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
23 labels:
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010026 release: {{ include "common.release" . }}
mayankg2703ced85142018-03-20 05:42:53 +000027 heritage: {{ .Release.Service }}
28spec:
Grzegorz-Lis4fad3022020-07-31 10:18:21 +020029 selector:
30 matchLabels:
31 app: {{ include "common.name" . }}
mayankg2703ced85142018-03-20 05:42:53 +000032 replicas: {{ .Values.replicaCount }}
33 template:
34 metadata:
35 labels:
36 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010037 release: {{ include "common.release" . }}
mayankg2703ced85142018-03-20 05:42:53 +000038 spec:
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000039 initContainers:
40 - command: ["sh", "-c", "chown -R 200:200 /share"]
Sylvain Desbureaux7c8c6862020-11-19 18:02:37 +010041 image: {{ include "repositoryGenerator.image.busybox" . }}
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000042 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 name: {{ include "common.name" . }}-init
44 volumeMounts:
45 - mountPath: /share
46 name: nexus-data
mayankg2703ced85142018-03-20 05:42:53 +000047 containers:
48 - name: {{ include "common.name" . }}
Sylvain Desbureaux7c8c6862020-11-19 18:02:37 +010049 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
mayankg2703ced85142018-03-20 05:42:53 +000050 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 ports:
mayankg270313f06072018-05-07 15:36:00 +000052 - containerPort: {{ .Values.service.externalPort }}
mayankg2703ced85142018-03-20 05:42:53 +000053 {{- if eq .Values.liveness.enabled true }}
54 livenessProbe:
55 tcpSocket:
mayankg270313f06072018-05-07 15:36:00 +000056 port: {{ .Values.service.externalPort }}
mayankg2703ced85142018-03-20 05:42:53 +000057 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
58 periodSeconds: {{ .Values.liveness.periodSeconds }}
59 {{ end -}}
60 readinessProbe:
61 httpGet:
62 path: {{ .Values.readiness.path }}
mayankg270313f06072018-05-07 15:36:00 +000063 port: {{ .Values.service.externalPort }}
mayankg2703ced85142018-03-20 05:42:53 +000064 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
65 periodSeconds: {{ .Values.readiness.periodSeconds }}
66 volumeMounts:
67 - mountPath: /etc/localtime
68 name: localtime
69 readOnly: true
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000070 - mountPath: /sonatype-work
71 name: nexus-data
mayankg2703ced85142018-03-20 05:42:53 +000072 resources:
jhhd4258672020-08-09 12:08:08 -050073{{- if eq .Values.resources.flavor "large" }}
74{{ toYaml .Values.resources.large | indent 12 }}
75{{- else }}
76{{ toYaml .Values.resources.small | indent 12 }}
77{{- end -}}
mayankg2703ced85142018-03-20 05:42:53 +000078 {{- if .Values.nodeSelector }}
79 nodeSelector:
80{{ toYaml .Values.nodeSelector | indent 10 }}
81 {{- end -}}
82 {{- if .Values.affinity }}
83 affinity:
84{{ toYaml .Values.affinity | indent 10 }}
85 {{- end }}
farida azmyc1178372021-04-11 12:55:33 +020086 serviceAccountName: {{ include "common.fullname" (dict "suffix" "nothing" "dot" . )}}
mayankg2703ced85142018-03-20 05:42:53 +000087 volumes:
88 - name: localtime
89 hostPath:
90 path: /etc/localtime
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000091 - name: nexus-data
92 {{- if .Values.persistence.enabled }}
93 persistentVolumeClaim:
94 claimName: {{ include "common.fullname" . }}
95 {{- else }}
96 emptyDir: {}
97 {{- end }}
mayankg2703ced85142018-03-20 05:42:53 +000098 imagePullSecrets:
99 - name: "{{ include "common.namespace" . }}-docker-registry-key"