Skip to content

Commit

Permalink
talos stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
brenix committed Dec 25, 2024
1 parent 0f61b2d commit 0708b87
Show file tree
Hide file tree
Showing 73 changed files with 22,271 additions and 2,548 deletions.
7 changes: 2 additions & 5 deletions .sops.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
creation_rules:
- path_regex: cluster/.*\.sops\.ya?ml
encrypted_regex: "^(data|stringData)$"
key_groups:
- age:
- age1kky7jzc2x626xp4sfvpz7acytczqgdn7h2jxjqkjxzfd4kndcdxs8zr6ka
- age: >-
age1kky7jzc2x626xp4sfvpz7acytczqgdn7h2jxjqkjxzfd4kndcdxs8zr6ka
21 changes: 21 additions & 0 deletions components/cilium/component.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package holos

holos: Component.BuildPlan

Component: #Helm & {
Name: "cilium"
Namespace: "kube-system"
EnableHooks: true
Chart: {
name: "cilium"
version: "1.16.5"
repository: {
name: "cilium"
url: "https://helm.cilium.io"
}
}

Values: #Values

KustomizeConfig: Kustomization: namespace: Namespace
}
63 changes: 63 additions & 0 deletions components/cilium/values.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package holos

#Values: {
rollOutCiliumPods: true
priorityClassName: "system-cluster-critical"
autoDirectNodeRoutes: false
bgp: {
enabled: false
announce: {
loadbalancerIP: true
podCIDR: false
}
}
bgpControlPlane: {
enabled: true
}
k8sNetworkPolicy: {
enabled: false
}
hubble: {
enabled: false
}
operator: {
enabled: true
rollOutPods: true
replicas: 1
priorityClassName: "system-cluster-critical"
}
enableCriticalPriorityClass: false

// Talos requirements
ipam: mode: "kubernetes"
kubeProxyReplacement: true
securityContext: capabilities: {
ciliumAgent: [
"CHOWN",
"KILL",
"NET_ADMIN",
"NET_RAW",
"IPC_LOCK",
"SYS_ADMIN",
"SYS_RESOURCE",
"DAC_OVERRIDE",
"FOWNER",
"SETGID",
"SETUID",
]
cleanCiliumState: [
"NET_ADMIN",
"SYS_ADMIN",
"SYS_RESOURCE",
]
}
cgroup: autoMount: enabled: false
cgroup: hostRoot: "/sys/fs/cgroup"

k8sServiceHost: "127.0.0.1" // Kubeprism
k8sServicePort: "7445"

l2announcements: enabled: true
externalIPs: enabled: true
devices: "eno+"
}
20 changes: 20 additions & 0 deletions components/coredns/component.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package holos

holos: Component.BuildPlan

Component: #Helm & {
Name: "coredns"
Namespace: "kube-system"
Chart: {
name: "coredns"
version: "1.37.0"
repository: {
name: "coredns"
url: "https://coredns.github.io/helm"
}
}

Values: #Values

KustomizeConfig: Kustomization: namespace: Namespace
}
55 changes: 55 additions & 0 deletions components/coredns/values.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package holos

#Values: {
replicaCount: 2
resources: limits: cpu: null
service: {
clusterIP: "10.96.0.10"
}
serviceAccount: {
create: true
}
priorityClassName: "system-cluster-critical"

