feat(excalidraw) Add Excalidraw Helm chart

This commit adds the Excalidraw Helm chart, which includes the necessary templates and configuration files for deploying Excalidraw as a Kubernetes application. The chart includes a deployment, service, service account, and values file with default settings. This allows users to easily deploy and manage Excalidraw instances in a Kubernetes cluster.
This commit is contained in:
Tommy 2023-12-26 00:42:18 +01:00
parent c2ade4cb88
commit 8dd372417c
No known key found for this signature in database
8 changed files with 139 additions and 0 deletions

View file

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View file

@ -0,0 +1,19 @@
apiVersion: v2
name: excalidraw
description: Virtual whiteboard for sketching hand-drawn like diagrams
icon: https://avatars.githubusercontent.com/u/59452120?s=200&v=4
type: application
version: 0.2.2
appVersion: "0.17.0"
maintainers:
- name: Tommy Skaug
email: tommy@skaug.me
keywords:
- kubernetes
- drawing
- whiteboard
- diagramming
- selfhosting
sources:
- https://github.com/excalidraw/excalidraw
- https://excalidraw.com/

View file

View file

@ -0,0 +1,27 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "excalidraw.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "excalidraw.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels.
*/}}
{{- define "excalidraw.labels" -}}
helm.sh/chart: {{ include "excalidraw.chart" . }}
app.kubernetes.io/name: {{ include "excalidraw.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

View file

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "excalidraw.name" . }}
labels:
{{- include "excalidraw.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ include "excalidraw.name" . }}
template:
metadata:
labels:
app: {{ include "excalidraw.name" . }}
spec:
serviceAccountName: "excalidraw-sa"
securityContext: {}
containers:
- name: {{ .Chart.Name }}
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
image: "ghcr.io/tommy-skaug/excalidraw:v0.17.0"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "excalidraw.name" . }}
namespace: {{ .Release.Namespace }}
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http

View file

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: excalidraw-sa
namespace: {{ .Release.Namespace }}

View file

@ -0,0 +1,9 @@
replicaCount: 1
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 20m
memory: 128Mi