start on v2

This commit is contained in:
ari committed 2024-10-29 15:47:00 -04:00
1 parent 9d31e70721
commit ca72c2606a
57 files changed
+15 -2739

No files matched your search

-6
View File
@@ -1,6 +0,0 @@
apiVersion: v2
name: users
description: An apps service for homelab
type: application
version: 0.1.0
dependencies: []
@@ -1,12 +0,0 @@
{{- define "pg-users.entry" -}}
#!/bin/sh
cp -r /app /tmp/app
cd /tmp/app && \
terraform init && \
terraform apply -auto-approve -input=false \
-var-file="/app/users.tfvars" \
-var-file="/app/db_users_dbs.tfvars" \
-lock=false
{{- end -}}
@@ -1,111 +0,0 @@
{{- define "pg-users.terraform" -}}
variable "db_host" {}
variable "db_username" {}
variable "db_password" {}
variable "db_users" {
type = list(string)
}
variable "db_port" {
type = number
default = 5432
}
variable "db_users_dbs" {
type = map(list(string))
default = {}
}
terraform {
required_providers {
postgresql = {
source = "cyrilgdn/postgresql"
version = "{{.Values.terraform.cyrilgdnPostgresql.tag}}"
}
}
}
terraform {
backend "kubernetes" {
secret_suffix = "{{ .Release.Name }}"
in_cluster_config = true
namespace = "{{ .Release.Namespace }}"
}
}
provider "postgresql" {
host = var.db_host
port = var.db_port
username = var.db_username
password = var.db_password
connect_timeout = 15
sslmode = "disable"
}
resource "random_password" "pg_users_pswd" {
count = length(var.db_users)
length = 16
special = true
override_special = "!#$%&"
}
locals {
users = {
for u, pwd in random_password.pg_users_pswd :
var.db_users[u] => pwd.result
}
users_db = distinct(flatten([
for user, dbs in var.db_users_dbs: [
for db in dbs: {
db = db
user = user
}
]
]))
}
resource "kubernetes_secret" "pg_users" {
for_each = local.users
metadata {
name = "password.pg.${each.key}"
namespace = "{{ .Release.Namespace }}"
annotations = {
"managed-by": "job/user-generation"
}
}
data = {
username = each.key
password = each.value
host = var.db_host
port = var.db_port
additional_dbs = jsonencode({
for dbName in try(var.db_users_dbs[each.key], []):
dbName => "${each.key}-${dbName}"
})
}
type = "Opaque"
}
resource "postgresql_role" "u" {
for_each = local.users
name = each.key
password = each.value
login = true
}
resource "postgresql_database" "db" {
for_each = local.users
name = each.key
owner = postgresql_role.u[each.key].id
}
resource "postgresql_database" "db_users" {
for_each = { for ud in local.users_db: "${ud.user}-${ud.db}" => ud }
name = each.key
owner = postgresql_role.u[each.value.user].id
}
{{- end -}}
-41
View File
@@ -1,41 +0,0 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["list", "create"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "update", "create", "patch", "delete"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "update", "create", "patch", "delete"]
resourceNames: ["lock-tfstate-default-{{ .Release.Name }}"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create"]
---
apiVersion: v1
automountServiceAccountToken: true
kind: ServiceAccount
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
@@ -1,60 +0,0 @@
---
apiVersion: batch/v1
kind: Job
metadata:
name: "user-generation"
namespace: "{{ .Release.Namespace }}"
annotations:
checksum/run-sh: "{{ include "pg-users.entry" . | sha256sum }}"
checksum/main-tf: "{{ include "pg-users.terraform" . | sha256sum }}"
checksum/users-tfvars: "{{ (print "db_users = " ( .Values.userGeneration.users | toJson )) | sha256sum }}"
checksum/users_dbs-tfvars: "{{ (print "db_users_dbs = " ( .Values.userGeneration.users_dbs | toJson )) | sha256sum }}"
helm.sh/hook: post-install
helm.sh/hook-delete-policy: before-hook-creation
spec:
template:
metadata:
annotations:
checksum/run-sh: "{{ include "pg-users.entry" . | sha256sum }}"
checksum/main-tf: "{{ include "pg-users.terraform" . | sha256sum }}"
checksum/users-tfvars: "{{ (print "db_users = " ( .Values.userGeneration.users | toJson )) | sha256sum }}"
checksum/users_dbs-tfvars: "{{ (print "db_users_dbs = " ( .Values.userGeneration.users_dbs | toJson )) | sha256sum }}"
spec:
serviceAccount: "{{ .Release.Name }}"
serviceAccountName: "{{ .Release.Name }}"
volumes:
- name: tffiles
secret:
secretName: "user-generation-tf"
containers:
- name: base
image: "hashicorp/terraform:{{ .Values.userGeneration.tfVersion }}"
command:
- sh
- /app/run.sh
volumeMounts:
- mountPath: /app
name: tffiles
env:
- name: TF_LOG_PATH
value: /tmp/terraform.log
- name: TF_INPUT
value: "0"
- name: TF_DATA_DIR
value: /tmp/.terraform
- name: TF_IN_AUTOMATION
value: "1"
- name: TF_VAR_db_host
value: "postgres.{{ .Release.Namespace }}.svc.cluster.local"
- name: TF_VAR_db_username
valueFrom:
secretKeyRef:
name: "{{ .Values.postgresSecret }}"
key: "username"
- name: TF_VAR_db_password
valueFrom:
secretKeyRef:
name: "{{ .Values.postgresSecret }}"
key: "password"
restartPolicy: Never
backoffLimit: 2
@@ -1,12 +0,0 @@
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: "user-generation-tf"
namespace: "{{ .Release.Namespace }}"
data:
run.sh: "{{ include "pg-users.entry" . | b64enc }}"
main.tf: "{{ include "pg-users.terraform" . | b64enc }}"
users.tfvars: "{{ (print "db_users = " ( .Values.userGeneration.users | toJson )) | b64enc }}"
db_users_dbs.tfvars: "{{ (print "db_users_dbs = " ( .Values.userGeneration.users_dbs | toJson )) | b64enc }}"
View File
Whitespace-only changes.
View File
Whitespace-only changes.
-23
View File
@@ -1,23 +0,0 @@
userGeneration:
tfVersion: "1.3.7"
users:
- nextcloud
- authentik
- radarr
- sonarr
- prowlarr
- immich
- readarr
- bazarr
users_dbs:
radarr: [log, cache]
sonarr: [log, cache]
prowlarr: [log, cache]
readarr: [log, cache]
bazarr: [log, cache]
postgresSecret: ""
terraform:
cyrilgdnPostgresql:
tag: 1.18.0
-6
View File
@@ -1,6 +0,0 @@
apiVersion: v2
name: ingresses
description: An apps service for homelab
type: application
version: 0.1.0
dependencies: []
@@ -1,12 +0,0 @@
{{- define "homelab.ingress.domain" -}}
{{- $rootPrefix := empty .leadPrefix | ternary "" (printf "%s." .leadPrefix) -}}
{{- if .useSecondaryDomain -}}
{{$rootPrefix}}{{.global.secondaryDomain}}
{{- else -}}
{{- if .useDirectPrefix -}}
{{$rootPrefix}}{{.global.domain}}
{{- else -}}
{{$rootPrefix}}{{.global.rootSubDomain}}.{{.global.domain}}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -1,43 +0,0 @@
{{ define "homelab.ingress.domain.tls"}}
{{ if (.useWildCard | default .global.tls.useWildCard) }}
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "tls-{{.prefix}}.{{ .domain }}"
namespace: {{ .namespace }}
spec:
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: apps-ingresses
target:
name: tls-{{.prefix}}.{{ .domain }}
creationPolicy: Owner
deletionPolicy: Delete
data:
- secretKey: tls.crt
remoteRef:
key: cloudflare-wildcard.{{ .domain }}
property: tls.crt
- secretKey: tls.key
remoteRef:
key: cloudflare-wildcard.{{ .domain }}
property: tls.key
{{ else }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "tls-{{.prefix}}.{{ .domain }}"
namespace: {{ .namespace }}
spec:
secretName: "tls-{{.prefix}}.{{ .domain }}"
issuerRef:
kind: ClusterIssuer
name: "{{ .global.tls.issuer }}"
commonName: "{{.prefix}}.{{ .domain }}"
dnsNames:
- "{{.prefix}}.{{ .domain }}"
{{ end }}
{{ end }}
@@ -1,122 +0,0 @@
{{- define "homelab.ingress" }}
#
# Input: = {{ . | toJson }}
# prefix: str = {{ .prefix }}
# service: str = {{ .service }}
# namespace: str = {{ .namespace }}
# global: map (should be .global) = {{ .global | toJson }}
# port: int = 80 = {{ .port }}
# path: str = "/" = {{ .path }}
# useWildCard: bool = False = {{ .useWildCard }}
# middleware: str = "https-redirect" = {{ .middleware }}
# useSecondaryDomain: bool = False = {{ .useSecondaryDomain }}
# useDirectPrefix: bool = False = {{ .useDirectPrefix }}
# widget: bool = False = {{ .widget | toJson }}
#
{{- $splitPrefix := splitList "." .prefix -}}
{{- $prefix := first $splitPrefix -}}
{{- $leadPrefix := join "." (rest $splitPrefix) -}}
{{- $_ := set . "prefix" $prefix -}}
{{- $_ := set . "leadPrefix" $leadPrefix -}}
{{- $domain := (include "homelab.ingress.domain" .) -}}
{{- $_ := set . "domain" $domain -}}
# .domain = {{ .domain }}
# .prefix = {{ .prefix }}
{{ if .global.tls.enabled }}
{{ include "homelab.ingress.domain.tls" . }}
{{ end }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{.prefix}}.{{ $domain }}"
namespace: {{ .namespace }}
annotations:
homelab-ingress/managing-app-namespace: "apps-ingresses"
traefik.ingress.kubernetes.io/router.middlewares: {{ .middleware | default "apps-ingresses-https-redirect"}}@kubernetescrd
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "{{.prefix}}@{{.namespace}}"
gethomepage.dev/siteMonitor: 'http://{{.service}}.{{ .namespace }}.svc.cluster.local:{{.port | default 80}}{{ .path | default "/" }}{{ .health | default "" }}'
{{ if .description}}
gethomepage.dev/description: "{{ .description }}"
{{ end }}
gethomepage.dev/group: {{ .group | default "Unassigned" }}
{{ if .icon }}
gethomepage.dev/icon: "{{.icon}}"
{{ else }}
gethomepage.dev/icon: "homepage.png"
{{ end }}
{{ if .widget }}
{{ range $k, $v := .widget }}
gethomepage.dev/widget.{{$k}}: {{ $v | quote }}
{{ end }}
{{ end }}
{{ range $k, $v := (.annotations | default (dict )) }}
{{ $k }}: {{ $v }}
{{ end }}
spec:
rules:
- host: "{{.prefix}}.{{ $domain }}"
http:
paths:
- backend:
service:
name: "{{.service}}"
port:
number: {{.port | default 80}}
path: {{ .path | default "/" }}
pathType: Prefix
{{ if .global.tls.enabled }}
tls:
- secretName: "tls-{{.prefix}}.{{ $domain }}"
hosts:
- "{{.prefix}}.{{ $domain }}"
{{ end }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{.prefix}}.internal"
namespace: {{ .namespace }}
annotations:
homelab-ingress/managing-app-namespace: "apps-ingresses"
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "{{.prefix}}@{{.namespace}}"
gethomepage.dev/siteMonitor: 'http://{{.service}}.{{ .namespace }}.svc.cluster.local:{{.port | default 80}}{{ .path | default "/" }}{{ .health | default "" }}'
{{ if .description}}
gethomepage.dev/description: "{{ .description }}"
{{ end }}
gethomepage.dev/group: Internal({{ .group | default "Unassigned" }})
{{ if .icon }}
gethomepage.dev/icon: "{{.icon}}"
{{ else }}
gethomepage.dev/icon: "homepage.png"
{{ end }}
{{ if .widget }}
{{- range $k, $v := .widget }}
gethomepage.dev/widget.{{$k}}: {{ $v | quote }}
{{- end }}
{{ end }}
{{ range $k, $v := (.annotations | default (dict )) }}
{{ $k }}: {{ $v }}
{{ end }}
spec:
rules:
- host: "{{.prefix}}.k3sapp.internal"
http:
paths:
- backend:
service:
name: "{{.service}}"
port:
number: {{.port | default 80}}
path: {{ .path | default "/" }}
pathType: Prefix
{{- end -}}
@@ -1,84 +0,0 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
namespace: chart-authentik
spec:
routes:
- kind: Rule
match: "Host(`authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}`)"
middlewares:
- name: forwardauth-authentik
namespace: chart-authentik
priority: 10
services:
- kind: Service
name: authentik-server
namespace: chart-authentik
port: 80
- kind: Rule
match: "Host(`authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}`) && PathPrefix(`/outpost.goauthentik.io/`)"
priority: 15
services:
- kind: Service
name: authentik-server
namespace: chart-authentik
port: 80
{{ if .Values.global.tls.enabled }}
tls:
secretName: tls-authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
domains:
- main: authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
{{ end }}
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: forwardauth-authentik
namespace: chart-authentik
spec:
forwardAuth:
address: http://authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}/outpost.goauthentik.io/auth/traefik
trustForwardHeader: true
authResponseHeaders:
- X-authentik-username
- X-authentik-groups
- X-authentik-email
- X-authentik-name
- X-authentik-uid
- X-authentik-jwt
- X-authentik-meta-jwks
- X-authentik-meta-outpost
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-version
---
{{ if .Values.global.tls.enabled }}
{{ include "homelab.ingress.domain.tls" (dict "global" .Values.global "namespace" "chart-authentik" "prefix" "authentik.home" "domain" .Values.global.domain ) }}
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "authentik-outpost-tls"
namespace: chart-authentik
spec:
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: apps-ingresses
target:
name: "authentik-outpost-tls"
creationPolicy: Owner
deletionPolicy: Delete
data:
- secretKey: tls.crt
remoteRef:
key: cloudflare-wildcard.{{ .Values.global.domain }}
property: tls.crt
- secretKey: tls.key
remoteRef:
key: cloudflare-wildcard.{{ .Values.global.domain }}
property: tls.key
{{ end }}
@@ -1,106 +0,0 @@
{{ if .Values.global.tls.enabled }}
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: {{ .Values.global.tls.issuer }}
spec:
acme:
server: {{ .Values.global.tls.acmeServer }}
skipTLSVerify: {{ .Values.global.tls.skipTLSVerify }}
email: {{ .Values.global.email }}
privateKeySecretRef:
name: {{ .Values.global.tls.issuer }}
solvers:
- http01:
ingress:
class: traefik
{{ if .Values.cloudflare.enabled }}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: cloudflare
spec:
acme:
server: {{ .Values.global.tls.acmeServer }}
skipTLSVerify: {{ .Values.global.tls.skipTLSVerify }}
email: {{ .Values.global.email }}
privateKeySecretRef:
name: cloudflare
solvers:
- dns01:
cloudflare:
apiTokenSecretRef:
name: {{ .Values.cloudflare.tokenSecretName }}
key: {{ .Values.cloudflare.tokenSecretKey }}
{{ range $prefix := .Values.cloudflare.certificateRootDomains }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cloudflare-wildcard{{$prefix}}.{{ $.Values.global.rootSubDomain }}.{{ $.Values.global.domain }}
spec:
secretName: cloudflare-wildcard{{$prefix}}.{{ $.Values.global.rootSubDomain }}.{{ $.Values.global.domain }}
issuerRef:
name: cloudflare
kind: Issuer
commonName: '*{{$prefix}}.{{ $.Values.global.rootSubDomain }}.{{ $.Values.global.domain }}'
dnsNames:
- "*{{$prefix}}.{{ $.Values.global.rootSubDomain }}.{{ $.Values.global.domain }}"
{{ end }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cloudflare-wildcard.{{ $.Values.global.domain }}
spec:
secretName: cloudflare-wildcard.{{ $.Values.global.domain }}
issuerRef:
name: cloudflare
kind: Issuer
commonName: '*.{{ $.Values.global.domain }}'
dnsNames:
- "*.{{ $.Values.global.domain }}"
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cloudflare-wildcard.{{ $.Values.global.secondaryDomain }}
spec:
secretName: cloudflare-wildcard.{{ $.Values.global.secondaryDomain }}
issuerRef:
name: cloudflare
kind: Issuer
commonName: '*.{{ $.Values.global.secondaryDomain }}'
dnsNames:
- "*.{{ $.Values.global.secondaryDomain }}"
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cloudflare.{{ $.Values.global.domain }}
spec:
secretName: cloudflare.{{ $.Values.global.domain }}
issuerRef:
name: cloudflare
kind: Issuer
commonName: '{{ $.Values.global.domain }}'
dnsNames:
- "{{ $.Values.global.domain }}"
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: cloudflare.{{ $.Values.global.secondaryDomain }}
spec:
secretName: cloudflare.{{ $.Values.global.secondaryDomain }}
issuerRef:
name: cloudflare
kind: Issuer
commonName: '{{ $.Values.global.secondaryDomain }}'
dnsNames:
- "{{ $.Values.global.secondaryDomain }}"
{{ end }}
{{ end }}
@@ -1,40 +0,0 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: dummy-app
namespace: "{{ .Release.Namespace }}"
spec:
replicas: 1
selector:
matchLabels:
app: dummy
release: "{{ .Release.Name }}"
template:
metadata:
labels:
app: dummy
release: "{{ .Release.Name }}"
spec:
containers:
- name: name
image: nginxdemos/hello
resources:
limits:
memory: 1Gi
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: dummy-app
spec:
selector:
app: dummy
release: "{{ .Release.Name }}"
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
@@ -1,63 +0,0 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: https-redirect
namespace: "{{ .Release.Namespace }}"
spec:
redirectScheme:
scheme: https
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: strict-transport
namespace: "{{ .Release.Namespace }}"
spec:
headers:
hostsProxyHeaders:
- "X-Forwarded-Host"
referrerPolicy: "same-origin"
stsSeconds: 15552000
stsIncludeSubdomains: true
stsPreload: true
forceSTSHeader: true
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: chain-authentik
namespace: "{{ .Release.Namespace }}"
spec:
chain:
middlewares:
- name: https-redirect
namespace: "{{ .Release.Namespace }}"
- name: forwardauth-authentik
namespace: "{{ .Release.Namespace }}"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: forwardauth-authentik
namespace: "{{ .Release.Namespace }}"
labels:
app.kubernetes.io/instance: authentik
app.kubernetes.io/name: authentik
spec:
forwardAuth:
address: http://authentik-server.chart-authentik.svc.cluster.local:80/outpost.goauthentik.io/auth/traefik
trustForwardHeader: true
authResponseHeaders:
- X-authentik-username
- X-authentik-groups
- X-authentik-email
- X-authentik-name
- X-authentik-uid
- X-authentik-jwt
- X-authentik-meta-jwks
- X-authentik-meta-outpost
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-version
@@ -1,39 +0,0 @@
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: nextcloud
namespace: apps-nextcloud
spec:
chain:
middlewares:
- name: https-redirect
namespace: "{{ .Release.Namespace }}"
- name: apps-nextcloud-well-known
- name: apps-nextcloud-well-known-web-finger
- name: strict-transport
namespace: "{{ .Release.Namespace }}"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: apps-nextcloud-well-known
namespace: apps-nextcloud
spec:
redirectRegex:
permanent: true
regex: "https://(.*)/.well-known/(?:card|cal)dav"
replacement: "https://${1}/remote.php/dav"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: apps-nextcloud-well-known-web-finger
namespace: apps-nextcloud
spec:
redirectRegex:
permanent: true
regex: "https://(.*)/.well-known/webfinger"
replacement: "https://${1}/public.php?service=webfinger"
@@ -1,32 +0,0 @@
{{ range $prefix, $data := .Values.reverseProxy }}
---
apiVersion: v1
kind: Endpoints
metadata:
name: "reverse-proxy-{{$prefix}}"
subsets:
- addresses:
- ip: "{{ $data.ip }}"
ports:
- port: {{ $data.port | default 80 }}
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: "reverse-proxy-{{$prefix}}"
spec:
type: ClusterIP
ports:
- port: 80
protocol: TCP
targetPort: {{ $data.port | default 80 }}
{{ if (not $data.disableIngress) }}
{{- $ingressDef := (dict "service" (printf "reverse-proxy-%s" $prefix) "prefix" $prefix "global" $.Values.global "namespace" $.Release.Namespace "group" "Reverse Proxies" ) -}}
{{- $ingressDef := (merge ($data.overrides | default (dict)) $ingressDef) -}}
{{ include "homelab.ingress" $ingressDef}}
{{ end }}
{{ end }}
@@ -1,3 +0,0 @@
{{ range $svc := .Values.services }}
{{ include "homelab.ingress" (merge $svc (dict "global" $.Values.global)) }}
{{ end }}
@@ -1,127 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: "sec-domain-static-files"
data:
{{ range $staticFile := .Values.staticFiles.secondaryDomain }}
{{$staticFile.path}}: |
{{ $staticFile.content | nindent 6 }}
{{ end }}
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: "sec-domain-host"
labels:
app: "static-files"
domain: "{{$.Values.global.secondaryDomain}}"
spec:
replicas: 1
selector:
matchLabels:
app: "static-files"
domain: "{{$.Values.global.secondaryDomain}}"
template:
metadata:
annotations:
{{ range $staticFile := .Values.staticFiles.secondaryDomain }}
"checksum/{{$staticFile.path}}": "{{ $staticFile.content | sha256sum }}"
{{ end }}
labels:
app: "static-files"
domain: "{{$.Values.global.secondaryDomain}}"
spec:
volumes:
- name: static-files
configMap:
name: "sec-domain-static-files"
containers:
- name: api
image: caddy:2.7-alpine
command:
- caddy
- file-server
- --root
- /files
- --listen
- '0.0.0.0:80'
volumeMounts:
- mountPath: /files
name: static-files
resources:
limits:
memory: 1Gi
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
name: "sec-domain-static-files"
labels:
app: "static-files"
domain: "{{$.Values.global.secondaryDomain}}"
spec:
selector:
app: "static-files"
domain: "{{$.Values.global.secondaryDomain}}"
type: ClusterIP
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "sec-domain-static-files"
annotations:
homelab-ingress/managing-app-namespace: "apps-ingresses"
spec:
rules:
- host: "{{ $.Values.global.secondaryDomain }}"
http:
paths:
- path: "/"
pathType: Exact
backend:
service:
name: "sec-domain-static-files"
port:
number: 80
{{ range $staticFile := .Values.staticFiles.secondaryDomain }}
- backend:
service:
name: "sec-domain-static-files"
port:
number: 80
path: "/{{$staticFile.path}}"
pathType: Exact
{{ end }}
{{ if $.Values.global.tls.enabled }}
tls:
- secretName: "tls-{{ $.Values.global.secondaryDomain }}"
hosts:
- "{{ $.Values.global.secondaryDomain }}"
{{ end }}
{{ if $.Values.global.tls.enabled }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: "tls-{{ $.Values.global.secondaryDomain }}"
spec:
secretName: "tls-{{ $.Values.global.secondaryDomain }}"
issuerRef:
kind: ClusterIssuer
name: "{{ $.Values.global.tls.issuer }}"
commonName: "{{ $.Values.global.secondaryDomain }}"
dnsNames:
- "{{ $.Values.global.secondaryDomain }}"
{{ end }}
-33
View File
@@ -1,33 +0,0 @@
reverseProxy:
home:
port: "8123"
ip: "192.168.0.20"
yellow:
port: "8123"
ip: "192.168.0.23"
services:
- prefix: "argocd.core"
service: "argocd-server"
namespace: "argocd"
group: "Core"
icon: "assets/favicon/favicon-32x32.png"
- prefix: "demo"
service: "dummy-app"
namespace: "apps-ingresses"
middleware: "apps-ingresses-forwardauth-authentik"
group: "Demo"
- prefix: "sonarr"
service: "sonarr"
namespace: "apps-sonarr"
group: "Video Hosting"
widget:
type: sonarr
fields: '["wanted", "queued"]'
url: http://sonarr.host.or.ip
key: apikeyapikeyapikeyapikeyapikey
staticFiles:
mainDomain: []
secondaryDomain:
- path: "ads.txt"
content: |
google.com, pub-6915532978483380, DIRECT, f08c47fec0942fa0
-227
View File
@@ -1,227 +0,0 @@
global:
tls:
enabled: true
reverseProxy:
personal:
ip: 10.0.0.119
port: "8000"
overrides:
group: "Misc"
castle:
ip: "10.0.12.1"
port: "80"
overrides:
icon: http://10.0.12.1:80/static/icons/favicon.ico
kuma:
ip: "10.0.12.1"
port: "3001"
overrides:
icon: "https://kuma.home.sosnovsky.ca/apple-touch-icon.png"
overrides:
middleware: "apps-ingresses-chain-authentik"
widget:
type: uptimekuma
url: http://10.0.12.1:3001
slug: main
basement:
ip: "10.0.12.2"
port: "80"
overrides:
icon: http://10.0.12.2:80/static/icons/favicon.ico
pitorrent:
ip: "10.0.10.3"
port: "8080"
overrides:
middleware: "apps-ingresses-chain-authentik"
group: "Video Hosting"
widget:
type: qbittorrent
url: http://10.0.10.3:8080
esphome:
ip: "10.0.10.4"
port: "6052"
overrides:
middleware: "apps-ingresses-chain-authentik"
scrypted:
ip: "10.0.10.7"
port: "11080"
overrides:
group: "Cameras"
fwscode:
ip: 10.0.10.4
port: 8443
overrides:
group: "Framework Services"
middleware: "apps-ingresses-chain-authentik"
fwdockge:
ip: 10.0.10.4
port: 5050
overrides:
group: "Framework Services"
middleware: "apps-ingresses-chain-authentik"
abs:
ip: 10.0.10.6
port: 8000
overrides:
prefix: "abs.vh"
middleware: "apps-ingresses-chain-authentik"
group: "Video Hosting"
jellyfin:
ip: 10.0.10.5
port: 8096
overrides:
prefix: "jellyfin"
# middleware: "apps-ingresses-chain-authentik"
group: "Video Hosting"
events:
ip: 10.0.10.6
port: 9999
overrides:
group: "Apps"
useSecondaryDomain: true
cloudflare:
enabled: true
staticFiles:
mainDomain: []
secondaryDomain:
- path: "ads.txt"
content: |
google.com, pub-6915532978483380, DIRECT, f08c47fec0942fa0
- path: "index.html"
content: |
<h1>SkyG</h1>
<h2>Site in Development</h2>
- path: "data-deletion-policy"
content: |
<html>
<head>
<title>Data Deletion Policy</title>
</head>
<body>
<h1>Data Deletion Policy</h1>
<p>This policy outlines the procedures for deleting data from our app, which helps host private events.</p>
<h2>Data Retention</h2>
<p>We retain data for a limited period of time, as outlined below:</p>
<ul>
<li>Event data: We retain event data for a period of 1 year after the event has ended.</li>
<li>User data: We retain user data for a period of 1 year after the user's account is deactivated.</li>
</ul>
<h2>Data Deletion Requests</h2>
<p>If you would like to request the deletion of your data, please email <a
href="mailto:ariel@sosnovsky.ca">ariel@sosnovsky.ca</a> with the following information:</p>
<ul>
<li>Your name</li>
<li>Your email address</li>
<li>A description of the data you would like to have deleted</li>
</ul>
<p>We will respond to your request within 30 days and delete the requested data within 60 days.</p>
<h2>Data Deletion Process</h2>
<p>When we receive a data deletion request, we will:</p>
<ol>
<li>Verify the identity of the requestor</li>
<li>Locate and identify the data to be deleted</li>
<li>Delete the data from our systems</li>
<li>Confirm the deletion to the requestor</li>
</ol>
<h2>Data Security</h2>
<p>We take the security of your data seriously and have implemented measures to protect it from unauthorized access,
use, or disclosure. These measures include:</p>
<ul>
<li>Data encryption</li>
<li>Access controls</li>
<li>Regular security audits</li>
</ul>
<h2>Contact Us</h2>
<p>If you have any questions or concerns about this policy, please email <a
href="mailto:ariel@sosnovsky.ca">ariel@sosnovsky.ca</a>.</p>
</body>
</html>
- path: "privacy-policy"
content: |
<html>
<body>
<h1>Privacy Policy</h1>
<h2>Introduction</h2>
SkyG is committed to protecting the privacy of our users. This privacy policy explains how we collect, use, and disclose information when you use our app to manage private events.
<h2>Information We Collect</h2>
When you create an account with us, we collect the following information:
* Your name and email address
* Your phone number (optional)
* Your password (hashed for security)
* Your event details, including title, date, time, location, and description
We also collect information about your interactions with our app, including:
* Your login and logout times
* Your event creation and editing activities
* Your RSVPs and attendance records
* Your communication with other users through our app's messaging feature
<h2>How We Use Your Information</h2>
We use your information to provide and improve our app, including:
* To create and manage your account
* To send you notifications and updates about your events
* To provide customer support and troubleshoot issues
* To analyze usage patterns and improve our app's features and functionality
* To comply with legal and regulatory requirements
<h2>Sharing Your Information</h2>
We do not share your personal information with third parties except in the following circumstances:
* With your consent: We may share your information with third parties if you give us permission to do so.
* To provide services: We may share your information with third-party service providers who help us provide our app, such as payment processors and event venue management systems.
* To comply with law: We may share your information with law enforcement or other government agencies if required by law or if necessary to protect our users or our app.
<h2>Security Measures</h2>
We take the security of your information seriously. We use industry-standard encryption and secure servers to protect your data. We also implement access controls and other security measures to prevent unauthorized access to your information.
<h2>Your Rights</h2>
You have the right to:
* Access your personal information: You can request a copy of your personal information from us.
* Correct your personal information: You can request that we correct any inaccuracies in your personal information.
* Delete your personal information: You can request that we delete your personal information, but please note that this may affect your ability to use our app.
* Object to processing: You can object to our processing of your personal information, but please note that this may affect your ability to use our app.
<h2>Changes to This Policy</h2>
We may update this policy from time to time. We will notify you of any changes by email or through our app. Your continued use of our app after any changes to this policy will be considered acceptance of those changes.
<h2>Contact Us</h2>
If you have any questions or concerns about this policy, please contact us at [support email address].
<h2>Effective Date</h2>
This policy is effective as of June-24/2024.
By using our app, you acknowledge that you have read, understood, and agree to be bound by this privacy policy.
</body>
</html>
-30
View File
@@ -1,30 +0,0 @@
global:
domain: "me.local"
secondaryDomain: "me.internal"
rootSubDomain: "home"
tls:
enabled: false
reverseProxy: {}
services:
- prefix: "argocd.core"
service: "argocd-server"
namespace: "argocd"
group: "Core"
icon: "assets/favicon/favicon-32x32.png"
- prefix: "demo"
service: "dummy-app"
namespace: "apps-ingresses"
middleware: "apps-ingresses-forwardauth-authentik"
group: "Demo"
cloudflare:
enabled: false
tokenSecretName: ~
tokenSecretKey: ~
certificateRootDomains:
- ""
- ".core"
- ".vh"
- ".wa"
staticFiles:
mainDomain: []
secondaryDomain: []
-9
View File
@@ -1,9 +0,0 @@
apiVersion: v2
name: nextcloud
description: An applications service for homelab
type: application
version: 0.1.0
dependencies:
- name: nextcloud
repository: https://nextcloud.github.io/helm/
version: 3.5.3
@@ -1,22 +0,0 @@
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}"
spec:
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
name: chart-database
target:
name: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}"
data:
- secretKey: "{{ .Values.nextcloud.externalDatabase.existingSecret.usernameKey }}"
remoteRef:
key: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}"
property: username
- secretKey: "{{ .Values.nextcloud.externalDatabase.existingSecret.passwordKey }}"
remoteRef:
key: "{{ .Values.nextcloud.externalDatabase.existingSecret.secretName }}"
property: password
@@ -1,10 +0,0 @@
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: "{{ .Values.nextcloud.nextcloud.existingSecret.secretName }}"
annotations:
secret-generator.v1.mittwald.de/autogenerate: "{{ .Values.nextcloud.nextcloud.existingSecret.passwordKey }}"
data:
{{ .Values.nextcloud.nextcloud.existingSecret.usernameKey }}: "YWRtaW4="
View File
Whitespace-only changes.
-14
View File
@@ -1,14 +0,0 @@
nextcloud:
nextcloud:
configs:
proxy.config.php: |-
<?php
$CONFIG = array (
'trusted_proxies' => array(
0 => '127.0.0.1',
1 => '10.0.0.0/8',
),
'overwritehost' => 'nextcloud.home.sosnovsky.ca',
'overwriteprotocol' => 'https',
'forwarded_for_headers' => array('HTTP_X_FORWARDED_FOR'),
);
-91
View File
@@ -1,91 +0,0 @@
nextcloud:
image:
repository: "ghcr.io/asosnovsky/nextcloud"
tag: "v28.0.2"
pullPolicy: IfNotPresent
flavor: fpm
replicaCount: 1
nodeSelector:
homelab/capacity: high
cronjob:
enabled: true
resources:
requests:
cpu: "500m"
memory: "100Mi"
ephemeral-storage: "40Ki"
limits:
ephemeral-storage: "40Mi"
nextcloud:
existingSecret:
enabled: true
secretName: "password.nextcloud.admin-initial"
usernameKey: username
passwordKey: password
update: 2
defaultConfigs:
.htaccess: true
redis.config.php: true
apache-pretty-urls.config.php: true
apcu.config.php: true
apps.config.php: false
autoconfig.php: true
smtp.config.php: true
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
internalDatabase:
enabled: false
externalDatabase:
enabled: true
type: postgresql
database: nextcloud
host: changeme
existingSecret:
enabled: true
secretName: password.pg.nextcloud
usernameKey: username
passwordKey: password
redis:
enabled: true
auth:
enabled: true
replica:
replicaCount: 1
persistence:
enabled: true
nextcloudData:
enabled: true
resources:
requests:
cpu: "500m"
memory: "2Gi"
ephemeral-storage: "20Mi"
limits:
ephemeral-storage: "200Mi"
hpa:
enabled: true
cputhreshold: 60
minPods: 1
maxPods: 5
nginx:
enabled: true
resources:
requests:
cpu: "100m"
memory: "256Mi"
ephemeral-storage: "100Ki"
limits:
ephemeral-storage: "100Mi"
-6
View File
@@ -1,6 +0,0 @@
apiVersion: v2
name: postfix
description: An apps service for homelab
type: application
version: 0.1.0
dependencies: []
-70
View File
@@ -1,70 +0,0 @@
{{ if .Values.smtp_configs }}
---
apiVersion: v1
kind: Secret
metadata:
name: "postfix-smtp-env"
type: Opaque
data:
SERVER_HOSTNAME: "{{ (printf "%s.%s" .Values.global.rootSubDomain .Values.global.domain) | b64enc }}"
{{ range $k, $v := .Values.smtp_configs }}
{{ $k }}: "{{ $v | b64enc }}"
{{ end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: postfix
labels:
app: postfix
spec:
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: postfix
template:
metadata:
labels:
app: postfix
annotations:
postfix/env-checksum: "{{ .Values.smtp_configs | toJson | sha256sum }}"
spec:
containers:
- image: juanluisbaptiste/postfix:alpine
name: postfix
resources:
requests:
cpu: "20m"
memory: "55M"
limits:
memory: "55M"
env:
- name: "SMTP_PASSWORD"
valueFrom:
secretKeyRef:
name: {{ .Values.smtp_password_secret }}
key: {{ .Values.smtp_password_secret_key }}
envFrom:
- secretRef:
name: postfix-smtp-env
ports:
- containerPort: 25
name: smtp
---
kind: Service
apiVersion: v1
metadata:
name: postfix
spec:
selector:
app: postfix
type: ClusterIP
ports:
- name: smtp
port: 25
targetPort: 25
{{ end }}
View File
Whitespace-only changes.
View File
Whitespace-only changes.
-5
View File
@@ -1,5 +0,0 @@
global:
domain: changme
smtp_configs: {}
smtp_password_secret: "changeme"
smtp_password_secret_key: "changeme"
-6
View File
@@ -1,6 +0,0 @@
apiVersion: v2
name: videohosting
description: An applications service for homelab
type: application
version: 0.1.0
dependencies: []
@@ -1,39 +0,0 @@
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "bazarr-db-creds"
spec:
refreshInterval: 24h
secretStoreRef:
kind: ClusterSecretStore
name: chart-database
target:
name: "bazarr-db-creds"
creationPolicy: Owner
template:
engineVersion: v2
data:
POSTGRES_ENABLED: "true"
POSTGRES_HOST: "{{ `{{.host}}` }}"
POSTGRES_PORT: "{{ `{{.port}}` }}"
POSTGRES_DATABASE: "{{ `{{.username}}` }}"
POSTGRES_USERNAME: "{{ `{{.username}}` }}"
POSTGRES_PASSWORD: "{{ `{{.password}}` }}"
data:
- remoteRef:
key: password.pg.bazarr
property: username
secretKey: username
- remoteRef:
key: password.pg.bazarr
property: password
secretKey: password
- remoteRef:
key: password.pg.bazarr
property: port
secretKey: port
- remoteRef:
key: password.pg.bazarr
property: host
secretKey: host
@@ -1,196 +0,0 @@
{{ range $k, $v := .Values.arrs }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{$k}}-envs
data:
PUID: "1000"
PGID: "1000"
TZ: {{ $.Values.global.timezone }}
{{- range $envName, $envValue := ($v.envVars | default (dict )) }}
{{ $envName }}: "{{$envValue}}"
{{ end }}
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: "{{$k}}-config"
spec:
refreshInterval: 24h
secretStoreRef:
kind: ClusterSecretStore
name: chart-database
target:
name: "{{$k}}-config"
creationPolicy: Owner
template:
engineVersion: v2
data:
config.xml: |-
<Config>
<LogLevel>info</LogLevel>
<EnableSsl>False</EnableSsl>
<Port>80</Port>
<SslPort>443</SslPort>
<UrlBase></UrlBase>
<BindAddress>*</BindAddress>
<ApiKey>{{ `{{.password | b32enc}}` }}{{ `{{.password | b32enc}}` }}</ApiKey>
<UpdateMechanism>Docker</UpdateMechanism>
<LaunchBrowser>False</LaunchBrowser>
<Branch>main</Branch>
<SslCertHash></SslCertHash>
<SyslogPort>{{ `{{.port}}` }}</SyslogPort>
{{ if $v.usePostgres }}
<PostgresUser>{{ `{{.username}}` }}</PostgresUser>
<PostgresPassword>{{ `{{.password}}` }}</PostgresPassword>
<PostgresPort>5432</PostgresPort>
<PostgresHost>{{ `{{.host}}` }}</PostgresHost>
<PostgresMainDb>{{$k}}</PostgresMainDb>
<PostgresLogDb>{{$k}}-log</PostgresLogDb>
<PostgresCacheDb>{{$k}}-cache</PostgresCacheDb>
{{ end }}
{{- $v.extraConfigXml | nindent 12 }}
</Config>
data:
- remoteRef:
key: password.pg.{{$k}}
property: username
secretKey: username
- remoteRef:
key: password.pg.{{$k}}
property: password
secretKey: password
- remoteRef:
key: password.pg.{{$k}}
property: port
secretKey: port
- remoteRef:
key: password.pg.{{$k}}
property: host
secretKey: host
---
kind: Service
apiVersion: v1
metadata:
name: {{ $k }}
spec:
selector:
app: {{ $k }}
type: ClusterIP
ports:
- port: 80
targetPort: {{ .port | default 80 }}
name: "http"
- port: 443
targetPort: 443
name: "https"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{$k}}
spec:
selector:
matchLabels:
app: {{$k}}
replicas: 1
revisionHistoryLimit: 2
updateStrategy:
rollingUpdate:
partition: 1
type: RollingUpdate
volumeClaimTemplates:
- metadata:
finalizers:
- kubernetes.io/pvc-protection
name: config
spec:
storageClassName: {{ $.Values.global.nfs.storageClass }}
accessModes:
- ReadWriteOnce
resources:
{{- $v.configVolumesResources | toYaml | nindent 10 }}
template:
metadata:
labels:
app: {{$k}}
annotations:
"checksum/extraConfigXml": "{{ $v.extraConfigXml | sha256sum }}"
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: homelab/capacity
operator: In
values:
- med
- low
containers:
- name: {{$k}}
image: "{{ $v.repo }}:{{ $v.tag }}"
imagePullPolicy: Always
envFrom:
- configMapRef:
name: {{$k}}-envs
resources:
{{- $v.podResources | toYaml | nindent 12 }}
ports:
- containerPort: {{ .port | default 80 }}
name: "http"
- containerPort: 443
name: "https"
volumeMounts:
- name: config
mountPath: /config
- name: torrents
mountPath: /torrents
- name: configxml
mountPath: /configxml
lifecycle:
postStart:
exec:
command:
- /bin/sh
- -c
- cp /configxml/config.xml /config/config.xml
livenessProbe:
httpGet:
path: "/ping"
port: http
scheme: HTTP
initialDelaySeconds: 30
failureThreshold: 10
timeoutSeconds: 30
readinessProbe:
httpGet:
path: "/ping"
port: http
scheme: HTTP
initialDelaySeconds: 30
failureThreshold: 10
timeoutSeconds: 30
startupProbe:
tcpSocket:
port: http
initialDelaySeconds: 30
failureThreshold: 10
timeoutSeconds: 30
volumes:
- name: configxml
secret:
secretName: "{{$k}}-config"
- name: torrents
nfs:
server: "{{ $.Values.global.nfs.server }}"
path: "{{ $.Values.global.nfs.additionalShares.torrents }}"
readOnly: false
{{ end }}
@@ -1,135 +0,0 @@
{{ if .Values.jellyfin.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jellyfin-envs
data:
PUID: "1000"
PGID: "1000"
TZ: {{ .Values.global.timezone }}
JELLYFIN_PublishedServerUrl: "https://jellyfin.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}"
DOTNET_SYSTEM_IO_DISABLEFILELOCKING: "1"
---
kind: Service
apiVersion: v1
metadata:
name: jellyfin
spec:
selector:
app: jellyfin
type: ClusterIP
ports:
- port: 8096
targetPort: 8096
name: "http"
- port: 8920
targetPort: 8920
name: "https"
- port: 7359
targetPort: 7359
name: "7359-udp"
protocol: UDP
- port: 1900
targetPort: 1900
name: "1900-udp"
protocol: UDP
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: jellyfin
spec:
selector:
matchLabels:
app: jellyfin
replicas: 1
revisionHistoryLimit: 2
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
finalizers:
- kubernetes.io/pvc-protection
name: config
spec:
storageClassName: {{ $.Values.global.nfs.storageClass }}
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
limits:
storage: 100Gi
- metadata:
name: cache
spec:
storageClassName: local-path
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
limits:
storage: 100Gi
template:
metadata:
labels:
app: jellyfin
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: homelab/capacity
operator: In
values:
- high
containers:
- name: jellyfin
image: "{{ .Values.jellyfin.repo }}:{{ .Values.jellyfin.tag }}"
imagePullPolicy: "Always"
envFrom:
- configMapRef:
name: jellyfin-envs
ports:
- containerPort: 8096
name: jellyfin
- containerPort: 8920
- containerPort: 7359
protocol: UDP
- containerPort: 1900
protocol: UDP
resources:
{{- .Values.jellyfin.resources | toYaml | nindent 12 }}
volumeMounts:
- name: config
mountPath: /config
- name: cache
mountPath: /cache
- name: torrents
mountPath: /torrents
- name: family-videos
mountPath: /family-videos
startupProbe:
tcpSocket:
port: jellyfin
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
volumes:
- name: torrents
nfs:
server: "{{ $.Values.global.nfs.server }}"
path: "{{ $.Values.global.nfs.additionalShares.torrents }}"
readOnly: true
- name: family-videos
nfs:
server: "{{ $.Values.global.nfs.server }}"
path: "{{ .Values.global.nfs.additionalShares.familyvideos }}"
readOnly: true
{{ end }}
@@ -1,157 +0,0 @@
{{ range $k, $v := .Values.services }}
{{ if (not $v.disabled)}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{$k}}-envs
data:
PUID: "1000"
PGID: "1000"
TZ: {{ $.Values.global.timezone }}
{{- range $envName, $envValue := ($v.envVars | default (dict )) }}
{{ $envName }}: "{{tpl $envValue $}}"
{{ end }}
{{ if (not $v.disableSVC) }}
---
kind: Service
apiVersion: v1
metadata:
name: {{ $k }}
spec:
selector:
app: {{ $k }}
type: ClusterIP
ports:
{{ range $portName, $portValue := $v.ports.tcp }}
- port: {{ $portValue }}
targetPort: {{ $portValue }}
name: "{{ $portName }}"
protocol: TCP
{{ end }}
{{- if $v.ports.udp -}}
{{ range $portName, $portValue := $v.ports.udp }}
- port: {{ $portValue }}
targetPort: {{ $portValue }}
name: "{{ $portName }}-udp"
protocol: UDP
{{ end }}
{{- end }}
{{ end }}
{{- $kind := $v.kind | default "StatefulSet" -}}
---
apiVersion: apps/v1
kind: {{ $kind }}
metadata:
name: {{$k}}
spec:
selector:
matchLabels:
app: {{$k}}
replicas: 1
revisionHistoryLimit: 2
{{ if (eq $kind "StatefulSet")}}
updateStrategy:
rollingUpdate:
partition: 0
type: RollingUpdate
volumeClaimTemplates:
- metadata:
finalizers:
- kubernetes.io/pvc-protection
name: config
spec:
storageClassName: {{ $.Values.global.nfs.storageClass }}
accessModes:
- ReadWriteOnce
resources:
{{- $v.configVolumesResources | toYaml | nindent 10 }}
{{ end }}
template:
metadata:
labels:
app: {{$k}}
annotations:
checksum/config-env: "{{ $v.envVars | toYaml | sha256sum }}"
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: homelab/capacity
operator: In
values:
- med
- low
containers:
- name: {{$k}}
image: "{{ $v.repo }}:{{ $v.tag }}"
imagePullPolicy: Always
envFrom:
- configMapRef:
name: {{$k}}-envs
{{ range $envFrom := ($v.envFrom | default list) }}
- {{ $envFrom | toJson }}
{{ end }}
resources:
{{- $v.podResources | toYaml | nindent 12 }}
{{ if $v.ports}}
ports:
{{ range $portName, $portValue := $v.ports.tcp }}
- containerPort: {{ $portValue }}
protocol: TCP
name: "tcp-{{ $portName }}"
{{ end }}
{{- if $v.ports.udp -}}
{{ range $portName, $portValue := $v.ports.udp }}
- containerPort: {{ $portValue }}
protocol: UDP
{{ end }}
{{ end }}
{{ end }}
volumeMounts:
{{ if (eq $kind "StatefulSet")}}
- name: config
mountPath: /config
{{ end }}
- name: torrents
mountPath: /torrents
{{- if $v.health }}
{{- if $v.health.liveness }}
livenessProbe:
httpGet:
path: {{$v.health.liveness}}
port: tcp-web
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
{{ end -}}
{{- if $v.health.readiness }}
readinessProbe:
httpGet:
path: {{$v.health.readiness}}
port: tcp-web
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
{{ end }}
startupProbe:
tcpSocket:
port: tcp-web
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
{{ end }}
volumes:
- name: torrents
nfs:
server: "{{ $.Values.global.nfs.server }}"
path: "{{ $.Values.global.nfs.additionalShares.torrents }}"
readOnly: false
{{ end }}
{{ end }}
Whitespace-only changes.
Whitespace-only changes.
-118
View File
@@ -1,118 +0,0 @@
global:
timezone: changeme
nfs:
storageClass: changeme
server: changeme
additionalShares:
torrents: "changeme"
familyvideos: "changeme"
jellyfin:
enabled: false
repo: "lscr.io/linuxserver/jellyfin"
tag: latest
resources:
limits:
memory: "14Gi"
requests:
cpu: 1
memory: "4Gi"
arrs:
sonarr:
repo: lscr.io/linuxserver/sonarr
tag: "latest"
usePostgres: true
podResources:
limits:
memory: "8Gi"
requests:
cpu: 250m
memory: "500M"
configVolumesResources:
requests:
storage: 10Gi
limits:
storage: 100Gi
extraConfigXml: |-
<InstanceName>Sosnovsky Sonarr</InstanceName>
<AuthenticationMethod>External</AuthenticationMethod>
<AuthenticationType>DisabledForLocalAddresses</AuthenticationType>
radarr:
repo: lscr.io/linuxserver/radarr
tag: "latest"
usePostgres: true
podResources:
limits:
memory: "8Gi"
requests:
cpu: 250m
memory: "500M"
configVolumesResources:
requests:
storage: 10Gi
limits:
storage: 100Gi
extraConfigXml: |-
<InstanceName>Sosnovsky Radarr</InstanceName>
<AuthenticationMethod>External</AuthenticationMethod>
<AuthenticationType>DisabledForLocalAddresses</AuthenticationType>
readarr:
repo: lscr.io/linuxserver/readarr
tag: "develop"
usePostgres: true
podResources:
limits:
memory: "8Gi"
requests:
cpu: 250m
memory: "500M"
configVolumesResources:
requests:
storage: 10Gi
limits:
storage: 100Gi
extraConfigXml: |-
<InstanceName>Sosnovsky Readarr</InstanceName>
<AuthenticationType>DisabledForLocalAddresses</AuthenticationType>
prowlarr:
repo: lscr.io/linuxserver/prowlarr
tag: "1.13.3.4273-ls54"
usePostgres: true
podResources:
limits:
memory: "8Gi"
requests:
cpu: 50m
memory: "250M"
configVolumesResources:
requests:
storage: 1Gi
limits:
storage: 10Gi
extraConfigXml: |-
<InstanceName>Sosnovsky Prowlarr</InstanceName>
<AuthenticationMethod>External</AuthenticationMethod>
<AuthenticationType>DisabledForLocalAddresses</AuthenticationType>
services:
bazarr:
kind: StatefulSet
repo: lscr.io/linuxserver/bazarr
tag: "v1.4.2-ls240"
ports:
tcp:
web: 6767
health: {}
envFrom:
- secretRef:
name: bazarr-db-creds
podResources:
limits:
memory: "8Gi"
requests:
cpu: 250m
memory: "500M"
-6
View File
@@ -1,6 +0,0 @@
apiVersion: v2
name: webapps
description: An applications service for homelab
type: application
version: 0.1.0
dependencies: []
-122
View File
@@ -1,122 +0,0 @@
{{ range $k, $v := .Values.apps }}
{{ if $v.enabled }}
---
kind: Service
apiVersion: v1
metadata:
name: {{ $k }}
spec:
selector:
app: {{ $k }}
type: ClusterIP
ports:
{{- range $portName, $portValue := $v.ports.tcp }}
- port: {{ $portValue }}
targetPort: {{ $portValue }}
name: "{{ $portName }}"
protocol: TCP
{{ end }}
{{- if $v.ports.udp -}}
{{ range $portName, $portValue := $v.ports.udp }}
- port: {{ $portValue }}
targetPort: {{ $portValue }}
name: "{{ $portName }}-udp"
protocol: UDP
{{ end }}
{{- end }}
{{ if $v.exposedPorts }}
---
kind: Service
apiVersion: v1
metadata:
name: {{ $k }}-exposed-ports
spec:
selector:
app: {{ $k }}
type: LoadBalancer
ports:
{{- range $exPort, $inPort := $v.exposedPorts }}
- port: {{ $exPort }}
targetPort: {{ $inPort }}
protocol: TCP
{{ end }}
{{ end }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{$k}}
spec:
selector:
matchLabels:
app: {{$k}}
replicas: 1
revisionHistoryLimit: 2
template:
metadata:
labels:
app: {{$k}}
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: homelab/capacity
operator: In
values:
{{ $v.capacity | toYaml | nindent 20 }}
volumes: {{ ($v.volumes | default list) | toJson }}
containers:
- name: {{$k}}
image: "{{ $v.repo }}:{{ $v.tag }}"
imagePullPolicy: Always
resources:
{{- $v.podResources | toYaml | nindent 12 }}
ports:
{{ range $portName, $portValue := $v.ports.tcp }}
- containerPort: {{ $portValue }}
protocol: TCP
name: "tcp-{{ $portName }}"
{{ end }}
{{- if $v.ports.udp -}}
{{ range $portName, $portValue := $v.ports.udp }}
- containerPort: {{ $portValue }}
protocol: UDP
{{ end }}
{{ end }}
{{ if $v.health }}
{{- if $v.health.liveness }}
livenessProbe:
httpGet:
path: {{$v.health.liveness}}
port: tcp-web
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
{{ end -}}
{{- if $v.health.readiness }}
readinessProbe:
httpGet:
path: {{$v.health.readiness}}
port: tcp-web
scheme: HTTP
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
{{ end }}
{{ end }}
startupProbe:
tcpSocket:
port: tcp-web
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
envFrom: {{ ($v.envFrom | default list) | toJson }}
env: {{ ($v.env | default list) | toJson }}
volumeMounts: {{ ($v.volumeMounts | default list) | toJson }}
{{ end }}
{{ end }}
-52
View File
@@ -1,52 +0,0 @@
apps:
quirky:
enabled: true
ingress:
middleware: apps-ingresses-https-redirect
repo: ghcr.io/asosnovsky/quirky
tag: "latest"
podResources:
limits:
memory: "250Mi"
requests:
cpu: 250m
memory: "250Mi"
health:
readiness: "/"
liveness: "/"
ports:
tcp:
web: 80
capacity:
- med
- low
ollama:
enabled: false
ingress:
middleware: apps-ingresses-chain-authentik
repo: ollama/ollama
tag: "latest"
podResources:
limits:
memory: "1Gi"
requests:
cpu: 250m
memory: "1Gi"
health:
readiness: "/"
liveness: "/"
exposedPorts:
"1143": 11434
ports:
tcp:
web: 11434
volumes:
- name: config
persistentVolumeClaim:
claimName: pv-ollama
volumeMounts:
- name: config
mountPath: /root/.ollama
capacity:
- med
- high
View File
Whitespace-only changes.
-1
View File
@@ -1 +0,0 @@
apps: {}
-76
View File
@@ -1,76 +0,0 @@
{{- if .Values.secrets.ingresses.secrets.cloudflare }}
cloudflare:
enabled: true
tokenSecretName: {{ .Values.secrets.ingresses.secrets.cloudflare.name }}
tokenSecretKey: api-token
{{- end }}
services:
# core services
- prefix: "argocd.core"
service: "argocd-server"
namespace: "argocd"
group: "Core"
icon: "https://argocd.core.home.sosnovsky.ca/assets/favicon/favicon-32x32.png"
# - prefix: "monitoring.core"
# service: prometheus-kube-prometheus-prometheus
# namespace: chart-prometheus
# middleware: "apps-ingresses-chain-authentik"
# group: "Core"
# icon: "https://monitoring.core.home.sosnovsky.ca/favicon.ico"
# port: 9090
# - prefix: "alerts.core"
# service: prometheus-kube-prometheus-alertmanager
# namespace: chart-prometheus
# middleware: "apps-ingresses-chain-authentik"
# group: "Core"
# port: 9093
# - prefix: "grafana.core"
# service: prometheus-grafana
# namespace: chart-prometheus
# middleware: "apps-ingresses-chain-authentik"
# group: "Core"
# icon: "https://grafana.core.home.sosnovsky.ca/public/img/fav32.png"
# health: "healthz"
# - prefix: "authentik.core"
# service: "authentik-server"
# namespace: "chart-authentik"
# group: "Core"
# icon: "https://authentik.home.sosnovsky.ca/static/dist/assets/icons/icon.png"
# root services
- prefix: "demo"
service: "dummy-app"
namespace: "apps-ingresses"
middleware: "apps-ingresses-chain-authentik"
group: "Demo"
- prefix: "nextcloud"
service: "nextcloud"
namespace: "apps-nextcloud"
port: 8080
middleware: "apps-nextcloud-nextcloud"
group: "Apps"
icon: "https://nextcloud.home.sosnovsky.ca/core/img/favicon.ico"
- prefix: "main"
service: "homepage"
namespace: "chart-homepage"
middleware: "apps-ingresses-chain-authentik"
port: 3000
group: "Core"
# webapp services
{{- $webapps := .Files.Get (printf "apps-values/%s" .Values.apps.webapps.valuesFile) }}
{{- $webapps := tpl $webapps . | fromYaml }}
{{- range $k, $v := $webapps.apps }}
{{ if $v.enabled }}
- prefix: "{{ $v.ingress.prefix | default (printf "%s-app" $k) }}"
service: "{{ $k }}"
namespace: "apps-webapps"
useDirectPrefix: {{ $v.ingress.useDirectPrefix | default "false" }}
useSecondaryDomain: {{ $v.ingress.useSecondaryDomain | default "false" }}
port: {{ $v.ports.tcp.web }}
{{- if $v.ingress }}
middleware: {{ $v.ingress.middleware | default "apps-ingresses-chain-authentik" }}
{{ else }}
middleware: "apps-ingresses-chain-authentik"
{{ end -}}
group: {{ .ingress.group | default "Basic Webapps" }}
{{ end }}
{{- end }}
-57
View File
@@ -1,57 +0,0 @@
global:
storageClass: {{ .Values.global.nfs.storageClass }}
nextcloud:
nextcloud:
host: "nextcloud.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}"
externalDatabase:
host: postgres.chart-database.svc.cluster.local
persistence:
storageClass: {{ .Values.global.nfs.storageClass }}
existingClaim: {{ .Values.storage.nextcloudConfig.name }}
nextcloudData:
storageClass: {{ .Values.global.nfs.storageClass }}
existingClaim: {{ .Values.storage.nextcloudData.name }}
configs:
authelia.config.php: |-
<?php
$CONFIG = array (
'allow_user_to_change_display_name' => false,
'lost_password_link' => 'disabled',
'oidc_login_provider_url' => 'https://auth.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}',
'oidc_login_client_id' => 'nextcloud',
'oidc_login_client_secret' => 'xjW7ByDrY0IpGo6XC5o6eQEUGagjkK6hULfbtADO5GV-ugHiG1ri1FRvkfL.-sacdHWyqZyO',
'oidc_login_auto_redirect' => false,
'oidc_login_end_session_redirect' => false,
'oidc_login_button_text' => 'Log in with Authelia',
'oidc_login_hide_password_form' => false,
'oidc_login_use_id_token' => true,
'oidc_login_attributes' => array (
'id' => 'preferred_username',
'name' => 'name',
'mail' => 'email',
'groups' => 'groups',
),
'oidc_login_default_group' => 'oidc',
'oidc_login_use_external_storage' => false,
'oidc_login_scope' => 'openid profile email groups',
'oidc_login_proxy_ldap' => false,
'oidc_login_disable_registration' => true,
'oidc_login_redir_fallback' => false,
'oidc_login_alt_login_page' => 'assets/login.php',
'oidc_login_tls_verify' => true,
'oidc_create_groups' => false,
'oidc_login_webdav_enabled' => false,
'oidc_login_password_authentication' => false,
'oidc_login_public_key_caching_time' => 86400,
'oidc_login_min_time_between_jwks_requests' => 10,
'oidc_login_well_known_caching_time' => 86400,
'oidc_login_update_avatar' => false,
);
redis:
master:
persistence:
storageClass: {{ .Values.global.nfs.storageClass }}
existingClaim: {{ .Values.storage.nextcloudRedisMaster.name }}
replica:
persistence:
storageClass: {{ .Values.global.nfs.storageClass }}
-105
View File
@@ -1,105 +0,0 @@
apps:
quirky:
enabled: true
ingress:
prefix: quirky
useSecondaryDomain: true
middleware: apps-ingresses-https-redirect
repo: ghcr.io/asosnovsky/quirky
tag: "latest"
podResources:
limits:
memory: "250Mi"
requests:
cpu: 250m
memory: "250Mi"
health:
readiness: "/"
liveness: "/"
ports:
tcp:
web: 80
capacity:
- med
- low
me:
enabled: true
ingress:
prefix: ari
useDirectPrefix: true
middleware: apps-ingresses-https-redirect
repo: ghcr.io/asosnovsky/aboutme
tag: "latest"
podResources:
limits:
memory: "250Mi"
requests:
cpu: 250m
memory: "250Mi"
health:
readiness: "/"
liveness: "/"
ports:
tcp:
web: 8080
capacity:
- med
- low
ollama:
enabled: false
ingress:
middleware: apps-ingresses-chain-authentik
repo: ollama/ollama
tag: "latest"
podResources:
limits:
memory: "16Gi"
requests:
cpu: 3
memory: "10Gi"
exposedPorts:
"11434": "11434"
ports:
tcp:
web: 11434
volumes:
- name: config
persistentVolumeClaim:
claimName: {{ .Values.storage.ollama.name }}
volumeMounts:
- name: config
mountPath: /root/.ollama
capacity:
- med
- high
ollama-web:
enabled: true
ingress:
middleware: apps-ingresses-chain-authentik
repo: ghcr.io/ollama-webui/ollama-webui
tag: "main"
podResources:
limits:
memory: "1Gi"
requests:
cpu: 250m
memory: "1Gi"
health:
readiness: "/"
liveness: "/"
env:
- name: OLLAMA_API_BASE_URL
value: "http://bigbox1.lab.internal:11434/api"
ports:
tcp:
web: 8080
volumes:
- name: config
persistentVolumeClaim:
claimName: {{ .Values.storage.ollamaWebGui.name }}
volumeMounts:
- name: config
mountPath: /app/backend/data
capacity:
- med
- low
-16
View File
@@ -1,16 +0,0 @@
ingress:
enabled: true
annotations:
gethomepage.dev/enabled: "true"
gethomepage.dev/name: "Authelia"
certManager: false
tls:
enabled: false
hostOverride:
- host: authelia.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
path: "/"
traefikCRD:
enabled: true
matchOverride: Host(`authelia.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}`)
# configMap:
# disabled: true
-37
View File
@@ -1,37 +0,0 @@
authentik:
cookie_domain: {{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
email:
from: {{ .Values.global.smtp.email }}
host: postfix.email.svc.cluster.local
port: 25
username: {{ .Values.global.smtp.email }}
use_ssl: false
postgresql:
host: postgres.chart-database.svc.cluster.local
name: authentik
user: authentik
postgresql:
enabled: false
redis:
enabled: true
server:
ingress:
enabled: true
annotations:
gethomepage.dev/enabled: 'true'
gethomepage.dev/group: Core
gethomepage.dev/icon: 'https://authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}/static/dist/assets/icons/icon.png'
gethomepage.dev/name: authentik@chart-authentik
gethomepage.dev/siteMonitor: 'http://authentik-server.chart-authentik.svc.cluster.local:80/'
hosts:
- authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
pathType: Prefix
tls:
- hosts:
- authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
secretName: tls-authentik.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
https: false
global:
envFrom:
- secretRef:
name: {{ .Values.secrets.authentik.secrets.env.name }}
-21
View File
@@ -1,21 +0,0 @@
fullnameOverride: "postgres"
image:
tag: 15.1.0-debian-11-r19
repository: bitnami/postgresql
pullPolicy: IfNotPresent
auth:
secretKeys:
adminPasswordKey: password
existingSecret: "{{ .Values.secrets.database.secrets.dbmain.name }}"
architecture: standalone
postgresqlDataDir: /bitnami/postgresql/data
primary:
persistence:
enabled: true
mountPath: /bitnami/postgresql
storageClass: "{{ .Values.global.nfs.storageClass }}"
existingClaim: "{{ .Values.storage.database.name }}"
accessModes:
- ReadWriteMany
readReplicas:
replicaCount: 0
-60
View File
@@ -1,60 +0,0 @@
image:
repository: ghcr.io/gethomepage/homepage
tag: latest
config:
widgets:
- kubernetes:
cluster:
show: true
cpu: true
memory: true
showLabel: true
label: "cluster"
nodes:
show: true
cpu: true
memory: true
showLabel: true
services:
- Local Cameras:
- Korie:
href: http://korie.cam.internal/
siteMonitor: http://korie.cam.internal/
- Eddie:
href: http://eddie.cam.internal/
siteMonitor: http://eddie.cam.internal/
- Living Room:
href: http://livingroom.cam.internal/
siteMonitor: http://livingroom.cam.internal/
- Doorbell:
href: 'http://doorbell.cam.internal'
siteMonitor: http://doorbell.cam.internal/
- Garage:
href: 'http://garage.cam.internal'
siteMonitor: http://garage.cam.internal/
- Routers:
- GL Main:
href: http://gl.router.internal
siteMonitor: http://gl.router.internal
- GL Basement:
href: http://gl-basement.router.internal
siteMonitor: http://gl-basement.router.internal
- MainMesh:
href: http://velica-main.router.internal
siteMonitor: http://velica-main.router.internal
- MeshNode1:
href: http://velica-node1.router.internal
siteMonitor: http://velica-node1.router.internal
- MeshNode2:
href: http://velica-node2.router.internal
siteMonitor: http://velica-node2.router.internal
bookmarks: []
kubernetes:
mode: cluster
serviceAccount:
create: true
name: homepage
enableRbac: true
-76
View File
@@ -1,76 +0,0 @@
cleanPrometheusOperatorObjectNames: false
alertmanager:
enabled: true
alertmanagerSpec:
storage:
volumeClaimTemplate:
spec:
storageClassName: {{ .Values.global.nfs.storageClass }}
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50Gi
limits:
storage: 100Gi
{{- if .Values.global.tls.enabled }}
externalUrl: "https://alerts.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}"
{{- else }}
externalUrl: "http://alerts.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}"
{{- end }}
resources:
requests:
memory: 400Mi
limits:
memory: 2Gi
config:
global:
smtp_from: '{{.Values.global.smtp.email }}'
smtp_smarthost: 'postfix.email.svc.cluster.local:25'
smtp_hello: 'alerts.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}'
receivers:
- name: '{{ .Values.global.email }}'
email_configs:
- to: '{{ .Values.global.email }}'
grafana:
defaultDashboardsTimezone: {{ .Values.global.timezone }}
adminPassword: prom-operator
persistence:
type: pvc
enabled: true
storageClassName: {{ .Values.global.nfs.storageClass }}
envFromConfigMaps:
- name: {{ .Values.secrets.prometheus.configmaps.auth.name }}
optional: true
grafana.ini:
server:
domain: grafana.core.{{ .Values.global.domain }}
server:
root_url: https://grafana.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}
prometheus:
prometheusSpec:
enableAdminAPI: false
{{- if .Values.global.tls.enabled }}
externalUrl: "https://monitoring.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}"
{{- else }}
externalUrl: "http://monitoring.core.{{ .Values.global.rootSubDomain }}.{{ .Values.global.domain }}"
{{- end }}
resources:
requests:
memory: 400Mi
limits:
memory: 2Gi
storageSpec:
volumeClaimTemplate:
spec:
storageClassName: {{ .Values.global.nfs.storageClass }}
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 50Gi
limits:
storage: 100Gi
+15
View File
@@ -0,0 +1,15 @@
---
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: first-pool
namespace: metallb-system
spec:
addresses:
- 10.0.100.1-10.0.100.255
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: l2ad
namespace: metallb-system