blob: ffa0157315c4bf77d3a37e64b35e453f21e98979 [file] [log] [blame]
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "dubbo-admin.name" . }}
namespace: {{ include "dubbo-admin.namespace" . }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
{{ include "dubbo-admin.matchLabels" . | nindent 6 }}
template:
metadata:
labels:
{{ include "dubbo-admin.labels" . | nindent 8 }}
spec:
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 8 }}
affinity: {{- toYaml .Values.affinity | nindent 8 }}
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ include "dubbo-admin.name" . }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.containerPort }}
volumeMounts:
- mountPath: /config
name: application-properties
readOnly: true
- mountPath: /storage
name: storage
readOnly: true
livenessProbe:
httpGet:
path: {{ .Values.livenessProbe.httpGet.path }}
port: {{ .Values.livenessProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
readinessProbe:
httpGet:
path: {{ .Values.livenessProbe.httpGet.path }}
port: {{ .Values.livenessProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
startupProbe:
httpGet:
path: {{ .Values.startupProbe.httpGet.path }}
port: {{ .Values.startupProbe.httpGet.port }}
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: application-properties
configMap:
name: {{ include "dubbo-admin.name" . }}-cm
- name: storage
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
{{ if .Values.persistence.ClaimName }}
claimName: {{ .Values.persistence.ClaimName }}
{{- else }}
emptyDir: {{ .Values.persistence.emptyDir }}
{{- end -}}
{{- end -}}