1 # Copyright 2018 Intel Corporation, Inc
2 # Modifications © 2020 AT&T
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 apiVersion: apps/v1beta1
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
27 replicas: {{ .Values.replicaCount }}
32 app: {{ include "common.name" . }}
33 release: {{ include "common.release" . }}
35 {{- if .Values.persistence.enabled }}
37 - name: fix-permission
43 chmod -R 775 /consul/data
44 chown -R 100:1000 /consul/data
45 image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
48 - mountPath: /consul/data
49 name: {{ include "common.fullname" . }}-data
52 - image: "{{ include "common.repository" . }}/{{ .Values.image.vault }}"
53 name: {{ include "common.name" . }}
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
57 - containerPort: {{ .Values.service.internalPort }}
59 - mountPath: /vault/config/config.json
60 name: {{ include "common.fullname" . }}-vault
62 - mountPath: /etc/localtime
66 {{ include "common.resources" . | indent 10 }}
67 - image: "{{ include "common.repository" . }}/{{ .Values.image.consul }}"
68 name: {{ include "common.name" . }}-backend
69 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 args: ["agent","-server","-bind","0.0.0.0","-bootstrap-expect=1","-config-file","/consul/config/config.json"]
75 {{- if .Values.persistence.enabled }}
76 - mountPath: /consul/data
77 name: {{ include "common.fullname" . }}-data
79 - mountPath: /consul/config/config.json
80 name: {{ include "common.fullname" . }}-consulconfiguration
82 - mountPath: /etc/localtime
86 {{ include "common.resources" . | indent 10 }}
88 - name: {{ include "common.fullname" . }}-consulconfiguration
90 name: {{ include "common.fullname" . }}-consul
91 - name: {{ include "common.fullname" . }}-vault
93 name: {{ include "common.fullname" . }}-vault
98 - name: "{{ include "common.namespace" . }}-docker-registry-key"
99 {{- if .Values.persistence.enabled }}
100 volumeClaimTemplates:
102 name: {{ include "common.fullname" . }}-data
104 name: {{ include "common.fullname" . }}
105 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
106 release: "{{ include "common.release" . }}"
107 heritage: "{{ .Release.Service }}"
110 - {{ .Values.persistence.accessMode | quote }}
111 storageClassName: {{ include "common.storageClass" . }}
114 storage: {{ .Values.persistence.size | quote }}