blob: ec579d808847db299d638fa4486feebaaa376604 [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
Andreas Geisslerf10c5552023-03-21 18:09:46 +010020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
mayankg2703ced85142018-03-20 05:42:53 +000021spec:
Andreas Geisslerf10c5552023-03-21 18:09:46 +010022 selector: {{- include "common.selectors" . | nindent 4 }}
mayankg2703ced85142018-03-20 05:42:53 +000023 replicas: {{ .Values.replicaCount }}
24 template:
Andreas Geisslerf10c5552023-03-21 18:09:46 +010025 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
mayankg2703ced85142018-03-20 05:42:53 +000026 spec:
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000027 initContainers:
28 - command: ["sh", "-c", "chown -R 200:200 /share"]
Sylvain Desbureaux7c8c6862020-11-19 18:02:37 +010029 image: {{ include "repositoryGenerator.image.busybox" . }}
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000030 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
31 name: {{ include "common.name" . }}-init
32 volumeMounts:
33 - mountPath: /share
34 name: nexus-data
mayankg2703ced85142018-03-20 05:42:53 +000035 containers:
36 - name: {{ include "common.name" . }}
Sylvain Desbureaux7c8c6862020-11-19 18:02:37 +010037 image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
mayankg2703ced85142018-03-20 05:42:53 +000038 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Andreas Geisslerfc55fbf2023-07-19 14:48:39 +020039 ports: {{ include "common.containerPorts" . | nindent 12 }}
mayankg2703ced85142018-03-20 05:42:53 +000040 {{- if eq .Values.liveness.enabled true }}
41 livenessProbe:
42 tcpSocket:
Andreas Geisslerfc55fbf2023-07-19 14:48:39 +020043 port: {{ .Values.service.internalPort }}
mayankg2703ced85142018-03-20 05:42:53 +000044 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
45 periodSeconds: {{ .Values.liveness.periodSeconds }}
46 {{ end -}}
47 readinessProbe:
48 httpGet:
49 path: {{ .Values.readiness.path }}
Andreas Geisslerfc55fbf2023-07-19 14:48:39 +020050 port: {{ .Values.service.internalPort }}
mayankg2703ced85142018-03-20 05:42:53 +000051 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
52 periodSeconds: {{ .Values.readiness.periodSeconds }}
53 volumeMounts:
54 - mountPath: /etc/localtime
55 name: localtime
56 readOnly: true
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000057 - mountPath: /sonatype-work
58 name: nexus-data
mayankg2703ced85142018-03-20 05:42:53 +000059 resources:
jhhd4258672020-08-09 12:08:08 -050060{{- if eq .Values.resources.flavor "large" }}
61{{ toYaml .Values.resources.large | indent 12 }}
62{{- else }}
63{{ toYaml .Values.resources.small | indent 12 }}
64{{- end -}}
mayankg2703ced85142018-03-20 05:42:53 +000065 {{- if .Values.nodeSelector }}
66 nodeSelector:
67{{ toYaml .Values.nodeSelector | indent 10 }}
68 {{- end -}}
69 {{- if .Values.affinity }}
70 affinity:
71{{ toYaml .Values.affinity | indent 10 }}
72 {{- end }}
farida azmyc1178372021-04-11 12:55:33 +020073 serviceAccountName: {{ include "common.fullname" (dict "suffix" "nothing" "dot" . )}}
mayankg2703ced85142018-03-20 05:42:53 +000074 volumes:
75 - name: localtime
76 hostPath:
77 path: /etc/localtime
Mahendra Raghuwanshi6c9dda82018-04-26 10:06:27 +000078 - name: nexus-data
79 {{- if .Values.persistence.enabled }}
80 persistentVolumeClaim:
81 claimName: {{ include "common.fullname" . }}
82 {{- else }}
83 emptyDir: {}
84 {{- end }}
mayankg2703ced85142018-03-20 05:42:53 +000085 imagePullSecrets:
86 - name: "{{ include "common.namespace" . }}-docker-registry-key"