diff --git a/charts/excalidraw/.helmignore b/charts/excalidraw/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/excalidraw/.helmignore @@ -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/ diff --git a/charts/excalidraw/Chart.yaml b/charts/excalidraw/Chart.yaml new file mode 100644 index 0000000..cd222b4 --- /dev/null +++ b/charts/excalidraw/Chart.yaml @@ -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/ diff --git a/charts/excalidraw/templates/NOTES.txt b/charts/excalidraw/templates/NOTES.txt new file mode 100644 index 0000000..e69de29 diff --git a/charts/excalidraw/templates/_helpers.tpl b/charts/excalidraw/templates/_helpers.tpl new file mode 100644 index 0000000..2951520 --- /dev/null +++ b/charts/excalidraw/templates/_helpers.tpl @@ -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 -}} \ No newline at end of file diff --git a/charts/excalidraw/templates/deployment.yaml b/charts/excalidraw/templates/deployment.yaml new file mode 100644 index 0000000..14fde5f --- /dev/null +++ b/charts/excalidraw/templates/deployment.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/excalidraw/templates/service.yaml b/charts/excalidraw/templates/service.yaml new file mode 100644 index 0000000..3d78052 --- /dev/null +++ b/charts/excalidraw/templates/service.yaml @@ -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 diff --git a/charts/excalidraw/templates/serviceaccount.yaml b/charts/excalidraw/templates/serviceaccount.yaml new file mode 100644 index 0000000..baacac5 --- /dev/null +++ b/charts/excalidraw/templates/serviceaccount.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: excalidraw-sa + namespace: {{ .Release.Namespace }} diff --git a/charts/excalidraw/values.yaml b/charts/excalidraw/values.yaml new file mode 100644 index 0000000..0dd3cb4 --- /dev/null +++ b/charts/excalidraw/values.yaml @@ -0,0 +1,9 @@ +replicaCount: 1 + +resources: + limits: + cpu: 200m + memory: 256Mi + requests: + cpu: 20m + memory: 128Mi