servers: [{
zones: [{zone: "."}]
port: 53
plugins: [{
name: "errors"
}, {
// Serves a /health endpoint on :8080, required for livenessProbe
name: "health"
configBlock: "lameduck 5s"
}, {

// Serves a /ready endpoint on :8181, required for readinessProbe
name: "ready"
}, {
// Required to query kubernetes API for data
name: "kubernetes"
parameters: "cluster.local in-addr.arpa ip6.arpa"
configBlock: """
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
"""
}, {

// Serves a /metrics endpoint on :9153, required for serviceMonitor
name: "prometheus"
parameters: "0.0.0.0:9153"
}, {
name: "forward"
parameters: ". /etc/resolv.conf"
}, {
name: "cache"
parameters: 30
}, {
name: "loop"
}, {
name: "reload"
}, {
name: "loadbalance"
}]
}]
}
2 changes: 1 addition & 1 deletion components/grafana/values.cue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ package holos
}
persistence: {
enabled: true
size: "2Gi"
size: "1Gi"
}
plugins: [
"grafana-piechart-panel",
Expand Down
22 changes: 22 additions & 0 deletions components/jellyfin/pvc.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package holos

Component: Resources: PersistentVolumeClaim: {
data: {
apiVersion: "v1"
metadata: name: "jellyfin-data"
spec: {
accessModes: ["ReadWriteOnce"]
resources: requests: storage: "1Gi"
storageClassName: "ceph-block"
}
}
cache: {
apiVersion: "v1"
metadata: name: "jellyfin-cache"
spec: {
accessModes: ["ReadWriteOnce"]
resources: requests: storage: "1Gi"
storageClassName: "ceph-block"
}
}
}
17 changes: 8 additions & 9 deletions components/jellyfin/values.cue
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ package holos
}
persistence: {
config: {
accessMode: "ReadWriteOnce"
enabled: true
globalMounts: [{path: "/config"}]
size: "1Gi"
type: "persistentVolumeClaim"
existingClaim: "jellyfin-data"
}
cache: {
enabled: true
existingClaim: "jellyfin-cache"
globalMounts: [{path: "/config/cache"}]
}
media: {
enabled: true
enabled: true
existingClaim: "media"
globalMounts: [{path: "/media"}]
hostPath: "/media"
hostPathType: "Directory"
type: "hostPath"
}
transcode: {
enabled: true
Expand Down
13 changes: 13 additions & 0 deletions components/jellyseerr/pvc.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package holos

Component: Resources: PersistentVolumeClaim: {
data: {
apiVersion: "v1"
metadata: name: "jellyseerr"
spec: {
accessModes: ["ReadWriteOnce"]
resources: requests: storage: "1Gi"
storageClassName: "ceph-block"
}
}
}
5 changes: 1 addition & 4 deletions components/jellyseerr/values.cue
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ package holos
}]
}
persistence: config: {
accessMode: "ReadWriteOnce"
enabled: true
existingClaim: "jellyseerr"
globalMounts: [{path: "/app/config"}]
size: "1Gi"
type: "persistentVolumeClaim"
}
service: main: {
annotations: "metallb.universe.tf/loadBalancerIPs": "192.168.2.8"
Expand Down
13 changes: 13 additions & 0 deletions components/linkding/pvc.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package holos

Component: Resources: PersistentVolumeClaim: {
data: {
apiVersion: "v1"
metadata: name: "linkding-data"
spec: {
accessModes: ["ReadWriteOnce"]
resources: requests: storage: "1Gi"
storageClassName: "ceph-block"
}
}
}
7 changes: 2 additions & 5 deletions components/linkding/values.cue
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ package holos
}]
}
persistence: data: {
accessMode: "ReadWriteOnce"
enabled: true
enabled: true
existingClaim: "linkding-data"
globalMounts: [{path: "/etc/linkding/data"}]
retain: true
size: "1Gi"
type: "persistentVolumeClaim"
}
service: main: {
annotations: "metallb.universe.tf/loadBalancerIPs": "192.168.2.9"
Expand Down
20 changes: 20 additions & 0 deletions components/media-pvc/component.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package holos

holos: Component.BuildPlan

Component: #Kustomize & {
Name: "media"
Namespace: "default"

KustomizeConfig: Kustomization: namespace: Namespace

Resources: PersistentVolumeClaim: (Name): {
apiVersion: "v1"
metadata: name: Name
spec: {
accessModes: ["ReadWriteMany"]
resources: requests: storage: "300Gi"
storageClassName: "ceph-filesystem"
}
}
}
20 changes: 20 additions & 0 deletions components/metrics-server/component.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package holos

holos: Component.BuildPlan

Component: #Helm & {
Name: "metrics-server"
Namespace: "kube-system"
Chart: {
name: "metrics-server"
version: "3.12.2"
repository: {
name: "metrics-server"
url: "https://kubernetes-sigs.github.io/metrics-server/"
}
}

Values: #Values

KustomizeConfig: Kustomization: namespace: Namespace
}
19 changes: 19 additions & 0 deletions components/metrics-server/values.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package holos

#Values: {
args: [
"--v=1",
"--cert-dir=/tmp",
"--kubelet-insecure-tls",
"--requestheader-client-ca-file=/var/run/ssl/auth-proxy-ca/requestheader-client-ca-file",
]
extraVolumes: [{
name: "auth-proxy-ca-cert"
configMap: name: "extension-apiserver-authentication"
}]
extraVolumeMounts: [{
mountPath: "/var/run/ssl/auth-proxy-ca"
name: "auth-proxy-ca-cert"
readOnly: true
}]
}
13 changes: 13 additions & 0 deletions components/mongodb/pvc.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package holos

Component: Resources: PersistentVolumeClaim: {
data: {
apiVersion: "v1"
metadata: name: "mongo-data"
spec: {
accessModes: ["ReadWriteOnce"]
resources: requests: storage: "1Gi"
storageClassName: "ceph-block"
}
}
}
7 changes: 2 additions & 5 deletions components/mongodb/values.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ package holos
}
persistence: {
data: {
accessMode: "ReadWriteOnce"
enabled: true
enabled: true
existingClaim: "mongo-data"
globalMounts: [{path: "/data/db"}]
retain: true
size: "8Gi"
type: "persistentVolumeClaim"
}
initdb: {
enabled: true
Expand Down
13 changes: 13 additions & 0 deletions components/prowlarr/pvc.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package holos

Component: Resources: PersistentVolumeClaim: {
data: {
apiVersion: "v1"
metadata: name: "prowlarr"
spec: {
accessModes: ["ReadWriteOnce"]
resources: requests: storage: "1Gi"
storageClassName: "ceph-block"
}
}
}
Loading

0 comments on commit 0708b87

Please sign in to comment.