mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff06613e99 | ||
|
|
9fe279b1b5 | ||
|
|
63e0ef0909 | ||
|
|
a44e3cb2be | ||
|
|
8f5e148bb2 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -36,3 +36,4 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
|||||||
/data/
|
/data/
|
||||||
|
|
||||||
/cloudflare.yaml
|
/cloudflare.yaml
|
||||||
|
/secret.*.yaml
|
||||||
|
|||||||
3
TODO.md
Normal file
3
TODO.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
TODO:
|
||||||
|
* Set location provisioner path permissions
|
||||||
|
* Limit postgres connections in reconciler
|
||||||
@@ -6,5 +6,5 @@ spec:
|
|||||||
environment: '{{ .Values.globals.environment }}'
|
environment: '{{ .Values.globals.environment }}'
|
||||||
redirectUris:
|
redirectUris:
|
||||||
- path: /api/auth/oidc/callback
|
- path: /api/auth/oidc/callback
|
||||||
subdomain: bytestash
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
matchingMode: strict
|
matchingMode: strict
|
||||||
10
charts/apps/charts/coder/templates/client.yaml
Normal file
10
charts/apps/charts/coder/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/v2/users/oidc/callback
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
73
charts/apps/charts/coder/templates/deployment.yaml
Normal file
73
charts/apps/charts/coder/templates/deployment.yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
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:
|
||||||
|
serviceAccountName: '{{ .Release.Name }}-serviceaccount'
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
|
||||||
|
imagePullPolicy: '{{ .Values.image.pullPolicy }}'
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 7080
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /home/coder/.config
|
||||||
|
name: data
|
||||||
|
env:
|
||||||
|
- name: CODER_HTTP_ADDRESS
|
||||||
|
value: '0.0.0.0:7080'
|
||||||
|
- name: CODER_OIDC_ALLOWED_GROUPS
|
||||||
|
value: admin
|
||||||
|
- name: CODER_OIDC_GROUP_FIELD
|
||||||
|
value: groups
|
||||||
|
- name: CODER_ACCESS_URL
|
||||||
|
value: https://coder.olsen.cloud
|
||||||
|
- name: CODER_OIDC_ICON_URL
|
||||||
|
value: https://authentik.olsen.cloud/static/dist/assets/icons/icon.png
|
||||||
|
- name: CODER_DISABLE_PASSWORD_AUTH
|
||||||
|
value: 'true'
|
||||||
|
- name: CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS
|
||||||
|
value: 'false'
|
||||||
|
- name: CODER_OIDC_SIGN_IN_TEXT
|
||||||
|
value: 'Sign in with OIDC'
|
||||||
|
- name: CODER_OIDC_SCOPES
|
||||||
|
value: openid,profile,email,offline_access
|
||||||
|
- name: CODER_OIDC_ISSUER_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: configurationIssuer
|
||||||
|
- name: CODER_OIDC_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientId
|
||||||
|
- name: CODER_OIDC_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientSecret
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
11
charts/apps/charts/coder/templates/http-service.yaml
Normal file
11
charts/apps/charts/coder/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
|
||||||
21
charts/apps/charts/coder/templates/role.yaml
Normal file
21
charts/apps/charts/coder/templates/role.yaml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-workspace-creator'
|
||||||
|
rules:
|
||||||
|
- apiGroups: [''] # "" indicates the core API group (for Pods, PVCs, Services)
|
||||||
|
resources: ['pods', 'pods/exec', 'pods/log', 'persistentvolumeclaims', 'services']
|
||||||
|
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch', 'delete']
|
||||||
|
- apiGroups: ['apps'] # For Deployments, StatefulSets
|
||||||
|
resources: ['deployments', 'statefulsets']
|
||||||
|
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch', 'delete']
|
||||||
|
- apiGroups: ['networking.k8s.io'] # For Ingresses
|
||||||
|
resources: ['ingresses']
|
||||||
|
verbs: ['get', 'list', 'watch', 'create', 'update', 'patch', 'delete']
|
||||||
|
- apiGroups: ['events.k8s.io'] # For events related to workspace activity
|
||||||
|
resources: ['events']
|
||||||
|
verbs: ['create', 'patch', 'update'] # Coder might create events for workspace lifecycle
|
||||||
|
# Add any other resources that Coder workspace templates might create (e.g., secrets, configmaps)
|
||||||
|
# - apiGroups: [""]
|
||||||
|
# resources: ["secrets", "configmaps"]
|
||||||
|
# verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
||||||
13
charts/apps/charts/coder/templates/rolebinding.yaml
Normal file
13
charts/apps/charts/coder/templates/rolebinding.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-workspace-creator-binding'
|
||||||
|
namespace: '{{ .Release.Namespace }}'
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: '{{ .Release.Name }}-serviceaccount'
|
||||||
|
namespace: '{{ .Release.Namespace }}'
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: '{{ .Release.Name }}-workspace-creator'
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
@@ -8,7 +8,7 @@ spec:
|
|||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
targetPort: 3000
|
targetPort: 7080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: http
|
name: http
|
||||||
selector:
|
selector:
|
||||||
5
charts/apps/charts/coder/templates/serviceaccount.yaml
Normal file
5
charts/apps/charts/coder/templates/serviceaccount.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-serviceaccount'
|
||||||
|
namespace: '{{ .Release.Namespace }}'
|
||||||
7
charts/apps/charts/coder/values.yaml
Normal file
7
charts/apps/charts/coder/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/coder/coder
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: coder
|
||||||
36
charts/apps/charts/gitea/templates/_runner-deployment.yaml
Normal file
36
charts/apps/charts/gitea/templates/_runner-deployment.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-runner'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}-runner'
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: '{{ .Release.Name }}-runner'
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}-runner'
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}-runner'
|
||||||
|
image: docker.io/gitea/act_runner:latest-dind-rootless
|
||||||
|
env:
|
||||||
|
- name: GITEA_INSTANCE_URL
|
||||||
|
value: '{{ .Release.Name }}'
|
||||||
|
- name: GITEA_RUNNER_NAME
|
||||||
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-runner'
|
||||||
|
key: registration_token
|
||||||
|
- name: DOCKER_HOST
|
||||||
|
value: tcp://localhost:2376
|
||||||
|
- name: DOCKER_CERT_PATH
|
||||||
|
value: /certs/client
|
||||||
|
- name: DOCKER_TLS_VERIFY
|
||||||
|
value: '1'
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
@@ -22,6 +22,9 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
containerPort: 3000
|
containerPort: 3000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
- name: ssh
|
||||||
|
containerPort: 22
|
||||||
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: http
|
port: http
|
||||||
@@ -40,8 +43,8 @@ spec:
|
|||||||
value: '1000'
|
value: '1000'
|
||||||
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_PASSWORD
|
- name: GITEA__service__REQUIRE_EXTERNAL_REGISTRATION_PASSWORD
|
||||||
value: 'true'
|
value: 'true'
|
||||||
- name: GITEA__service__ENABLE_BASIC_AUTHENTICATION
|
#- name: GITEA__service__ENABLE_BASIC_AUTHENTICATION
|
||||||
value: 'true'
|
# value: 'true'
|
||||||
- name: GITEA__service__ENABLE_PASSWORD_SIGNIN_FORM
|
- name: GITEA__service__ENABLE_PASSWORD_SIGNIN_FORM
|
||||||
value: 'false'
|
value: 'false'
|
||||||
- name: GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE
|
- name: GITEA__service__DEFAULT_KEEP_EMAIL_PRIVATE
|
||||||
32
charts/apps/charts/gitea/templates/service.yaml
Normal file
32
charts/apps/charts/gitea/templates/service.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-ssh'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 2202
|
||||||
|
targetPort: 22
|
||||||
|
protocol: TCP
|
||||||
|
name: ssh
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
3
charts/apps/charts/headscale/Chart.yaml
Normal file
3
charts/apps/charts/headscale/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: headscale
|
||||||
10
charts/apps/charts/headscale/templates/client.yaml
Normal file
10
charts/apps/charts/headscale/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: /oidc/callback
|
||||||
|
subdomain: '{{ .Values.subdomain }}'
|
||||||
|
matchingMode: strict
|
||||||
70
charts/apps/charts/headscale/templates/config-map.yaml
Normal file
70
charts/apps/charts/headscale/templates/config-map.yaml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-config-template'
|
||||||
|
data:
|
||||||
|
config.yaml.template: |
|
||||||
|
server_url: ${PUBLIC_URL}
|
||||||
|
listen_addr: 0.0.0.0:8080
|
||||||
|
metrics_listen_addr: 0.0.0.0:9090
|
||||||
|
grpc_listen_addr: 0.0.0.0:50443
|
||||||
|
|
||||||
|
private_key_path: /var/lib/headscale/private_key # Path inside the container
|
||||||
|
|
||||||
|
noise:
|
||||||
|
private_key_path: /var/lib/headscale/noise_private_key # Path inside the container
|
||||||
|
|
||||||
|
listen_routes: false
|
||||||
|
base_domain: "${PUBLIC_URL}" # For client routes and DNS push.
|
||||||
|
|
||||||
|
derp:
|
||||||
|
server:
|
||||||
|
enabled: false
|
||||||
|
region_id: 999
|
||||||
|
region_code: "headscale"
|
||||||
|
region_name: "Headscale Embedded DERP"
|
||||||
|
stun_listen_addr: "0.0.0.0:3478"
|
||||||
|
automatically_add_embedded_derp_region: true
|
||||||
|
urls:
|
||||||
|
- https://controlplane.tailscale.com/derpmap/default
|
||||||
|
auto_update_enabled: true
|
||||||
|
update_frequency: 24h
|
||||||
|
|
||||||
|
oidc:
|
||||||
|
enabled: true
|
||||||
|
only_start_if_oidc_is_available: true
|
||||||
|
issuer: "${OIDC_ISSUER_URL}"
|
||||||
|
client_id: "${OIDC_CLIENT_ID}"
|
||||||
|
client_secret: "${OIDC_CLIENT_SECRET}"
|
||||||
|
scopes: ["openid", "profile", "email"]
|
||||||
|
redirect_url: "${PUBLIC_URL}/oidc/callback"
|
||||||
|
pkce:
|
||||||
|
enabled: true
|
||||||
|
method: S256
|
||||||
|
|
||||||
|
|
||||||
|
# DNS configuration
|
||||||
|
dns:
|
||||||
|
magic_dns: false
|
||||||
|
override_local_dns: true # Push Headscale's DNS settings to clients
|
||||||
|
ttl: 60
|
||||||
|
nameservers:
|
||||||
|
global:
|
||||||
|
- 1.1.1.1 # Cloudflare DNS
|
||||||
|
#- 10.43.0.10 # Replace with your ClusterIP for kube-dns/CoreDNS
|
||||||
|
# Domains to search for (e.g., for Kubernetes services)
|
||||||
|
search_domains:
|
||||||
|
- svc.cluster.local
|
||||||
|
- cluster.local
|
||||||
|
|
||||||
|
auto_create_users: true
|
||||||
|
|
||||||
|
oidc_user_property: preferred_username # Or 'email' or 'sub'
|
||||||
|
|
||||||
|
prefixes:
|
||||||
|
v4: 10.20.20.0/24 # Example: A /24 subnet for your VPN clients
|
||||||
|
|
||||||
|
database:
|
||||||
|
type: sqlite
|
||||||
|
sqlite:
|
||||||
|
path: /var/lib/headscale/db.sqlite
|
||||||
97
charts/apps/charts/headscale/templates/deployment.yaml
Normal file
97
charts/apps/charts/headscale/templates/deployment.yaml
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
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:
|
||||||
|
# To expose WireGuard UDP directly, we need a NodePort service.
|
||||||
|
# The Pod needs to be aware of the external port it's being exposed on.
|
||||||
|
# The easiest way to get WireGuard to listen on the correct port and make it
|
||||||
|
# externally accessible is to use `hostNetwork: true` for the UDP component,
|
||||||
|
# or by directly specifying the listen port in Headscale config if the NodePort is stable.
|
||||||
|
|
||||||
|
# OPTION 1: Best for simple homelab on bare metal where host network traffic isn't an issue
|
||||||
|
# hostNetwork: true # This makes the pod listen directly on the node's IPs
|
||||||
|
# dnsPolicy: ClusterFirstWithHostNet # Required if using hostNetwork
|
||||||
|
|
||||||
|
initContainers:
|
||||||
|
- name: generate-config
|
||||||
|
image: alpine/git # A small image with 'envsubst' available or easily installable
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ['sh', '-c']
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
# Install envsubst if it's not present (alpine/git may not have it by default)
|
||||||
|
apk update && apk add bash gettext
|
||||||
|
|
||||||
|
# Substitute environment variables into the template
|
||||||
|
# The vars are passed via `env` section below
|
||||||
|
envsubst < /config-template/config.yaml.template > /etc/headscale/config.yaml
|
||||||
|
|
||||||
|
mkdir -p /etc/headscale
|
||||||
|
# Optional: Verify the generated config
|
||||||
|
echo "--- Generated Headscale Configuration ---"
|
||||||
|
cat /etc/headscale/config.yaml
|
||||||
|
echo "---------------------------------------"
|
||||||
|
env:
|
||||||
|
# These are the variables that `envsubst` will look for and replace
|
||||||
|
- name: PUBLIC_URL
|
||||||
|
value: 'https://{{ .Values.subdomain }}.olsen.cloud'
|
||||||
|
- name: OIDC_ISSUER_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: configurationIssuer
|
||||||
|
- name: OIDC_CLIENT_ID
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientId
|
||||||
|
- name: OIDC_CLIENT_SECRET
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: '{{ .Release.Name }}-client'
|
||||||
|
key: clientSecret
|
||||||
|
# Add any other variables used in config.yaml.template here
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-template
|
||||||
|
mountPath: /config-template # Mount the ConfigMap as a volume
|
||||||
|
readOnly: true
|
||||||
|
- name: headscale-config
|
||||||
|
mountPath: /etc/headscale # Destination for the generated config
|
||||||
|
|
||||||
|
containers:
|
||||||
|
- name: '{{ .Release.Name }}'
|
||||||
|
image: headscale/headscale:latest # Use the official image
|
||||||
|
command: ['headscale', 'serve']
|
||||||
|
ports:
|
||||||
|
- name: http-api
|
||||||
|
containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
- name: wireguard-udp
|
||||||
|
containerPort: 41641
|
||||||
|
protocol: UDP
|
||||||
|
volumeMounts:
|
||||||
|
- name: headscale-data
|
||||||
|
mountPath: /var/lib/headscale
|
||||||
|
- name: headscale-config
|
||||||
|
mountPath: /etc/headscale
|
||||||
|
volumes:
|
||||||
|
- name: config-template
|
||||||
|
configMap:
|
||||||
|
name: '{{ .Release.Name }}-config-template'
|
||||||
|
- name: headscale-config
|
||||||
|
emptyDir: {}
|
||||||
|
- name: headscale-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: '{{ .Release.Name }}-data'
|
||||||
32
charts/apps/charts/headscale/templates/service.yaml
Normal file
32
charts/apps/charts/headscale/templates/service.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-headscale'
|
||||||
|
labels:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
ports:
|
||||||
|
- port: 41641
|
||||||
|
targetPort: 41641
|
||||||
|
protocol: UDP
|
||||||
|
name: wireguard-udp
|
||||||
|
selector:
|
||||||
|
app: '{{ .Release.Name }}'
|
||||||
7
charts/apps/charts/headscale/values.yaml
Normal file
7
charts/apps/charts/headscale/values.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
globals:
|
||||||
|
environment: prod
|
||||||
|
image:
|
||||||
|
repository: headscale/headscale
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
subdomain: headscale
|
||||||
11
charts/apps/charts/ollama/templates/pvc.yaml
Normal file
11
charts/apps/charts/ollama/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
3
charts/apps/charts/openwebui/Chart.yaml
Normal file
3
charts/apps/charts/openwebui/Chart.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
version: 1.0.0
|
||||||
|
name: openwebui
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
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
|
||||||
11
charts/apps/charts/openwebui/templates/pvc.yaml
Normal file
11
charts/apps/charts/openwebui/templates/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: '{{ .Release.Name }}-data'
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- 'ReadWriteOnce'
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: '1Gi'
|
||||||
|
storageClassName: '{{ .Values.globals.environment }}'
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user