Compare commits

..

75 Commits

Author SHA1 Message Date
15373a34de Correct imagePullPolicy in farmos deployment.yaml. 2025-08-23 14:57:55 +12:00
75886ace77 Correct README.org for farmos installation. 2025-08-23 14:40:31 +12:00
801aa5c694 First iteration of farmos helm chart. 2025-08-23 13:59:39 +12:00
45141753ee Updated gitea to latest upstream release 1.24.4. 2025-08-07 13:15:55 +12:00
195ca5a826 Remove gitea ingress spec from helm install. 2025-06-25 20:50:31 +12:00
1dd76d0413 Explicitly declare gitea image registry. 2025-06-25 20:47:43 +12:00
8c0113c342 Updated gitea to latest upstream release 1.24.2. 2025-06-25 20:40:39 +12:00
5e3061f246 Updated gitea to latest upstream release 1.23.7. 2025-04-17 21:12:04 +12:00
d1cc0b55f8 Updated jellyfin to latest upstream release 10.10.7. 2025-04-17 21:06:20 +12:00
7719251883 Remove defunct ingress for jellyfin values.yaml. 2025-04-14 12:29:49 +12:00
1f0a87d63e Updated gitea to latest upstream release 1.23.5. 2025-03-09 08:44:38 +13:00
d2effd3d1b Updated jellyfin to latest upstream release 10.10.6. 2025-03-09 08:02:12 +13:00
b8d4d8c50a Updated gitea to latest upstream release 1.23.4. 2025-02-20 15:39:07 +13:00
eb5cc13bc8 Updated gitea to latest upstream release 1.22.6. 2024-12-30 17:30:44 +13:00
b60a1337a1 Updated gitea to latest upstream release 1.22.4. 2024-12-05 13:28:58 +13:00
3507309769 Updated jellyfin to latest upstream release 10.10.2.
Signed-off-by: James Blair <mail@jamesblair.net>
2024-11-17 11:29:38 +13:00
f8ecd742bc Updated jellyfin to latest upstream release 10.10.1. 2024-11-11 10:19:04 +13:00
128edba68e Updated gitea to latest upstream release 1.22.3. 2024-10-21 17:00:52 +13:00
2b8ae4feed Updated jellyfin to latest upstream release 10.9.11. 2024-09-09 09:56:55 +12:00
508aef512a Updated gitea to latest upstream release 1.22.2. 2024-09-07 16:19:45 +12:00
4676505fac Fix jellyfin version in values.yaml and simplify instructions. 2024-07-29 06:51:29 +12:00
fb542e9c0d Updated jellyfin to latest upstream release 10.9.8. 2024-07-23 13:31:55 +12:00
b7f10a0219 Updated gitea to latest upstream release 1.22.1. 2024-07-07 21:54:50 +12:00
2320a35704 Disable ingress after migrating to cloudflared tunnels. 2024-06-23 14:01:30 +12:00
54e6af9ba9 Updated gitea to latest upstream release 1.22.0. 2024-06-09 21:58:30 +12:00
98045ea478 Updated jellyfin to latest upstream release 10.9.4. 2024-06-04 14:59:35 +12:00
ebedad0218 Updated gitea to latest upstream release 1.21.11. 2024-05-06 17:19:19 +12:00
fe1a85ded5 Updated gitea to latest upstream release 1.21.10. 2024-03-28 10:30:11 +13:00
997e10c7a2 Updated gitea to latest upstream release 1.21.9. 2024-03-22 20:30:39 +13:00
fb8cd80d1e Updated gitea to latest upstream release 1.21.8. 2024-03-19 04:14:58 +13:00
8d78ab5064 Updated gitea to latest upstream release 1.21.7. 2024-03-02 22:46:50 +13:00
c6af7fa384 Updated gitea to latest upstream release 1.21.5. 2024-02-11 18:47:20 +13:00
a55c047c36 Updated gitea to latest upstream release 1.21.4 2024-01-18 11:52:19 +13:00
ca7ac80b8c Start separate chart for gitea-runner. 2023-12-25 08:43:29 +13:00
30ce503062 Start adding actions runner to gitea helm chart. 2023-12-24 21:07:54 +13:00
09ae9dc8e5 Updated gitea to latest upstream release 1.21.3 2023-12-22 20:32:28 +13:00
97bca63d43 Updated gitea to latest upstream release 1.21.2 2023-12-13 08:49:36 +13:00
21268d334a Updated jellyfin to latest upstream release 10.8.13. 2023-11-29 20:00:11 +13:00
5e41d89976 Updated gitea to latest upstream release 1.21.1 2023-11-27 15:49:44 +13:00
9aaf8e75bf Simplified deployment instructions for gitea. 2023-11-15 09:55:48 +13:00
df498cbe52 Updated gitea to latest upstream release 1.21.0 2023-11-15 09:21:03 +13:00
426146a969 Update linting aciton. 2023-11-13 12:22:32 +13:00
3367b5bae4 Remove unused ohmyform and grocy charts. 2023-11-13 12:14:58 +13:00
cf45341da4 Remove cpu limit for invidious. 2023-11-13 12:13:28 +13:00
aa94dce7b4 Remove cpu limit for gitea. 2023-11-12 04:45:51 +13:00
40ba2b4f4b Remove cpu limit for jellyfin. 2023-11-11 16:18:35 +13:00
779aeb9a1c Updated jellyfin to latest upstream release 10.8.12. 2023-11-07 09:04:26 +13:00
6a2e25d42f Updated gitea to latest upstream release 1.20.5. 2023-10-05 20:20:50 +13:00
f4c67acea3 Updated jellyfin to latest upstream release 10.8.11. 2023-09-26 21:09:37 +13:00
b354692e3f Switch from tmate to tmux of src blocks. 2023-09-11 18:01:46 +12:00
44a5e3d309 Updated gitea to latest upstream release 1.20.4. 2023-09-11 17:11:43 +12:00
34ff059af7 Updated gitea to latest upstream release 1.20.3 2023-08-21 16:09:40 +12:00
2183245e64 Updated gitea to latest upstream release 1.20.2 2023-07-30 08:24:35 +12:00
597eb05df6 Updated gitea to latest upstream release 1.20.1 2023-07-23 21:03:49 +12:00
2d3c21a117 Start updating gitea for 1.20.0. 2023-07-17 11:46:01 +12:00
15bd06870c Updated gitea to latest upstream release 1.20.0 2023-07-17 08:10:12 +12:00
4e5ea8cff8 Update invidious values for mandatory hmac field. 2023-07-08 22:05:02 +12:00
4b6dd7c4e3 Updated gitea to latest upstream release 1.19.4 2023-07-05 18:56:09 +12:00
90e1b3e4e1 Add helper functions for ohmyform chart. 2023-06-29 16:31:41 +12:00
949040c1b9 Add ingress for ohmyform chart. 2023-06-29 16:29:16 +12:00
6269a15c70 Added basic documentation for ohmyform chart. 2023-06-29 15:56:42 +12:00
0403a60549 Start adding a helm chart for ohmyform. 2023-06-29 15:18:45 +12:00
bf479a2c4e Updated gitea to latest upstream release 1.19.3 2023-05-04 09:51:37 +12:00
f6d74002ed Updated gitea to latest upstream release 1.19.2 2023-04-29 13:46:57 +12:00
8ee31f7d47 Updated jellyfin to latest upstream release 10.8.10. 2023-04-24 04:04:33 +12:00
524a50a3df Updated gitea to latest upstream release 1.19.1 2023-04-15 06:54:24 +12:00
3a3bd002f9 Updated gitea to latest upstream release 1.19.0 2023-03-21 08:57:08 +13:00
b5080d5d56 Updated gitea to latest upstream release 1.18.5. 2023-02-25 17:52:02 +13:00
89a5f610c5 Updated gitea to latest upstream release 1.18.4. 2023-02-20 20:02:19 +13:00
d5fd20b25f Updated gitea to latest upstream release 1.18.3. 2023-01-24 09:13:02 +13:00
6cf5f2119f Updated jellyfin to latest upstream release 10.8.9. 2023-01-23 09:07:46 +13:00
e54599067a Updated gitea to latest upstream release 1.18.2. 2023-01-20 13:58:35 +13:00
fa4e6443ee Updated gitea to latest upstream release 1.18.1. 2023-01-18 13:20:02 +13:00
8cb6db67a7 Fixed iv readme, removed defunct .gitignore and gitea/.drone.yml 2023-01-11 16:40:14 +13:00
ec4dc71d02 Start writing documentation for invidious helm chart. 2023-01-11 16:32:00 +13:00
29 changed files with 317 additions and 280 deletions

