Skip to content

Commit

Permalink
publish engelsystem chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Aug 14, 2024
1 parent 62f68b7 commit d656659
Show file tree
Hide file tree
Showing 9 changed files with 667 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/crittersystem/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Standard Helm ignores
.DS_Store
*.swp
*.bak
*.tmp
*.orig
*.old
5 changes: 5 additions & 0 deletions charts/crittersystem/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: crittersystem
description: A Helm chart for deploying the CritterSystem application
version: 0.1.0
appVersion: "1.0"
40 changes: 40 additions & 0 deletions charts/crittersystem/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "critter.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "critter.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{- define "critter.labels" -}}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{- define "critter.managedSecretReference" -}}
{{- printf "%s-%s" (include "critter.fullname" .) .Values.infisical.managedSecretReference.secretName | trunc 63 | trimSuffix "-" }}
{{- end }}

{{- define "critter.managedSecretReferenceSecretName" -}}
{{- printf "%s-%s" (include "critter.fullname" .) .Values.infisical.managedSecretReference.secretName | trunc 63 | trimSuffix "-" }}
{{- end }}
42 changes: 42 additions & 0 deletions charts/crittersystem/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "critter.fullname" . }}
labels:
{{- include "critter.labels" . | nindent 4 }}
annotations:
secrets.infisical.com/auto-reload: "true"
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "critter.fullname" . }}-app
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
template:
metadata:
labels:
app: {{ include "critter.fullname" . }}-app
spec:
containers:
- name: critter-server
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:
name: {{ include "critter.managedSecretReferenceSecretName" . }}
volumeMounts:
- mountPath: /var/www/config/config.php
subPath: config.php
name: config
livenessProbe:
httpGet:
path: /health
port: 80
volumes:
- name: config
configMap:
name: {{ include "critter.fullname" . }}-config
Loading

0 comments on commit d656659

Please sign in to comment.