init
This commit is contained in:
51
charts/dbiz-springboot/templates/deployment.yaml
Normal file
51
charts/dbiz-springboot/templates/deployment.yaml
Normal file
@@ -0,0 +1,51 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "svc.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "svc.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "svc.labels" . | nindent 8 }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ include "svc.name" . }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.service.port }}
|
||||
env:
|
||||
{{- range $k, $v := .Values.env }}
|
||||
- name: {{ $k }}
|
||||
value: {{ $v | quote }}
|
||||
{{- end }}
|
||||
{{- range $k := .Values.secretKeys }}
|
||||
- name: {{ $k }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $.Release.Name }}-secret
|
||||
key: {{ $k }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.probe.path }}
|
||||
port: {{ .Values.service.port }}
|
||||
initialDelaySeconds: {{ .Values.probe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.probe.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probe.failureThreshold }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: {{ .Values.probe.path }}
|
||||
port: {{ .Values.service.port }}
|
||||
initialDelaySeconds: {{ add .Values.probe.initialDelaySeconds 60 }}
|
||||
periodSeconds: {{ .Values.probe.periodSeconds }}
|
||||
failureThreshold: {{ .Values.probe.failureThreshold }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
Reference in New Issue
Block a user