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 |
| 20 | metadata: |
| 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 Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | spec: |
Grzegorz-Lis | 4fad302 | 2020-07-31 10:18:21 +0200 | [diff] [blame] | 29 | selector: |
| 30 | matchLabels: |
| 31 | app: {{ include "common.name" . }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 32 | replicas: {{ .Values.replicaCount }} |
| 33 | template: |
| 34 | metadata: |
| 35 | labels: |
| 36 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 37 | release: {{ include "common.release" . }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 38 | spec: |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 39 | initContainers: |
| 40 | - command: ["sh", "-c", "chown -R 200:200 /share"] |
| 41 | image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.global.ubuntuInitImage }}" |
| 42 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 43 | name: {{ include "common.name" . }}-init |
| 44 | volumeMounts: |
| 45 | - mountPath: /share |
| 46 | name: nexus-data |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 47 | containers: |
| 48 | - name: {{ include "common.name" . }} |
BorislavG | df11cd5 | 2018-05-06 12:55:20 +0000 | [diff] [blame] | 49 | image: "{{ include "common.repository" . }}/{{ .Values.image }}" |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 50 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 51 | ports: |
mayankg2703 | 13f0607 | 2018-05-07 15:36:00 +0000 | [diff] [blame] | 52 | - containerPort: {{ .Values.service.externalPort }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 53 | {{- if eq .Values.liveness.enabled true }} |
| 54 | livenessProbe: |
| 55 | tcpSocket: |
mayankg2703 | 13f0607 | 2018-05-07 15:36:00 +0000 | [diff] [blame] | 56 | port: {{ .Values.service.externalPort }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 57 | initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} |
| 58 | periodSeconds: {{ .Values.liveness.periodSeconds }} |
| 59 | {{ end -}} |
| 60 | readinessProbe: |
| 61 | httpGet: |
| 62 | path: {{ .Values.readiness.path }} |
mayankg2703 | 13f0607 | 2018-05-07 15:36:00 +0000 | [diff] [blame] | 63 | port: {{ .Values.service.externalPort }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 64 | initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} |
| 65 | periodSeconds: {{ .Values.readiness.periodSeconds }} |
| 66 | volumeMounts: |
| 67 | - mountPath: /etc/localtime |
| 68 | name: localtime |
| 69 | readOnly: true |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 70 | - mountPath: /sonatype-work |
| 71 | name: nexus-data |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 72 | resources: |
jhh | d425867 | 2020-08-09 12:08:08 -0500 | [diff] [blame] | 73 | {{- if eq .Values.resources.flavor "large" }} |
| 74 | {{ toYaml .Values.resources.large | indent 12 }} |
| 75 | {{- else }} |
| 76 | {{ toYaml .Values.resources.small | indent 12 }} |
| 77 | {{- end -}} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 78 | {{- 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 }} |
| 86 | volumes: |
| 87 | - name: localtime |
| 88 | hostPath: |
| 89 | path: /etc/localtime |
Mahendra Raghuwanshi | 6c9dda8 | 2018-04-26 10:06:27 +0000 | [diff] [blame] | 90 | - name: nexus-data |
| 91 | {{- if .Values.persistence.enabled }} |
| 92 | persistentVolumeClaim: |
| 93 | claimName: {{ include "common.fullname" . }} |
| 94 | {{- else }} |
| 95 | emptyDir: {} |
| 96 | {{- end }} |
mayankg2703 | ced8514 | 2018-03-20 05:42:53 +0000 | [diff] [blame] | 97 | imagePullSecrets: |
| 98 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |