mirror of
https://github.com/bitnami/charts.git
synced 2026-03-14 14:57:22 +08:00
85 lines
2.7 KiB
YAML
85 lines
2.7 KiB
YAML
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "tomcat.fullname" . }}
|
|
labels:
|
|
app: {{ template "tomcat.fullname" . }}
|
|
chart: {{ template "tomcat.chart" . }}
|
|
release: "{{ .Release.Name }}"
|
|
heritage: "{{ .Release.Service }}"
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "tomcat.fullname" . }}
|
|
release: "{{ .Release.Name }}"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ template "tomcat.fullname" . }}
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
release: "{{ .Release.Name }}"
|
|
spec:
|
|
{{- if .Values.securityContext.enabled }}
|
|
securityContext:
|
|
fsGroup: {{ .Values.securityContext.fsGroup }}
|
|
runAsUser: {{ .Values.securityContext.runAsUser }}
|
|
{{- end}}
|
|
{{- include "tomcat.imagePullSecrets" . | indent 6 }}
|
|
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
|
|
initContainers:
|
|
- name: volume-permissions
|
|
image: "{{ template "tomcat.volumePermissions.image" . }}"
|
|
imagePullPolicy: {{ default "" .Values.volumePermissions.image.pullPolicy | quote }}
|
|
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/tomcat"]
|
|
securityContext:
|
|
runAsUser: 0
|
|
resources: {{ toYaml .Values.volumePermissions.resources | nindent 10 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /bitnami/tomcat
|
|
{{- end }}
|
|
containers:
|
|
- name: tomcat
|
|
image: "{{ template "tomcat.image" . }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
env:
|
|
- name: TOMCAT_USERNAME
|
|
value: {{ .Values.tomcatUsername | quote }}
|
|
- name: TOMCAT_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ template "tomcat.fullname" . }}
|
|
key: tomcat-password
|
|
- name: TOMCAT_ALLOW_REMOTE_MANAGEMENT
|
|
value: {{ .Values.tomcatAllowRemoteManagement | quote }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8080
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 120
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 3
|
|
periodSeconds: 51
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 10 }}
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /bitnami/tomcat
|
|
volumes:
|
|
- name: data
|
|
{{- if .Values.persistence.enabled }}
|
|
persistentVolumeClaim:
|
|
claimName: {{ template "tomcat.fullname" . }}
|
|
{{- else }}
|
|
emptyDir: {}
|
|
{{- end -}}
|