Add a helm chart
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
2025-12-30 22:48:44 +01:00
parent c3ab2ba65c
commit 6ce73c6a93
8 changed files with 180 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
src/.faircamp_build/
src/.faircamp_cache/

26
.woodpecker.yaml Normal file
View File

@@ -0,0 +1,26 @@
---
when:
event:
- push
steps:
- name: Build and push a container image
image: gitea.badhouseplants.net/badhouseplants/container-builder:latest
environment:
BUILDAH_REG: gitea.badhouseplants.net/badhouseplants/faircamp-site
REGISTRY_TOKEN:
from_secret: GITEA_REGISTRY_TOKEN
REGISTRY_USER: devops-bot
privileged: true
commands:
- build-container
backend_options:
kubernetes:
resources:
requests:
memory: 700Mi
cpu: 1000m
limits:
cpu: 1000m
securityContext:
privileged: true

View File

@@ -1,3 +1,2 @@
FROM n3wjack/faircamp FROM n3wjack/faircamp
COPY ./src/ /data COPY ./src/ /data

23
helm/.helmignore Normal file
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/

17
helm/Chart.yaml Normal file
View File

@@ -0,0 +1,17 @@
apiVersion: v2
name: faircamp-site
description: Badhouseplants faircamp
type: application
version: 0.1.0
appVersion: 0.1.0
maintainers:
- name: allanger
email: allanger@zohomail.com
url: https://badhouseplants.net
dependencies:
- name: helm-library
version: 0.2.6
repository: oci://ghcr.io/allanger/allangers-helm-library
annotations:
allowed_workload_kinds: "Deployment"
home: https://badhouseplants.net

View File

@@ -0,0 +1,6 @@
{{ include "lib.component.workload" (dict "ctx" .)}}
{{ include "lib.component.service" (dict "ctx" .) }}
{{ include "lib.component.ingress" (dict "ctx" .) }}
{{ include "lib.component.environment" (dict "ctx" .) }}
{{ include "lib.component.storage" (dict "ctx" .) }}
{{ include "lib.component.templates" (dict "ctx" .) }}

103
helm/values.yaml Normal file
View File

@@ -0,0 +1,103 @@
---
shortcuts:
hostname: badhouseplants.net
base:
workload:
kind: Deployment
strategy:
type: RollingUpdate
initContainer:
faircamp:
image:
registry: gitea.badhouseplants.net
repository: badhouseplants/faircamp-site
tag: latest
pullPolicy: Always
volumeMounts:
storage:
site:
path: /data/.faircamp_build
containers:
nginx:
image:
registry: registry.hub.docker.com
repository: nginxinc/nginx-unprivileged
tag: latest
pullPolicy: Always
ports:
main:
- nginx
volumeMounts:
storage:
site:
path: /usr/share/nginx/html
livenessProbe:
httpGet:
path: /
port: 8080
httpHeaders:
initialDelaySeconds: 3
periodSeconds: 3
readinessProbe:
httpGet:
path: /
port: 8080
httpHeaders:
initialDelaySeconds: 3
periodSeconds: 3
ingress:
main:
enabled: true
class: traefik
rules:
- host: '{{ .Values.shortcuts.hostname }}'
http:
paths:
- backend:
service:
name: '{{ include "chart.fullname" $ }}-main'
port:
number: 8080
path: /
pathType: Prefix
tls:
- hosts:
- '{{ .Values.shortcuts.hostname }}'
secretName: '{{ .Values.shortcuts.hostname }}'
extraVolumes:
logs:
emptyDir: {}
services:
main:
enabled: true
type: ClusterIP
ports:
nginx:
port: 8080
targetPort: 8080
protocol: TCP
storage:
site:
enabled: true
storageClassName: default
size: 3Gi
accessModes:
- ReadWriteOnce
config:
# -- Please have a look here: https://github.com/dani-garcia/vaultwarden/blob/main/.env.template
env:
main:
enabled: false
sensitive: false
remove: []
data: {}
secrets:
enabled: false
sensitive: true
remove: []
data: {}

3
renovate.json Normal file
View File

@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}