View File

@ -1,5 +1,5 @@
---
name: Lint test helm charts name: Lint test helm charts
on: push on: push
jobs: jobs:
@ -7,14 +7,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up helm - name: Set up helm
uses: azure/setup-helm@v1 uses: azure/setup-helm@v3
with:
version: v3.8.1
- name: Run helm lint - name: Run helm lint
run: helm lint grocy run: |
helm lint jellyfin
helm lint gitea
helm lint invidious

1
.gitignore vendored
View File

@ -1 +0,0 @@
*.~undo-tree~

7
farmos/Chart.yaml Normal file
View File

@ -0,0 +1,7 @@
---
apiVersion: v2
appVersion: 3.4.5
description: FarmOS Helm chart for Kubernetes
name: farmos
type: application
version: "0.1.0"

26
farmos/README.org Normal file
View File

@ -0,0 +1,26 @@
#+TITLE: Farmos farm management
#+AUTHOR: James Blair
#+EMAIL: mail@jamesblair.net
#+DATE: <2025-08-23 Sat>
[[https://github.com/farmos/farmos][FarmOS]] is a self hosted farm management service.
I created this simplified helm chart for self-hosting farmos in a container on kubernetes. Complete the steps below to deploy this chart.
#+NAME: Deploy farmos via helm
#+begin_src tmux
# Ensure farmos namespace exists
sudo kubectl create namespace jamma-farmos
# Create directories if they don't already exist
mkdir --parent "/home/${USER}/Services/farmos"
# Clone charts repository
cd "/home/${USER}/Services/farmos" && git clone https://gitea.jamma.life/jmhbnz/charts.git
# Ensure the repository is up to date
cd charts/farmos && git pull
# Install the chart
helm upgrade --install -n jamma-farmos jamma-farmos .
#+end_src

View File

@ -0,0 +1,32 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: farmos
labels:
app: farmos
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: farmos
template:
metadata:
labels:
app: farmos
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: "Always"
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- name: data
mountPath: /opt/drupal/web/sites
volumes:
- name: data
persistentVolumeClaim:
claimName: farmos

View File

@ -1,10 +1,15 @@
---
apiVersion: v1 apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: grocy labels:
app: farmos
name: farmos
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
resources: resources:
requests: requests:
storage: 2Gi storage: 10Gi
storageClassName: local-path
volumeMode: Filesystem

View File

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: farmos
labels:
app: farmos
spec:
type: ClusterIP
ports:
- port: 80
targetPort: http
protocol: TCP
name: http
selector:
app: farmos

6
farmos/values.yaml Normal file
View File

@ -0,0 +1,6 @@
---
replicaCount: 1
image:
repository: docker.io/farmos/farmos
tag: "3.4.5"

View File

@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "gitea.fullname" . }}-runner
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
selector:
matchLabels:
app: gitea-runner
template:
metadata:
labels:
app: gitea-runner
annotations:
checksum/secret: {{ tpl (toYaml .Values.runner.runnerToken.value) . | sha256sum }}
spec:
containers:
- image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: GITEA_INSTANCE_URL
value: {{ .Values.runner.instanceURL }}
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: {{ include "gitea.fullname" . }}-secrets
key: token

