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: tatort:
- apiVersion: v2 - apiVersion: v2
appVersion: 0.0.1 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 description: A Helm chart for Kubernetes
digest: 6111e298fb5b13f72cd9aca15b71145e119bb342391c8bea9fe66d871e179fbe digest: bf90381cfb4fffda94d4033c8b5634a42e9dbd6fbd855312e10c976966b67181
name: tatort name: tatort
type: application type: application
urls: urls:
- https://gitea.innohub.local:3000/innohub/charts/raw/main/tatort-0.1.0.tgz - https://gitea.innohub.local:3000/innohub/charts/raw/main/tatort-0.1.0.tgz
version: 0.1.0 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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "tatort.fullname" . }} name: {{ template "tatort.fullname" . }}
labels: labels:
{{- include "tatort.labels" . | nindent 4 }} app: {{ template "tatort.name" . }}
spec: chart: {{ template "tatort.chart" . }}
{{- if not .Values.autoscaling.enabled }} component: tatort
replicas: {{ .Values.replicaCount }} release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deploymentLabels }}
{{- toYaml .Values.deploymentLabels | nindent 4 }}
{{- end }} {{- end }}
spec:
strategy:
{{ toYaml .Values.updateStrategy | nindent 4 }}
replicas: {{ .Values.replicaCount }}
selector: selector:
matchLabels: matchLabels:
{{- include "tatort.selectorLabels" . | nindent 6 }} app: {{ template "tatort.name" . }}
component: tatort
release: {{ .Release.Name }}
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }}
annotations: annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels: labels:
{{- include "tatort.labels" . | nindent 8 }} app: {{ template "tatort.name" . }}
{{- with .Values.podLabels }} component: tatort
{{- toYaml . | nindent 8 }} release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- end }} {{- end }}
spec: spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "tatort.serviceAccountName" . }}
securityContext: securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
serviceAccountName: {{ template "tatort.serviceAccountName" . }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
terminationMessagePolicy: FallbackToLogsOnError
ports: ports:
- name: http - name: http
containerPort: {{ .Values.service.port }} containerPort: {{ .Values.service.port }}
protocol: TCP env:
livenessProbe: {{- range $key := .Values.env }}
{{- toYaml .Values.livenessProbe | nindent 12 }} {{- 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: readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }} httpGet:
resources: path: /
{{- toYaml .Values.resources | nindent 12 }} port: {{ .Values.service.port }}
{{- with .Values.volumeMounts }} initialDelaySeconds: 20
livenessProbe:
httpGet:
path: /
port: {{ .Values.service.port }}
initialDelaySeconds: 60
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{ if .Values.sharedDataFolder.enabled }}
volumeMounts: volumeMounts:
{{- toYaml . | nindent 12 }} - name: shared-data-volume
{{- end }} mountPath: /data
{{- with .Values.volumes }} {{ end }}
volumes: resources:
{{- toYaml . | nindent 8 }} {{ toYaml .Values.resources | indent 12 }}
{{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{ toYaml . | indent 8 }}
{{- end }} {{- end }}
{{- with .Values.affinity }} {{- if .Values.affinity }}
affinity: affinity:
{{- toYaml . | nindent 8 }} {{ toYaml .Values.affinity | indent 8 }}
{{- end }} {{- end }}
{{- with .Values.tolerations }} {{- with .Values.tolerations }}
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{ toYaml . | indent 8 }}
{{- end }} {{- end }}
{{ if .Values.sharedDataFolder.enabled }}
volumes:
- name: shared-data-volume
persistentVolumeClaim:
claimName: {{ template "tatort.fullname" . }}-shared-data
{{ end }}