mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c2e4b591e | ||
|
|
f553fb891c | ||
|
|
daa4abc6d6 | ||
|
|
bdf4aafbbb | ||
|
|
2e597ee105 | ||
|
|
d59aabb30c | ||
|
|
303c9704b3 | ||
|
|
bf6cf818c4 | ||
|
|
4a7a84919c | ||
|
|
324356a59d | ||
|
|
7319cf932b | ||
|
|
933b65b3dd | ||
|
|
8353dc8d0a | ||
|
|
abdd4b81c4 | ||
|
|
4691ab1139 | ||
|
|
249447b4ba | ||
|
|
5e2456bea7 | ||
|
|
6fc2cf5fd1 | ||
|
|
0f20fa0b5a | ||
|
|
a10ac58dad | ||
|
|
032a940815 | ||
|
|
5707e2124c | ||
|
|
637e1c43c5 | ||
|
|
da365d0667 | ||
|
|
83deab79ec | ||
|
|
cfc7d13b99 | ||
|
|
fee900fa72 | ||
|
|
9928f908a0 | ||
|
|
d091f3030b | ||
|
|
44ead050c7 | ||
|
|
c5a15ed5d4 | ||
|
|
a27dd320e6 | ||
|
|
0c53bf72e4 | ||
|
|
b8c7930650 | ||
|
|
eae83bf0dd | ||
|
|
42cc50948d | ||
|
|
ff06613e99 | ||
|
|
9fe279b1b5 |
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -55,10 +55,12 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
working-directory: images/operator
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Run tests
|
||||
working-directory: images/operator
|
||||
run: pnpm test
|
||||
|
||||
update-release-draft:
|
||||
|
||||
65
.github/workflows/publish-backup-tag.yml
vendored
Normal file
65
.github/workflows/publish-backup-tag.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Publish tag
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
env:
|
||||
environment: test
|
||||
release_channel: latest
|
||||
DO_NOT_TRACK: "1"
|
||||
NODE_VERSION: "23.x"
|
||||
DOCKER_REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}-backup
|
||||
PNPM_VERSION: 10.6.0
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
pages: write
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||
with:
|
||||
registry: ${{ env.DOCKER_REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@032a4b3bda1b716928481836ac5bfe36e1feaad6
|
||||
with:
|
||||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
id: push
|
||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||
with:
|
||||
context: ./images/backup
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-name: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME}}
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
push-to-registry: true
|
||||
6
.github/workflows/publish-tag.yml
vendored
6
.github/workflows/publish-tag.yml
vendored
@@ -3,7 +3,7 @@ name: Publish tag
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- "main"
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
@@ -44,7 +44,7 @@ jobs:
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||
uses: docker/metadata-action@032a4b3bda1b716928481836ac5bfe36e1feaad6
|
||||
with:
|
||||
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
id: push
|
||||
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||
with:
|
||||
context: .
|
||||
context: ./images/operator
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
16
.github/workflows/renovate.yml
vendored
Normal file
16
.github/workflows/renovate.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Renovate
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 */6 * * *"
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v40.2.2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
configurationFile: ./renovate.json5
|
||||
41
.gitignore
vendored
41
.gitignore
vendored
@@ -1,39 +1,4 @@
|
||||
# dependencies (bun install)
|
||||
node_modules
|
||||
|
||||
# output
|
||||
out
|
||||
dist
|
||||
*.tgz
|
||||
|
||||
# code coverage
|
||||
coverage
|
||||
*.lcov
|
||||
|
||||
# logs
|
||||
logs
|
||||
_.log
|
||||
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
# caches
|
||||
.eslintcache
|
||||
.cache
|
||||
*.tsbuildinfo
|
||||
|
||||
# IntelliJ based IDEs
|
||||
.idea
|
||||
|
||||
# Finder (MacOS) folder config
|
||||
.DS_Store
|
||||
|
||||
/data/
|
||||
|
||||
/cloudflare.yaml
|
||||
/secret.*.yaml
|
||||
/data/
|
||||
/.envrc
|
||||
*.DS_Store
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
3.13
|
||||
BIN
assets/2025-09-06-12-29-07.png
Normal file
BIN
assets/2025-09-06-12-29-07.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
BIN
assets/2025-09-06-12-29-15.png
Normal file
BIN
assets/2025-09-06-12-29-15.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
BIN
assets/2025-09-06-12-29-26.png
Normal file
BIN
assets/2025-09-06-12-29-26.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
136
charts/apps/AGENT.md
Normal file
136
charts/apps/AGENT.md
Normal file
@@ -0,0 +1,136 @@
|
||||
# Agent Documentation
|
||||
|
||||
This document describes how to create a new application chart for the homelab operator.
|
||||
|
||||
## Chart Structure
|
||||
|
||||
Each application has its own chart located in a directory under `charts/apps`. The chart should contain the following files:
|
||||
|
||||
- `Chart.yaml`: The chart metadata.
|
||||
- `values.yaml`: The default values for the chart.
|
||||
- `templates/`: A directory containing the Kubernetes resource templates.
|
||||
|
||||
## Custom Resources
|
||||
|
||||
The homelab operator uses several custom resources to manage applications. These resources are defined in the `templates` directory of the chart.
|
||||
|
||||
### `PostgresDatabase`
|
||||
|
||||
If the application requires a PostgreSQL database, you can create a `PostgresDatabase` resource. The operator will automatically create a database and a secret containing the connection details. The secret will have the same name as the release with a `-pg-connection` postfix.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
# templates/database.yaml
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: PostgresDatabase
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
```
|
||||
|
||||
The secret has the following values:
|
||||
|
||||
- `database`: name of the created database
|
||||
- `host`: the hostname of the postgres server
|
||||
- `port`: the port of the postgres server
|
||||
- `url`: combined url in the format `postgresql://{user}:{password}@{host}:{port}/{database}`
|
||||
|
||||
### `OidcClient`
|
||||
|
||||
If the application requires OIDC authentication, you can create an `OidcClient` resource. The operator will automatically create an OIDC client and a secret containing the client ID and secret. The secret will have the same name as the release with a `-client` postfix.
|
||||
|
||||
You need to specify the redirect URIs for the OIDC client. The subdomain is taken from the `values.yaml` file.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
# templates/client.yaml
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: OidcClient
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
redirectUris:
|
||||
- path: /user/oauth2/Authentik/callback
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
matchingMode: strict
|
||||
```
|
||||
|
||||
The secret has the following value:
|
||||
|
||||
- `authorization`: Authorization endpoint
|
||||
- `clientId`
|
||||
- `clientSecret`
|
||||
- `configuration`: autodiscovery endpoint
|
||||
- `configurationIssuer`: issuer url
|
||||
- `endSession`: end session endpoint
|
||||
- `jwks`: jwks endpoint
|
||||
- `token`: token endpoint
|
||||
- `userinfo`: user info endpoint
|
||||
|
||||
### `HttpService` and `ExternalHttpService`
|
||||
|
||||
To expose the application, you can use either an `HttpService` or an `ExternalHttpService` resource.
|
||||
|
||||
- `HttpService`: This will expose the application through the Istio gateway. This is for internal access only.
|
||||
- `ExternalHttpService`: This will expose the application through a CloudFlare tunnel. This is for external access.
|
||||
|
||||
Both resources take a `subdomain` and a `destination` as parameters. The `destination` is the Kubernetes service to route traffic to.
|
||||
|
||||
Example of `HttpService`:
|
||||
|
||||
```yaml
|
||||
# templates/http-service.yaml
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: HttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
Example of `ExternalHttpService`:
|
||||
|
||||
```yaml
|
||||
# templates/external-http-service.yaml
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: ExternalHttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
port:
|
||||
number: 80
|
||||
```
|
||||
|
||||
## `values.yaml`
|
||||
|
||||
The `values.yaml` file should contain the following values:
|
||||
|
||||
- `globals.environment`: The environment the application is running in (e.g., `prod`, `dev`).
|
||||
- `image.repository`: The Docker image repository.
|
||||
- `image.tag`: The Docker image tag.
|
||||
- `subdomain`: The subdomain for the application.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
# values.yaml
|
||||
globals:
|
||||
environment: prod
|
||||
image:
|
||||
repository: docker.gitea.com/gitea
|
||||
tag: latest
|
||||
subdomain: gitea
|
||||
```
|
||||
@@ -1,3 +1,3 @@
|
||||
apiVersion: v2
|
||||
version: 1.0.0
|
||||
name: ByteStash
|
||||
name: apprise
|
||||
43
charts/apps/apprise/templates/deployment.yaml
Normal file
43
charts/apps/apprise/templates/deployment.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ .Values.globals.timezone }}"
|
||||
- name: BASE_URL
|
||||
value: https://{{ .Values.subdomain }}.{{ .Values.globals.domain }}
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: data
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
11
charts/apps/apprise/templates/http-service.yaml
Normal file
11
charts/apps/apprise/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: HttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}"
|
||||
port:
|
||||
number: 80
|
||||
15
charts/apps/apprise/templates/service.yaml
Normal file
15
charts/apps/apprise/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: "{{ .Release.Name }}"
|
||||
9
charts/apps/apprise/values.yaml
Normal file
9
charts/apps/apprise/values.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
globals:
|
||||
environment: prod
|
||||
timezone: Europe/Amsterdam
|
||||
domain: olsen.cloud
|
||||
image:
|
||||
repository: docker.io/caronc/apprise
|
||||
tag: latest@sha256:127b3834f0679502529397ead8ffeaadf5189019c4c863fa6652e9b942fdccf8
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: apprise
|
||||
@@ -2,6 +2,6 @@ globals:
|
||||
environment: prod
|
||||
image:
|
||||
repository: ghcr.io/advplyr/audiobookshelf
|
||||
tag: 2.26.1
|
||||
tag: 2.26.1@sha256:5901162ccdf4b44f563ff2012484d5e315d9a1ecd6af86f7fe605ec96bbc5039
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: audiobookshelf
|
||||
3
charts/apps/baikal/Chart.yaml
Normal file
3
charts/apps/baikal/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
version: 1.0.0
|
||||
name: esphome
|
||||
46
charts/apps/baikal/templates/deployment.yaml
Normal file
46
charts/apps/baikal/templates/deployment.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ .Values.globals.timezone }}"
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/baikal/Specific
|
||||
name: data
|
||||
- mountPath: /var/www/baikal/config
|
||||
name: config
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: "{{ .Release.Name }}-config"
|
||||
11
charts/apps/baikal/templates/http-service.yaml
Normal file
11
charts/apps/baikal/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: HttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}"
|
||||
port:
|
||||
number: 80
|
||||
24
charts/apps/baikal/templates/pvc.yaml
Normal file
24
charts/apps/baikal/templates/pvc.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-data"
|
||||
spec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: "1Gi"
|
||||
storageClassName: "{{ .Values.globals.environment }}"
|
||||
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-config"
|
||||
spec:
|
||||
accessModes:
|
||||
- "ReadWriteOnce"
|
||||
resources:
|
||||
requests:
|
||||
storage: "1Gi"
|
||||
storageClassName: "{{ .Values.globals.environment }}"
|
||||
15
charts/apps/baikal/templates/service.yaml
Normal file
15
charts/apps/baikal/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: "{{ .Release.Name }}"
|
||||
9
charts/apps/baikal/values.yaml
Normal file
9
charts/apps/baikal/values.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
globals:
|
||||
environment: prod
|
||||
timezone: Europe/Amsterdam
|
||||
domain: olsen.cloud
|
||||
image:
|
||||
repository: docker.io/ckulka/baikal
|
||||
tag: nginx@sha256:27bd9afbb8142c2143b6959c023074b05c86356ded0f589fcb1424ab5fbe0a70
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: baikal
|
||||
@@ -1,50 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}'
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
serviceName: '{{ .Release.Name }}-headless'
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: '{{ .Release.Name }}'
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: ghcr.io/jordan-dalby/bytestash:latest
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
name: http
|
||||
env:
|
||||
- name: ALLOW_NEW_ACCOUNTS
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: DISABLE_INTERNAL_ACCOUNTS
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: OIDC_ENABLED
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: OIDC_DISPLAY_NAME
|
||||
value: OIDC
|
||||
- name: OIDC_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-client'
|
||||
name: "{{ .Release.Name }}-client"
|
||||
key: clientId
|
||||
- name: OIDC_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-client'
|
||||
name: "{{ .Release.Name }}-client"
|
||||
key: clientSecret
|
||||
- name: OIDC_ISSUER_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-client'
|
||||
key: configuration
|
||||
name: "{{ .Release.Name }}-client"
|
||||
key: configurationIssuer
|
||||
|
||||
volumeMounts:
|
||||
- mountPath: /data/snippets
|
||||
@@ -52,4 +51,4 @@ spec:
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: '{{ .Release.Name }}-data'
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
3
charts/apps/calibre-web/Chart.yaml
Normal file
3
charts/apps/calibre-web/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
version: 1.0.0
|
||||
name: calibre-web
|
||||
@@ -6,5 +6,5 @@ spec:
|
||||
environment: '{{ .Values.globals.environment }}'
|
||||
redirectUris:
|
||||
- path: /api/auth/oidc/callback
|
||||
subdomain: bytestash
|
||||
subdomain: '{{ .Values.subdomain }}'
|
||||
matchingMode: strict
|
||||
42
charts/apps/calibre-web/templates/deployment.yaml
Normal file
42
charts/apps/calibre-web/templates/deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- containerPort: 8083
|
||||
name: http
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ .Values.globals.timezone }}"
|
||||
- name: PUID
|
||||
value: "1000"
|
||||
- name: PGID
|
||||
value: "1000"
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: data
|
||||
- mountPath: /books
|
||||
name: books
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
- name: books
|
||||
persistentVolumeClaim:
|
||||
claimName: books
|
||||
11
charts/apps/calibre-web/templates/http-service.yaml
Normal file
11
charts/apps/calibre-web/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: HttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}"
|
||||
port:
|
||||
number: 80
|
||||
15
charts/apps/calibre-web/templates/service.yaml
Normal file
15
charts/apps/calibre-web/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8083
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: "{{ .Release.Name }}"
|
||||
9
charts/apps/calibre-web/values.yaml
Normal file
9
charts/apps/calibre-web/values.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
globals:
|
||||
environment: prod
|
||||
domain: olsen.cloud
|
||||
timezone: Europe/Amsterdam
|
||||
image:
|
||||
repository: lscr.io/linuxserver/calibre-web
|
||||
tag: latest@sha256:98a20064168ab284bbb8e048af48c89a5e25650f35a4b217705241af94c1debe
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: calibre-web
|
||||
@@ -1,13 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}-headless'
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- port: 5000
|
||||
name: http
|
||||
selector:
|
||||
app: '{{ .Release.Name }}'
|
||||
@@ -1,55 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}'
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
spec:
|
||||
serviceName: '{{ .Release.Name }}-headless'
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: '{{ .Release.Name }}'
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
spec:
|
||||
containers:
|
||||
- name: '{{ .Release.Name }}'
|
||||
image: ghcr.io/miniflux/miniflux:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
env:
|
||||
- name: ALLOW_NEW_ACCOUNTS
|
||||
value: 'true'
|
||||
- name: DISABLE_INTERNAL_ACCOUNTS
|
||||
value: 'true'
|
||||
- name: OIDC_ENABLED
|
||||
value: 'true'
|
||||
- name: OIDC_DISPLAY_NAME
|
||||
value: OIDC
|
||||
- name: OIDC_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-client'
|
||||
key: clientId
|
||||
- name: OIDC_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-client'
|
||||
key: clientSecret
|
||||
- name: OIDC_ISSUER_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-client'
|
||||
key: configuration
|
||||
|
||||
volumeMounts:
|
||||
- mountPath: /data/snippets
|
||||
name: data
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: '{{ .Release.Name }}-data'
|
||||
@@ -1,3 +0,0 @@
|
||||
globals:
|
||||
environment: prod
|
||||
subdomain: miniflux
|
||||
@@ -1,28 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: books
|
||||
labels:
|
||||
type: nfs
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: manual-books
|
||||
nfs:
|
||||
path: '{{ .Values.books.path }}'
|
||||
server: '{{ .Values.host }}'
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: books
|
||||
spec:
|
||||
storageClassName: manual-books
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -1,28 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: movies
|
||||
labels:
|
||||
type: nfs
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: manual-movies
|
||||
nfs:
|
||||
path: '{{ .Values.movies.path }}'
|
||||
server: '{{ .Values.host }}'
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: movies
|
||||
spec:
|
||||
storageClassName: manual-movies
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -1,28 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: music
|
||||
labels:
|
||||
type: nfs
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: manual-music
|
||||
nfs:
|
||||
path: '{{ .Values.music.path }}'
|
||||
server: '{{ .Values.host }}'
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: music
|
||||
spec:
|
||||
storageClassName: manual-music
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -1,28 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: tvshows
|
||||
labels:
|
||||
type: nfs
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
storageClassName: manual-tvshows
|
||||
nfs:
|
||||
path: '{{ .Values.tvshows.path }}'
|
||||
server: '{{ .Values.host }}'
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: tvshows
|
||||
spec:
|
||||
storageClassName: manual-tvshows
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
@@ -1,11 +0,0 @@
|
||||
host: 192.168.20.106
|
||||
movies:
|
||||
path: /mnt/HDD/Movies
|
||||
tvshows:
|
||||
path: /mnt/HDD/TV-Shows
|
||||
music:
|
||||
path: /mnt/HDD/Music2
|
||||
books:
|
||||
path: /mnt/HDD/Books
|
||||
podcasts:
|
||||
path: /mnt/HDD/Podcasts
|
||||
@@ -2,6 +2,6 @@ globals:
|
||||
environment: prod
|
||||
image:
|
||||
repository: ghcr.io/coder/coder
|
||||
tag: latest
|
||||
tag: latest@sha256:73714e0685addde01bbff905cf5b647d6b677d77977c8009b6293d40fdf0f562
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: coder
|
||||
3
charts/apps/esphome/Chart.yaml
Normal file
3
charts/apps/esphome/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
version: 1.0.0
|
||||
name: esphome
|
||||
42
charts/apps/esphome/templates/deployment.yaml
Normal file
42
charts/apps/esphome/templates/deployment.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 6052
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ .Values.globals.timezone }}"
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: data
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
11
charts/apps/esphome/templates/http-service.yaml
Normal file
11
charts/apps/esphome/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: HttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}"
|
||||
port:
|
||||
number: 80
|
||||
15
charts/apps/esphome/templates/service.yaml
Normal file
15
charts/apps/esphome/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 6052
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: "{{ .Release.Name }}"
|
||||
9
charts/apps/esphome/values.yaml
Normal file
9
charts/apps/esphome/values.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
globals:
|
||||
environment: prod
|
||||
timezone: Europe/Amsterdam
|
||||
domain: olsen.cloud
|
||||
image:
|
||||
repository: ghcr.io/esphome/esphome
|
||||
tag: latest@sha256:393775c4c02e0b09d086cd794815a723f90d4af7c3d871935e22be1a34c5d89a
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: esphome
|
||||
@@ -1,23 +1,23 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}'
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: '{{ .Release.Name }}'
|
||||
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
@@ -36,64 +36,68 @@ spec:
|
||||
name: data
|
||||
env:
|
||||
- name: TZ
|
||||
value: '{{ .Values.globals.timezone }}'
|
||||
value: "{{ .Values.globals.timezone }}"
|
||||
- name: USER_UID
|
||||
value: '1000'
|
||||
value: "1000"
|
||||
- name: USER_GID
|
||||
value: '1000'
|
||||
value: "1000"
|
||||
- name: GITEA__server__SSH_DOMAIN
|
||||
value: ssh-gitea.olsen.cloud
|
||||
- name: GITEA__server__SSH_PORT
|
||||
value: "2205"
|
||||
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_PASSWORD
|
||||
value: 'true'
|
||||
value: "true"
|
||||
#- name: GITEA__service__ENABLE_BASIC_AUTHENTICATION
|
||||
# value: 'true'
|
||||
- name: GITEA__service__ENABLE_PASSWORD_SIGNIN_FORM
|
||||
value: 'false'
|
||||
value: "false"
|
||||
- name: GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: GITEA__service__DEFAULT_USER_IS_RESTRICTED
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: GITEA__service__DEFAULT_USER_VISIBILITY
|
||||
value: 'private'
|
||||
value: "private"
|
||||
- name: GITEA__service__DEFAULT_ORG_VISIBILITY
|
||||
value: 'private'
|
||||
value: "private"
|
||||
- name: GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: GITEA__other__SHOW_FOOTER_POWERED_BY
|
||||
value: 'false'
|
||||
value: "false"
|
||||
- name: GITEA__other__SHOW_FOOTER_TEMPLATE_LOAD_TIME
|
||||
value: 'false'
|
||||
value: "false"
|
||||
- name: GITEA__other__SHOW_FOOTER_VERSION
|
||||
value: 'false'
|
||||
value: "false"
|
||||
- name: GITEA__repository__ENABLE_PUSH_CREATE_USER
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: GITEA__repository__ENABLE_PUSH_CREATE_ORG
|
||||
value: 'true'
|
||||
value: "true"
|
||||
- name: GITEA__openid__ENABLE_OPENID_SIGNIN
|
||||
value: 'false'
|
||||
value: "false"
|
||||
- name: GITEA__openid__ENABLE_OPENID_SIGNUP
|
||||
value: 'false'
|
||||
value: "false"
|
||||
- name: GITEA__database__DB_TYPE
|
||||
value: postgres
|
||||
- name: GITEA__database__NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-pg-connection'
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: database
|
||||
- name: GITEA__database__HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-pg-connection'
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: host
|
||||
- name: GITEA__database__USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-pg-connection'
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: user
|
||||
- name: GITEA__database__PASSWD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ .Release.Name }}-pg-connection'
|
||||
name: "{{ .Release.Name }}-pg-connection"
|
||||
key: password
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: '{{ .Release.Name }}-data'
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
@@ -1,9 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}'
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
@@ -12,21 +12,21 @@ spec:
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: '{{ .Release.Name }}-ssh'
|
||||
name: "{{ .Release.Name }}-ssh"
|
||||
labels:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- port: 2202
|
||||
- port: 2205
|
||||
targetPort: 22
|
||||
protocol: TCP
|
||||
name: ssh
|
||||
selector:
|
||||
app: '{{ .Release.Name }}'
|
||||
app: "{{ .Release.Name }}"
|
||||
@@ -3,6 +3,6 @@ globals:
|
||||
timezone: Europe/Amsterdam
|
||||
image:
|
||||
repository: docker.gitea.com/gitea
|
||||
tag: latest
|
||||
tag: latest@sha256:2edc102cbb636ae1ddac5fa0c715aa5b03079dee13ac6800b2cef6d4e912e718
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: gitea
|
||||
@@ -2,6 +2,6 @@ globals:
|
||||
environment: prod
|
||||
image:
|
||||
repository: headscale/headscale
|
||||
tag: latest
|
||||
tag: latest@sha256:ea9b5ee06274d757a4d52103de56cd11a9c393acb19d9a35f4b9fe52ada410de
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: headscale
|
||||
10
charts/apps/homarr/templates/client.yaml
Normal file
10
charts/apps/homarr/templates/client.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: OidcClient
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
redirectUris:
|
||||
- path: /api/auth/callback/oidc
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
matchingMode: strict
|
||||
83
charts/apps/homarr/templates/deployment.yaml
Normal file
83
charts/apps/homarr/templates/deployment.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: "{{ .Release.Name }}"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: "{{ .Release.Name }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 7575
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
volumeMounts:
|
||||
- mountPath: /appdata
|
||||
name: data
|
||||
env:
|
||||
- name: BASE_URL
|
||||
value: https://homarr.olsen.cloud # TODO
|
||||
|
||||
- name: NEXTAUTH_URL
|
||||
value: https://homarr.olsen.cloud
|
||||
|
||||
- name: AUTH_PROVIDERS
|
||||
value: oidc
|
||||
|
||||
- name: AUTH_OIDC_CLIENT_NAME
|
||||
value: Authentik
|
||||
|
||||
- name: AUTH_OIDC_SCOPE_OVERWRITE
|
||||
value: openid email profile
|
||||
|
||||
- name: AUTH_OIDC_GROUPS_ATTRIBUTE
|
||||
value: groups
|
||||
|
||||
- name: AUTH_OIDC_AUTO_LOGIN
|
||||
value: "true"
|
||||
|
||||
- name: SECRET_ENCRYPTION_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-secrets"
|
||||
key: encryptionkey
|
||||
|
||||
- name: AUTH_OIDC_ISSUER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-client"
|
||||
key: configurationIssuer
|
||||
|
||||
- name: AUTH_OIDC_CLIENT_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-client"
|
||||
key: clientId
|
||||
|
||||
- name: AUTH_OIDC_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: "{{ .Release.Name }}-client"
|
||||
key: clientSecret
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: "{{ .Release.Name }}-data"
|
||||
11
charts/apps/homarr/templates/http-service.yaml
Normal file
11
charts/apps/homarr/templates/http-service.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: HttpService
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
destination:
|
||||
host: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||
port:
|
||||
number: 80
|
||||
9
charts/apps/homarr/templates/secret.yaml
Normal file
9
charts/apps/homarr/templates/secret.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: GenerateSecret
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-secrets"
|
||||
spec:
|
||||
fields:
|
||||
- name: encryptionkey
|
||||
encoding: hex
|
||||
length: 64
|
||||
15
charts/apps/homarr/templates/service.yaml
Normal file
15
charts/apps/homarr/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
labels:
|
||||
app: "{{ .Release.Name }}"
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 7575
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: "{{ .Release.Name }}"
|
||||
7
charts/apps/homarr/values.yaml
Normal file
7
charts/apps/homarr/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
globals:
|
||||
environment: prod
|
||||
image:
|
||||
repository: ghcr.io/homarr-labs/homarr
|
||||
tag: latest@sha256:7d58149aa544037d173a48f41fbde86706068d2b8933a33a911dce26457ecf16
|
||||
pullPolicy: IfNotPresent
|
||||
subdomain: homarr
|
||||
3
charts/apps/home-assistant/Chart.yaml
Normal file
3
charts/apps/home-assistant/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
apiVersion: v2
|
||||
version: 1.0.0
|
||||
name: home-assistant
|
||||
10
charts/apps/home-assistant/templates/client.yaml
Normal file
10
charts/apps/home-assistant/templates/client.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: homelab.mortenolsen.pro/v1
|
||||
kind: OidcClient
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
spec:
|
||||
environment: "{{ .Values.globals.environment }}"
|
||||
redirectUris:
|
||||
- path: /auth/openid/callback
|
||||
subdomain: "{{ .Values.subdomain }}"
|
||||
matchingMode: strict
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user