new deployment template

This commit is contained in:
titver968
2025-03-05 16:42:56 +01:00
parent 604778ff93
commit 013643ecc0
3 changed files with 77 additions and 45 deletions

View File

@@ -3,12 +3,12 @@ entries:
tatort:
- apiVersion: v2
appVersion: 0.0.1
created: "2025-03-05T11:44:08.491778+01:00"
created: "2025-03-05T16:42:13.620322+01:00"
description: A Helm chart for Kubernetes
digest: 6111e298fb5b13f72cd9aca15b71145e119bb342391c8bea9fe66d871e179fbe
digest: bf90381cfb4fffda94d4033c8b5634a42e9dbd6fbd855312e10c976966b67181
name: tatort
type: application
urls:
- https://gitea.innohub.local:3000/innohub/charts/raw/main/tatort-0.1.0.tgz
version: 0.1.0
generated: "2025-03-05T11:44:08.491411+01:00"
generated: "2025-03-05T16:42:13.61998+01:00"

Binary file not shown.

View File

@@ -1,68 +1,100 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "tatort.fullname" . }}
name: {{ template "tatort.fullname" . }}
labels:
{{- include "tatort.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
app: {{ template "tatort.name" . }}
chart: {{ template "tatort.chart" . }}
component: tatort
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deploymentLabels }}
{{- toYaml .Values.deploymentLabels | nindent 4 }}
{{- end }}
spec:
strategy:
{{ toYaml .Values.updateStrategy | nindent 4 }}
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "tatort.selectorLabels" . | nindent 6 }}
app: {{ template "tatort.name" . }}
component: tatort
release: {{ .Release.Name }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "tatort.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
app: {{ template "tatort.name" . }}
component: tatort
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "tatort.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "tatort.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
terminationMessagePolicy: FallbackToLogsOnError
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
env:
{{- range $key := .Values.env }}
{{- if .value }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- end }}
{{- range $key := .Values.secretEnv }}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ template "tatort.fullname" $ }}-secret
key: {{ .name }}
{{- end }}
envFrom:
{{- with .Values.extraEnvFrom }}
{{- tpl . $ | nindent 10 }}
{{- end }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
httpGet:
path: /
port: {{ .Values.service.port }}
initialDelaySeconds: 20
livenessProbe:
httpGet:
path: /
port: {{ .Values.service.port }}
initialDelaySeconds: 60
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{ if .Values.sharedDataFolder.enabled }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: shared-data-volume
mountPath: /data
{{ end }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- if .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{ toYaml . | indent 8 }}
{{- end }}
{{ if .Values.sharedDataFolder.enabled }}
volumes:
- name: shared-data-volume
persistentVolumeClaim:
claimName: {{ template "tatort.fullname" . }}-shared-data
{{ end }}