View File

@ -1,87 +0,0 @@
---
kind: pipeline
type: docker
name: lint
platform:
os: linux
arch: arm64
steps:
- name: helm lint
pull: always
image: alpine:3.16
commands:
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
- helm lint
- name: helm template
pull: always
image: alpine:3.16
commands:
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
- helm dependency update
- helm template --debug gitea-helm .
- name: verify readme
pull: always
image: alpine:3.16
commands:
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing make npm git
- make readme
- git diff --exit-code --name-only README.md
- name: discord
pull: always
image: appleboy/drone-discord:1.2.4
environment:
DISCORD_WEBHOOK_ID:
from_secret: discord_webhook_id
DISCORD_WEBHOOK_TOKEN:
from_secret: discord_webhook_token
when:
status:
- changed
- failure
---
kind: pipeline
type: docker
name: release-version
platform:
os: linux
arch: arm64
trigger:
event:
- tag
steps:
- name: generate-chart
pull: always
image: alpine:3.16
commands:
- apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing helm
- apk add --no-cache curl
- helm dependency update
- helm package --version "${DRONE_TAG##v}" ./
- mkdir gitea
- mv gitea*.tgz gitea/
- curl -L -o gitea/index.yaml https://dl.gitea.io/charts/index.yaml
- helm repo index gitea/ --url https://dl.gitea.io/charts --merge gitea/index.yaml
- name: upload-chart
pull: always
image: plugins/s3:latest
settings:
bucket: gitea-artifacts
endpoint: https://ams3.digitaloceanspaces.com
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
source: gitea/*
target: /charts
strip_prefix: gitea/

View File

@ -1,6 +1,7 @@
---
apiVersion: v2 apiVersion: v2
appVersion: 1.18.0 appVersion: 1.24.4
description: Gitea Helm chart for Kubernetes description: Gitea Helm chart for Kubernetes
name: gitea name: gitea
type: application type: application
version: "1.0.4" version: "1.1.27"

View File

@ -5,10 +5,13 @@
[[https://github.com/go-gitea/gitea][Gitea]] is a painless self-hosted Git service. [[https://github.com/go-gitea/gitea][Gitea]] is a painless self-hosted Git service.
I created this simplified helm chart for self-hosting gitea in a container on ~k3s~ based on the excellent upstream [[https://gitea.com/gitea/helm-chart/][official helm chart]]. Complete the steps below to deploy this chart. I created this simplified helm chart for self-hosting gitea in a container on kubernetes based on the excellent upstream [[https://gitea.com/gitea/helm-chart/][official helm chart]]. Complete the steps below to deploy this chart.
#+NAME: Deploy gitea via helm #+NAME: Deploy gitea via helm
#+begin_src tmate #+begin_src tmux
# Set deployment environment
export environment=dev
# Ensure gitea namespace exists # Ensure gitea namespace exists
sudo kubectl create namespace jamma-gitea sudo kubectl create namespace jamma-gitea
@ -23,10 +26,5 @@ cd charts/gitea && git pull
# Install the chart # Install the chart
helm upgrade --install -n jamma-gitea jamma-gitea . \ helm upgrade --install -n jamma-gitea jamma-gitea . \
--set "gitea.admin.password=${gitea_admin_password}" \ --set "gitea.admin.password=${gitea_admin_password}"
--set "ingress.hosts[0].host=gitea.jamma.dev" \
--set "ingress.hosts[0].paths[0].path=/" \
--set "ingress.hosts[0].paths[0].pathType=Prefix" \
--set "ingress.tls[0].hosts[0]=gitea.jamma.dev" \
--set "ingress.tls[0].secretName=tls-jamma-gitea"
#+end_src #+end_src

View File

@ -53,14 +53,14 @@ stringData:
env2ini::log " + '${setting}'" env2ini::log " + '${setting}'"
if [[ -z "${section}" ]]; then if [[ -z "${section}" ]]; then
export "ENV_TO_INI____${setting^^}=${value}" # '^^' makes the variable content uppercase export "GITEA____${setting^^}=${value}" # '^^' makes the variable content uppercase
return return
fi fi
local masked_section="${section//./_0X2E_}" # '//' instructs to replace all matches local masked_section="${section//./_0X2E_}" # '//' instructs to replace all matches
masked_section="${masked_section//-/_0X2D_}" masked_section="${masked_section//-/_0X2D_}"
export "ENV_TO_INI__${masked_section^^}__${setting^^}=${value}" # '^^' makes the variable content uppercase export "GITEA__${masked_section^^}__${setting^^}=${value}" # '^^' makes the variable content uppercase
} }
function env2ini::reload_preset_envs() { function env2ini::reload_preset_envs() {
@ -134,15 +134,15 @@ stringData:
# - initially used to set up Gitea # - initially used to set up Gitea
# Anyway, they won't harm existing app.ini files # Anyway, they won't harm existing app.ini files
export ENV_TO_INI__SECURITY__INTERNAL_TOKEN=$(gitea generate secret INTERNAL_TOKEN) export GITEA__SECURITY__INTERNAL_TOKEN=$(gitea generate secret INTERNAL_TOKEN)
export ENV_TO_INI__SECURITY__SECRET_KEY=$(gitea generate secret SECRET_KEY) export GITEA__SECURITY__SECRET_KEY=$(gitea generate secret SECRET_KEY)
export ENV_TO_INI__OAUTH2__JWT_SECRET=$(gitea generate secret JWT_SECRET) export GITEA__OAUTH2__JWT_SECRET=$(gitea generate secret JWT_SECRET)
export ENV_TO_INI__SERVER__LFS_JWT_SECRET=$(gitea generate secret LFS_JWT_SECRET) export GITEA__SERVER__LFS_JWT_SECRET=$(gitea generate secret LFS_JWT_SECRET)
env2ini::log "...Initial secrets generated\n" env2ini::log "...Initial secrets generated\n"
} }
env | (grep ENV_TO_INI || [[ $? == 1 ]]) > /tmp/existing-envs env | (grep GITEA || [[ $? == 1 ]]) > /tmp/existing-envs
# MUST BE CALLED BEFORE OTHER CONFIGURATION # MUST BE CALLED BEFORE OTHER CONFIGURATION
env2ini::generate_initial_secrets env2ini::generate_initial_secrets
@ -163,10 +163,10 @@ stringData:
env2ini::log ' - oauth2.JWT_SECRET' env2ini::log ' - oauth2.JWT_SECRET'
env2ini::log ' - server.LFS_JWT_SECRET' env2ini::log ' - server.LFS_JWT_SECRET'
unset ENV_TO_INI__SECURITY__INTERNAL_TOKEN unset GITEA__SECURITY__INTERNAL_TOKEN
unset ENV_TO_INI__SECURITY__SECRET_KEY unset GITEA__SECURITY__SECRET_KEY
unset ENV_TO_INI__OAUTH2__JWT_SECRET unset GITEA__OAUTH2__JWT_SECRET
unset ENV_TO_INI__SERVER__LFS_JWT_SECRET unset GITEA__SERVER__LFS_JWT_SECRET
fi fi
environment-to-ini -o $GITEA_APP_INI -p ENV_TO_INI environment-to-ini -o $GITEA_APP_INI

View File

@ -6,6 +6,11 @@ metadata:
{{- include "gitea.labels" . | nindent 4 }} {{- include "gitea.labels" . | nindent 4 }}
type: Opaque type: Opaque
stringData: stringData:
configure_gpg_environment.sh: |-
#!/usr/bin/env bash
set -eu
gpg --batch --import /raw/private.asc
init_directory_structure.sh: |- init_directory_structure.sh: |-
#!/usr/bin/env bash #!/usr/bin/env bash
@ -26,7 +31,7 @@ stringData:
{{- end }} {{- end }}
mkdir -p /data/git/.ssh mkdir -p /data/git/.ssh
chmod -R 700 /data/git/.ssh chmod -R 700 /data/git/.ssh
[ ! -d /data/gitea ] && mkdir -p /data/gitea/conf [ ! -d /data/gitea/conf ] && mkdir -p /data/gitea/conf
# prepare temp directory structure # prepare temp directory structure
mkdir -p "${GITEA_TEMP}" mkdir -p "${GITEA_TEMP}"
@ -35,6 +40,14 @@ stringData:
{{- end }} {{- end }}
chmod ug+rwx "${GITEA_TEMP}" chmod ug+rwx "${GITEA_TEMP}"
{{ if .Values.signing.enabled -}}
if [ ! -d "${GNUPGHOME}" ]; then
mkdir -p "${GNUPGHOME}"
chmod 700 "${GNUPGHOME}"
chown 1000:1000 "${GNUPGHOME}"
fi
{{- end }}
configure_gitea.sh: |- configure_gitea.sh: |-
#!/usr/bin/env bash #!/usr/bin/env bash

View File

@ -39,6 +39,12 @@ spec:
{{- if .Values.schedulerName }} {{- if .Values.schedulerName }}
schedulerName: "{{ .Values.schedulerName }}" schedulerName: "{{ .Values.schedulerName }}"
{{- end }} {{- end }}
{{- if (or .Values.serviceAccount.create .Values.serviceAccount.name) }}
serviceAccountName: {{ include "gitea.serviceAccountName" . }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
{{- include "gitea.images.pullSecrets" . | nindent 6 }} {{- include "gitea.images.pullSecrets" . | nindent 6 }}
securityContext: securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml .Values.podSecurityContext | nindent 8 }}
@ -59,6 +65,10 @@ spec:
{{- if .Values.statefulset.env }} {{- if .Values.statefulset.env }}
{{- toYaml .Values.statefulset.env | nindent 12 }} {{- toYaml .Values.statefulset.env | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.signing.enabled }}
- name: GNUPGHOME
value: {{ .Values.signing.gpgHome }}
{{- end }}
volumeMounts: volumeMounts:
- name: init - name: init
mountPath: /usr/sbin mountPath: /usr/sbin
@ -72,6 +82,8 @@ spec:
{{- include "gitea.init-additional-mounts" . | nindent 12 }} {{- include "gitea.init-additional-mounts" . | nindent 12 }}
securityContext: securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }} {{- toYaml .Values.containerSecurityContext | nindent 12 }}
resources:
{{- toYaml .Values.initContainers.resources | nindent 12 }}
- name: init-app-ini - name: init-app-ini
image: "{{ include "gitea.image" . }}" image: "{{ include "gitea.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
@ -110,6 +122,40 @@ spec:
{{- include "gitea.init-additional-mounts" . | nindent 12 }} {{- include "gitea.init-additional-mounts" . | nindent 12 }}
securityContext: securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }} {{- toYaml .Values.containerSecurityContext | nindent 12 }}
resources:
{{- toYaml .Values.initContainers.resources | nindent 12 }}
{{- if .Values.signing.enabled }}
- name: configure-gpg
image: "{{ include "gitea.image" . }}"
command: ["/usr/sbin/configure_gpg_environment.sh"]
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- /* By default this container runs as user 1000 unless otherwise stated */ -}}
{{- $csc := deepCopy .Values.containerSecurityContext -}}
{{- if not (hasKey $csc "runAsUser") -}}
{{- $_ := set $csc "runAsUser" 1000 -}}
{{- end -}}
{{- toYaml $csc | nindent 12 }}
env:
- name: GNUPGHOME
value: {{ .Values.signing.gpgHome }}
volumeMounts:
- name: init
mountPath: /usr/sbin
- name: data
mountPath: /data
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
- name: gpg-private-key
mountPath: /raw
readOnly: true
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.initContainers.resources | nindent 12 }}
{{- end }}
- name: configure-gitea - name: configure-gitea
image: "{{ include "gitea.image" . }}" image: "{{ include "gitea.image" . }}"
command: ["/usr/sbin/configure_gitea.sh"] command: ["/usr/sbin/configure_gitea.sh"]
@ -130,6 +176,10 @@ spec:
value: /data value: /data
- name: GITEA_TEMP - name: GITEA_TEMP
value: /tmp/gitea value: /tmp/gitea
{{- if .Values.image.rootless }}
- name: HOME
value: /data/gitea/git
{{- end }}
{{- if .Values.gitea.ldap }} {{- if .Values.gitea.ldap }}
{{- range $idx, $value := .Values.gitea.ldap }} {{- range $idx, $value := .Values.gitea.ldap }}
{{- if $value.existingSecret }} {{- if $value.existingSecret }}
@ -198,6 +248,8 @@ spec:
subPath: {{ .Values.persistence.subPath }} subPath: {{ .Values.persistence.subPath }}
{{- end }} {{- end }}
{{- include "gitea.init-additional-mounts" . | nindent 12 }} {{- include "gitea.init-additional-mounts" . | nindent 12 }}
resources:
{{- toYaml .Values.initContainers.resources | nindent 12 }}
terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }} terminationGracePeriodSeconds: {{ .Values.statefulset.terminationGracePeriodSeconds }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
@ -209,6 +261,10 @@ spec:
value: {{ .Values.gitea.config.server.SSH_LISTEN_PORT | quote }} value: {{ .Values.gitea.config.server.SSH_LISTEN_PORT | quote }}
- name: SSH_PORT - name: SSH_PORT
value: {{ .Values.gitea.config.server.SSH_PORT | quote }} value: {{ .Values.gitea.config.server.SSH_PORT | quote }}
{{- if not .Values.image.rootless }}
- name: SSH_LOG_LEVEL
value: {{ .Values.gitea.ssh.logLevel | quote }}
{{- end }}
- name: GITEA_APP_INI - name: GITEA_APP_INI
value: /data/gitea/conf/app.ini value: /data/gitea/conf/app.ini
- name: GITEA_CUSTOM - name: GITEA_CUSTOM
@ -219,6 +275,10 @@ spec:
value: /tmp/gitea value: /tmp/gitea
- name: TMPDIR - name: TMPDIR
value: /tmp/gitea value: /tmp/gitea
{{- if .Values.image.rootless }}
- name: HOME
value: /data/gitea/git
{{- end }}
{{- if .Values.signing.enabled }} {{- if .Values.signing.enabled }}
- name: GNUPGHOME - name: GNUPGHOME
value: {{ .Values.signing.gpgHome }} value: {{ .Values.signing.gpgHome }}
@ -268,6 +328,10 @@ spec:
subPath: {{ .Values.persistence.subPath }} subPath: {{ .Values.persistence.subPath }}
{{- end }} {{- end }}
{{- include "gitea.container-additional-mounts" . | nindent 12 }} {{- include "gitea.container-additional-mounts" . | nindent 12 }}
{{- with .Values.global.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
nodeSelector: nodeSelector:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
@ -305,6 +369,15 @@ spec:
{{- end }} {{- end }}
- name: temp - name: temp
emptyDir: {} emptyDir: {}
{{- if .Values.signing.enabled }}
- name: gpg-private-key
secret:
secretName: {{ include "gitea.gpg-key-secret-name" . }}
items:
- key: privateKey
path: private.asc
defaultMode: 0100
{{- end }}
{{- if and .Values.persistence.enabled .Values.persistence.existingClaim }} {{- if and .Values.persistence.enabled .Values.persistence.existingClaim }}
- name: data - name: data
persistentVolumeClaim: persistentVolumeClaim:

View File

@ -1,3 +1,4 @@
---
global: global:
imageRegistry: "" imageRegistry: ""
imagePullSecrets: [] imagePullSecrets: []
@ -8,8 +9,8 @@ replicaCount: 1
clusterDomain: cluster.local clusterDomain: cluster.local
image: image:
registry: "" registry: docker.gitea.com
repository: gitea/gitea repository: gitea
tag: "" tag: ""
pullPolicy: Always pullPolicy: Always
rootless: true rootless: true
@ -50,7 +51,7 @@ service:
annotations: {} annotations: {}
ingress: ingress:
enabled: true enabled: false
annotations: annotations:
kubernetes.io/ingress.class: nginx kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true" kubernetes.io/tls-acme: "true"
@ -72,9 +73,16 @@ ingress:
hosts: hosts:
- gitea.jamma.dev - gitea.jamma.dev
serviceAccount:
create: false
name: ""
automountServiceAccountToken: false
imagePullSecrets: []
annotations: {}
labels: {}
resources: resources:
limits: limits:
cpu: 1
memory: 1Gi memory: 1Gi
requests: requests:
cpu: 100m cpu: 100m
@ -115,6 +123,13 @@ extraInitVolumeMounts: []
initPreScript: "" initPreScript: ""
initContainers:
resources:
limits: {}
requests:
cpu: 100m
memory: 128Mi
signing: signing:
enabled: false enabled: false
gpgHome: /data/git/.gnupg gpgHome: /data/git/.gnupg

View File

@ -1,24 +0,0 @@
apiVersion: v2
name: grocy
description: A Helm chart for deploying the grocy erp system on kubernetes.
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "3.3.0"

View File

@ -1,14 +0,0 @@
#+TITLE: Grocy household management
#+AUTHOR: James Blair
#+EMAIL: mail@jamesblair.net
#+DATE: <2022-05-08 Sun 10:45>
[[https://github.com/grocy/grocy][Grocy]] is a web-based self-hosted groceries & household management solution for your home, created by [[https://github.com/berrnd][@berrnd]].
I created this helm chart for self-hosting grocy in a container on ~k3s~. Complete the steps below to deploy this chart.
#+NAME: Deploy grocy via helm
#+begin_src tmate
# Clone charts repository
git clone https://gitea.jamma.life/jmhbnz/charts.git
#+end_src

View File

@ -1,35 +0,0 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grocy
spec:
replicas: 1
selector:
matchLabels:
name: grocy
template:
metadata:
labels:
name: grocy
spec:
containers:
- name: grocy
imagePullPolicy: Always
image: ghcr.io/linuxserver/grocy:latest
ports:
- containerPort: 9283
volumeMounts:
- name: db
mountPath: /config
env:
- name: PUID
value: "1000"
- name: PGID
value: "1000"
- name: TZ
value: "Pacific/Auckland"
volumes:
- name: db
persistentVolumeClaim:
claimName: grocy

View File

@ -1,32 +0,0 @@
---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: grocy
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "X-XSS-Protection: 1";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "X-Frame-Options: SAMEORIGIN";
more_set_headers "Content-Security-Policy: frame-src 'self'; default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://nextcloud.jamma.life https://maxcdn.bootstrapcdn.com https://ajax.googleapis.com; img-src 'self' data: https://secure.gravatar.com; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://fonts.googleapis.com; font-src 'self' data: https://maxcdn.bootstrapcdn.com https://fonts.gstatic.com; form-action 'self'; upgrade-insecure-requests";
more_set_headers "Referrer-Policy: strict-origin-when-cross-origin";
more_set_headers "Permissions-Policy: geolocation=(none);midi=(self);notifications=(self);push=(self);sync-xhr=();microphone=(none);camera=(none);magnetometer=(none);gyroscope=(none);speaker=(self);vibrate=(self);fullscreen=(self);payment=(none);";
more_clear_headers "X-Powered-By";
spec:
tls:
- hosts:
- grocy.jamma.life
secretName: tls-jamma-grocy
rules:
- host: grocy.jamma.life
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: grocy
port:
number: 80

View File

@ -1,12 +0,0 @@
---
apiVersion: v1
kind: Service
metadata:
name: grocy
spec:
ports:
- name: http
port: 80
targetPort: 80
selector:
name: grocy

View File

@ -1 +0,0 @@
replicaCount: 1

View File

@ -1,7 +1,7 @@
apiVersion: v2 apiVersion: v2
name: invidious name: invidious
description: A helm chart for deploying invidious youtube front-end on kubernetes. description: A helm chart for deploying invidious youtube front-end on kubernetes.
version: 1.1.2 version: 1.1.3
appVersion: 0.20.1 appVersion: 0.20.1
dependencies: dependencies:
- name: postgresql - name: postgresql

44
invidious/README.org Normal file
View File

@ -0,0 +1,44 @@
#+TITLE: Invidious video frontend
#+AUTHOR: James Blair
#+EMAIL: mail@jamesblair.net
#+DATE: <2023-01-11 Wed 16:30>
[[https://github.com/iv-org/invidious][Invidious]] is an open source alternative front-end to YouTube.
*Key features*
- Lightweight
- No ads
- No tracking
- No JavaScript required
- Light/Dark themes
- Customizable homepage
- Subscriptions independent from Google
- Notifications for all subscribed channels
- Audio-only mode (with background play on mobile)
I created this simplified helm chart for self-hosting invidious in a container on ~k3s~ based on the excellent upstream [[https://github.com/iv-org/invidious/tree/master/kubernetes][official helm chart]]. Complete the steps below to deploy this chart.
#+NAME: Deploy invidious via helm
#+begin_src tmux
# Ensure invidious namespace exists
sudo kubectl create namespace jamma-invidious
# Create directories if they don't already exist
mkdir --parent "/home/${USER}/Services/invidious"
# Clone charts repository
cd "/home/${USER}/Services/invidious" && git clone https://invidious.jamma.life/jmhbnz/charts.git
# Ensure the repository is up to date
cd charts/invidious && git pull
# Install the chart
helm upgrade --install -n jamma-invidious jamma-invidious . \
--set "ingress.hosts[0].host=invidious.jamma.dev" \
--set "ingress.hosts[0].paths[0].path=/" \
--set "ingress.hosts[0].paths[0].pathType=Prefix" \
--set "ingress.tls[0].hosts[0]=invidious.jamma.dev" \
--set "ingress.tls[0].secretName=tls-jamma-invidious" \
--set "config.hmac_key=$(openssl rand -hex 20)"
#+end_src

View File

@ -16,7 +16,6 @@ resources:
cpu: 100m cpu: 100m
memory: 128Mi memory: 128Mi
limits: limits:
cpu: 2
memory: 1Gi memory: 1Gi
securityContext: securityContext:
@ -53,3 +52,4 @@ config:
full_refresh: false full_refresh: false
https_only: false https_only: false
domain: domain:
hmac_key: placeholder

View File

@ -1,6 +1,7 @@
---
apiVersion: v2 apiVersion: v2
name: jellyfin name: jellyfin
description: A helm chart for deploying the jellyfin media server on kubernetes. description: A helm chart for deploying the jellyfin media server on kubernetes.
type: application type: application
version: 0.1.6 version: 0.2.7
appVersion: "10.8.8-amd64" appVersion: "10.10.7"

View File

@ -8,7 +8,7 @@
I created this helm chart for self-hosting jellyfin in a container on ~k3s~. Complete the steps below to deploy this chart. I created this helm chart for self-hosting jellyfin in a container on ~k3s~. Complete the steps below to deploy this chart.
#+NAME: Deploy jellyfin via helm #+NAME: Deploy jellyfin via helm
#+begin_src tmate #+begin_src tmux
# Ensure jellyfin namespace exists # Ensure jellyfin namespace exists
sudo kubectl create namespace jamma-jellyfin sudo kubectl create namespace jamma-jellyfin
@ -22,8 +22,5 @@ cd "/home/${USER}/Services/jellyfin" && git clone https://gitea.jamma.life/jmhbn
cd charts/jellyfin && git pull cd charts/jellyfin && git pull
# Install the chart # Install the chart
helm upgrade --install -n jamma-jellyfin jamma-jellyfin . \ helm upgrade --install -n jamma-jellyfin jamma-jellyfin .
--set "ingress.hosts[0]=jellyfin.jamma.dev" \
--set "ingress.tls[0].hosts[0]=jellyfin.jamma.dev" \
--set "ingress.tls[0].secretName=tls-jamma-jellyfin"
#+end_src #+end_src

View File

@ -1,9 +1,9 @@
# Defaults for jellyfin ---
replicaCount: 1 replicaCount: 1
image: image:
repository: jellyfin/jellyfin repository: jellyfin/jellyfin
tag: 10.8.8-amd64 tag: 10.10.7
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
nameOverride: "" nameOverride: ""
@ -14,27 +14,7 @@ service:
port: 8096 port: 8096
ingress: ingress:
enabled: true enabled: false
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/proxy-body-size: 10G
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_clear_headers "X-Powered-By";
more_set_headers "X-XSS-Protection: 1";
more_set_headers "X-Frame-Options: SAMEORIGIN";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "Referrer-Policy: strict-origin-when-cross-origin";
more_set_headers "Permissions-Policy: geolocation=(none);midi=(self);notifications=(self);push=(self);sync-xhr=();microphone=(none);camera=(none);magnetometer=(none);gyroscope=(none);speaker=(self);vibrate=(self);fullscreen=(self);payment=(none);";
more_set_headers "Content-Security-Policy: base-uri 'none'; manifest-src 'self'; connect-src 'self' wss: ws: https://mb3admin.com; font-src 'self' data: ; form-action 'self'; frame-ancestors 'self'; worker-src 'self' blob:; frame-src 'self'; img-src data: https: http:; media-src 'self' blob: data:; object-src 'none'; script-src 'self' https://www.gstatic.com; style-src 'self' 'unsafe-inline'";
path: /
hosts:
- jellyfin.jamma.dev
tls:
- secretName: tls-jamma-jellyfin
hosts:
- jellyfin.jamma.dev
persistence: persistence:
config: config:
@ -59,7 +39,6 @@ persistence:
resources: resources:
limits: limits:
cpu: 10
memory: 12Gi memory: 12Gi
requests: requests:
cpu: 100m cpu: 100m

View File

@ -8,7 +8,7 @@
I created this helm chart for self-hosting wordpress in a container on ~k3s~. Complete the steps below to deploy this chart. I created this helm chart for self-hosting wordpress in a container on ~k3s~. Complete the steps below to deploy this chart.
#+NAME: Deploy wordpress via helm #+NAME: Deploy wordpress via helm
#+begin_src tmate #+begin_src tmux
# Ensure wordpress namespace exists # Ensure wordpress namespace exists
kubectl create namespace jamma-wordpress kubectl create namespace jamma-wordpress