Jakub Latusek | d71d26c | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
jhh | d425867 | 2020-08-09 12:08:08 -0500 | [diff] [blame] | 3 | # Modifications Copyright © 2018-2020 AT&T Intellectual Property |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 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. |
Jakub Latusek | d71d26c | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 16 | */}} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 17 | |
Grzegorz-Lis | 4fad302 | 2020-07-31 10:18:21 +0200 | [diff] [blame] | 18 | apiVersion: apps/v1 |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 19 | kind: Deployment |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame^] | 20 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 21 | spec: |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame^] | 22 | selector: {{- include "common.selectors" . | nindent 4 }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 23 | replicas: {{ .Values.replicaCount }} |
| 24 | template: |
Andreas Geissler | f10c555 | 2023-03-21 18:09:46 +0100 | [diff] [blame^] | 25 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 26 | spec: |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 27 | initContainers: |
| 28 | - command: ["sh", "-c", "chown -R 200:200 /share"] |
Sylvain Desbureaux | 7c8c686 | 2020-11-19 18:02:37 +0100 | [diff] [blame] | 29 | image: {{ include "repositoryGenerator.image.busybox" . }} |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 30 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 31 | name: {{ include "common.name" . }}-init |
| 32 | volumeMounts: |
| 33 | - mountPath: /share |
| 34 | name: nexus-data |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 35 | containers: |
| 36 | - name: {{ include "common.name" . }} |
Sylvain Desbureaux | 7c8c686 | 2020-11-19 18:02:37 +0100 | [diff] [blame] | 37 | image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 38 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 39 | ports: |
mayankg2703 | 13f0607 | 2018-05-07 15:36:00 +0000 | [diff] [blame] | 40 | - containerPort: {{ .Values.service.externalPort }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 41 | {{- if eq .Values.liveness.enabled true }} |
| 42 | livenessProbe: |
| 43 | tcpSocket: |
mayankg2703 | 13f0607 | 2018-05-07 15:36:00 +0000 | [diff] [blame] | 44 | port: {{ .Values.service.externalPort }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 45 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 46 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 47 | {{ end -}} |
| 48 | readinessProbe: |
| 49 | httpGet: |
| 50 | path: {{ .Values.readiness.path }} |
mayankg2703 | 13f0607 | 2018-05-07 15:36:00 +0000 | [diff] [blame] | 51 | port: {{ .Values.service.externalPort }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 52 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 53 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 54 | volumeMounts: |
| 55 | - mountPath: /etc/localtime |
| 56 | name: localtime |
| 57 | readOnly: true |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 58 | - mountPath: /sonatype-work |
| 59 | name: nexus-data |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 60 | resources: |
jhh | d425867 | 2020-08-09 12:08:08 -0500 | [diff] [blame] | 61 | {{- if eq .Values.resources.flavor "large" }} |
| 62 | {{ toYaml .Values.resources.large | indent 12 }} |
| 63 | {{- else }} |
| 64 | {{ toYaml .Values.resources.small | indent 12 }} |
| 65 | {{- end -}} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 66 | {{- if .Values.nodeSelector }} |
| 67 | nodeSelector: |
| 68 | {{ toYaml .Values.nodeSelector | indent 10 }} |
| 69 | {{- end -}} |
| 70 | {{- if .Values.affinity }} |
| 71 | affinity: |
| 72 | {{ toYaml .Values.affinity | indent 10 }} |
| 73 | {{- end }} |
farida azmy | c117837 | 2021-04-11 12:55:33 +0200 | [diff] [blame] | 74 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "nothing" "dot" . )}} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 75 | volumes: |
| 76 | - name: localtime |
| 77 | hostPath: |
| 78 | path: /etc/localtime |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 79 | - name: nexus-data |
| 80 | {{- if .Values.persistence.enabled }} |
| 81 | persistentVolumeClaim: |
| 82 | claimName: {{ include "common.fullname" . }} |
| 83 | {{- else }} |
| 84 | emptyDir: {} |
| 85 | {{- end }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 86 | imagePullSecrets: |
| 87 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |