Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c061965a88 | ||
|
|
b4de55f3c0 | ||
|
|
de6c9562f1 | ||
|
|
0c333375a5 | ||
|
|
5783547bd3 | ||
|
|
29c5b00c16 | ||
|
|
76b2090ccc | ||
|
|
bc83f7dd24 | ||
|
|
5768a4ff3b | ||
|
|
7ce98c4982 | ||
|
|
18f2654ff1 | ||
|
|
2fb63dded8 | ||
|
|
46bf1dc41b | ||
|
|
eda408aaea | ||
|
|
7b9da9236f |
No files matched your search
@@ -42,7 +42,11 @@ ArgoCD homelab project
|
||||
|
||||
| Application | Status |
|
||||
| :--- | :---: |
|
||||
| **airtrail** | [](https://ag.hexor.cy/applications/argocd/airtrail) |
|
||||
| **amnezia** | [](https://ag.hexor.cy/applications/argocd/amnezia) |
|
||||
| **comfyui** | [](https://ag.hexor.cy/applications/argocd/comfyui) |
|
||||
| **doka2-lobby-list** | [](https://ag.hexor.cy/applications/argocd/doka2-lobby-list) |
|
||||
| **firefly-iii** | [](https://ag.hexor.cy/applications/argocd/firefly-iii) |
|
||||
| **furumi** | [](https://ag.hexor.cy/applications/argocd/furumi) |
|
||||
| **gitea** | [](https://ag.hexor.cy/applications/argocd/gitea) |
|
||||
| **greece-notifier** | [](https://ag.hexor.cy/applications/argocd/greece-notifier) |
|
||||
@@ -52,7 +56,9 @@ ArgoCD homelab project
|
||||
| **jellyfin** | [](https://ag.hexor.cy/applications/argocd/jellyfin) |
|
||||
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
||||
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
||||
| **lan-play** | [](https://ag.hexor.cy/applications/argocd/lan-play) |
|
||||
| **lidarr** | [](https://ag.hexor.cy/applications/argocd/lidarr) |
|
||||
| **llamacpp** | [](https://ag.hexor.cy/applications/argocd/llamacpp) |
|
||||
| **matrix** | [](https://ag.hexor.cy/applications/argocd/matrix) |
|
||||
| **mtproxy** | [](https://ag.hexor.cy/applications/argocd/mtproxy) |
|
||||
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: airtrail
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: apps
|
||||
destination:
|
||||
namespace: airtrail
|
||||
server: https://kubernetes.default.svc
|
||||
source:
|
||||
repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git
|
||||
targetRevision: HEAD
|
||||
path: k8s/apps/airtrail
|
||||
syncPolicy:
|
||||
automated:
|
||||
selfHeal: true
|
||||
prune: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
@@ -0,0 +1,66 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: airtrail
|
||||
labels:
|
||||
app: airtrail
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: airtrail
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: airtrail
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: airtrail
|
||||
image: johly/airtrail:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
env:
|
||||
- name: ORIGIN
|
||||
value: https://at.hexor.cy
|
||||
- name: DB_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: airtrail-creds
|
||||
key: DB_URL
|
||||
- name: UPLOAD_LOCATION
|
||||
value: /app/uploads
|
||||
- name: BODY_SIZE_LIMIT
|
||||
value: 20M
|
||||
volumeMounts:
|
||||
- name: uploads
|
||||
mountPath: /app/uploads
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
startupProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
failureThreshold: 30
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
periodSeconds: 30
|
||||
volumes:
|
||||
- name: uploads
|
||||
persistentVolumeClaim:
|
||||
claimName: airtrail-uploads
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: airtrail-creds
|
||||
spec:
|
||||
target:
|
||||
name: airtrail-creds
|
||||
deletionPolicy: Delete
|
||||
template:
|
||||
type: Opaque
|
||||
data:
|
||||
DB_URL: |-
|
||||
postgresql://airtrail:{{ .airtrail | trim | urlquery | replace "+" "%20" }}@psql.psql.svc:5432/airtrail
|
||||
data:
|
||||
- secretKey: airtrail
|
||||
sourceRef:
|
||||
storeRef:
|
||||
name: vaultwarden-login
|
||||
kind: ClusterSecretStore
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
metadataPolicy: None
|
||||
key: 2a9deb39-ef22-433e-a1be-df1555625e22
|
||||
property: fields[21].value
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: airtrail-tls-ingress
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
traefik.ingress.kubernetes.io/router.middlewares: kube-system-https-redirect@kubernetescrd
|
||||
acme.cert-manager.io/http01-edit-in-place: "true"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: at.hexor.cy
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: airtrail
|
||||
port:
|
||||
number: 3000
|
||||
tls:
|
||||
- secretName: airtrail-tls
|
||||
hosts:
|
||||
- at.hexor.cy
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- app.yaml
|
||||
- external-secrets.yaml
|
||||
- storage.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: airtrail
|
||||
labels:
|
||||
app: airtrail
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: airtrail
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 3000
|
||||
targetPort: http
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: airtrail-uploads
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
@@ -8,7 +8,7 @@ data:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PORT="${1:-5847}"
|
||||
PORT="${1:-5848}"
|
||||
VPN_CIDR="${2:-10.8.0.0/16}"
|
||||
POLICY_FILE="${3:-/run/amnezia/policy/policy.conf}"
|
||||
FORWARD_CHAIN="AMNEZIAWG-FORWARD"
|
||||
@@ -96,12 +96,18 @@ data:
|
||||
[[ "${source}" == \#* ]] && continue
|
||||
if [ -n "${extra:-}" ] \
|
||||
|| ! valid_ipv4_32 "${source}" \
|
||||
|| ! valid_ipv4_32 "${destination:-}" \
|
||||
|| ! routed_through_awg0 "${source}" \
|
||||
|| ! routed_through_awg0 "${destination}"; then
|
||||
echo "Invalid or out-of-tunnel policy line: ${source:-} ${destination:-} ${extra:-}" >&2
|
||||
"${IPTABLES[@]}" -F "${inactive}"
|
||||
return 1
|
||||
|| ! valid_ipv4_32 "${destination:-}"; then
|
||||
echo "Skipping malformed policy line: ${source:-} ${destination:-} ${extra:-}" >&2
|
||||
continue
|
||||
fi
|
||||
# A pair whose endpoints are not (yet) routed through awg0 is skipped
|
||||
# rather than fatal. During interface bring-up the awg0 route may not be
|
||||
# in place, and a missing ACCEPT simply leaves the pair subject to the
|
||||
# client-isolation DROP below (fail-closed) instead of aborting the whole
|
||||
# policy and crash-looping the container.
|
||||
if ! routed_through_awg0 "${source}" || ! routed_through_awg0 "${destination}"; then
|
||||
echo "Skipping out-of-tunnel policy pair: ${source} ${destination}" >&2
|
||||
continue
|
||||
fi
|
||||
"${IPTABLES[@]}" -A "${inactive}" \
|
||||
-i awg0 -o awg0 -s "${source}" -d "${destination}" \
|
||||
@@ -181,7 +187,7 @@ data:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PORT="${1:-5847}"
|
||||
PORT="${1:-5848}"
|
||||
VPN_CIDR="${2:-10.8.0.0/16}"
|
||||
FORWARD_CHAIN="AMNEZIAWG-FORWARD"
|
||||
POLICY_CHAIN_A="AMNEZIAWG-POLICY-A"
|
||||
@@ -239,7 +245,7 @@ data:
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PORT="${1:-5847}"
|
||||
PORT="${1:-5848}"
|
||||
VPN_CIDR="${2:-10.8.0.0/16}"
|
||||
FORWARD_CHAIN="AMNEZIAWG-FORWARD"
|
||||
IPTABLES=(iptables -w 5)
|
||||
@@ -270,9 +276,13 @@ data:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FIRST_FORWARD_RULE="$("${IPTABLES[@]}" -S FORWARD | grep '^-A FORWARD ' | sed -n '1p')"
|
||||
[[ "${FIRST_FORWARD_RULE}" == *"--comment amneziawg-forward-jump"* ]]
|
||||
[[ "${FIRST_FORWARD_RULE}" == *"-j ${FORWARD_CHAIN}"* ]]
|
||||
# The amneziawg FORWARD jump must be present. firewall-up inserts it at
|
||||
# position 1, but CNI controllers (e.g. kube-router) legitimately re-assert
|
||||
# their own jump ahead of it. Requiring the strict first position makes the
|
||||
# readiness probe flap as the two fight over rule order. Isolation still holds
|
||||
# as long as the jump is traversed and no earlier rule accepts awg0-to-awg0
|
||||
# traffic (kube-router's chain returns non-pod traffic without a decision).
|
||||
"${IPTABLES[@]}" -C FORWARD -m comment --comment amneziawg-forward-jump -j "${FORWARD_CHAIN}"
|
||||
ACTIVE_POLICY="$("${IPTABLES[@]}" -S "${FORWARD_CHAIN}" 2>/dev/null \
|
||||
| awk '$1 == "-A" && $3 == "-j" && $4 ~ /^AMNEZIAWG-POLICY-[AB]$/ { print $4; exit }')"
|
||||
[ -n "${ACTIVE_POLICY}" ]
|
||||
@@ -362,12 +372,12 @@ data:
|
||||
apply_live_config() {
|
||||
# Fail closed during a peer/key and policy transition. /dev/null produces
|
||||
# an Internet-only policy with all awg0-to-awg0 traffic isolated.
|
||||
/scripts/firewall-up.sh 5847 10.8.0.0/16 /dev/null
|
||||
/scripts/firewall-up.sh 5848 10.8.0.0/16 /dev/null
|
||||
render_config
|
||||
awg-quick strip "${RUNTIME_CONFIG}" > "${SYNC_CONFIG}"
|
||||
chmod 0600 "${SYNC_CONFIG}"
|
||||
awg syncconf awg0 "${SYNC_CONFIG}"
|
||||
/scripts/firewall-up.sh 5847 10.8.0.0/16 "${POLICY_FILE}"
|
||||
/scripts/firewall-up.sh 5848 10.8.0.0/16 "${POLICY_FILE}"
|
||||
}
|
||||
|
||||
watch_client_config() {
|
||||
|
||||
@@ -52,7 +52,7 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: PORT
|
||||
value: "5847"
|
||||
value: "5848"
|
||||
command:
|
||||
- /bin/bash
|
||||
- -lc
|
||||
@@ -116,14 +116,14 @@ spec:
|
||||
- /scripts/run.sh
|
||||
ports:
|
||||
- name: awg
|
||||
containerPort: 5847
|
||||
containerPort: 5848
|
||||
protocol: UDP
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -lc
|
||||
- /scripts/firewall-check.sh 5847 10.8.0.0/16
|
||||
- /scripts/firewall-check.sh 5848 10.8.0.0/16
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 8
|
||||
@@ -133,7 +133,7 @@ spec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -lc
|
||||
- /scripts/firewall-check.sh 5847 10.8.0.0/16 || /scripts/firewall-up.sh 5847 10.8.0.0/16
|
||||
- /scripts/firewall-check.sh 5848 10.8.0.0/16 || /scripts/firewall-up.sh 5848 10.8.0.0/16
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 15
|
||||
failureThreshold: 12
|
||||
@@ -142,7 +142,7 @@ spec:
|
||||
command:
|
||||
- /bin/bash
|
||||
- -lc
|
||||
- /scripts/firewall-check.sh 5847 10.8.0.0/16 || /scripts/firewall-up.sh 5847 10.8.0.0/16
|
||||
- /scripts/firewall-check.sh 5848 10.8.0.0/16 || /scripts/firewall-up.sh 5848 10.8.0.0/16
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 15
|
||||
|
||||
@@ -16,21 +16,21 @@ spec:
|
||||
[Interface]
|
||||
PrivateKey = {{ .server_private_key }}
|
||||
Address = 10.8.0.1/16
|
||||
ListenPort = 5847
|
||||
ListenPort = 5848
|
||||
MTU = 1376
|
||||
Jc = 4
|
||||
Jmin = 64
|
||||
Jmax = 128
|
||||
S1 = 15
|
||||
S2 = 18
|
||||
S3 = 20
|
||||
S4 = 23
|
||||
H1 = 1020325451
|
||||
H2 = 3288052141
|
||||
H3 = 1766607858
|
||||
H4 = 2528465083
|
||||
PostUp = /scripts/firewall-up.sh 5847 10.8.0.0/16
|
||||
PostDown = /scripts/firewall-down.sh 5847 10.8.0.0/16
|
||||
Jc = 5
|
||||
Jmin = 96
|
||||
Jmax = 320
|
||||
S1 = 37
|
||||
S2 = 47
|
||||
S3 = 29
|
||||
S4 = 43
|
||||
H1 = 1247270921
|
||||
H2 = 1956534873
|
||||
H3 = 886504771
|
||||
H4 = 1623791047
|
||||
PostUp = /scripts/firewall-up.sh 5848 10.8.0.0/16
|
||||
PostDown = /scripts/firewall-down.sh 5848 10.8.0.0/16
|
||||
data:
|
||||
- secretKey: server_private_key
|
||||
sourceRef:
|
||||
|
||||
@@ -25,7 +25,7 @@ spec:
|
||||
kubernetes.io/hostname: cy.tail2fe2d.ts.net
|
||||
containers:
|
||||
- name: amnezia-fellow
|
||||
image: ultradesu/amnezia-fellow:latest
|
||||
image: ultradesu/amnezia-fellow:1.0.2
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
|
||||
@@ -34,7 +34,7 @@ spec:
|
||||
mountPath: /templates/subscription
|
||||
containers:
|
||||
- name: pasarguard-web
|
||||
image: pasarguard/panel:v5.0.3
|
||||
image: pasarguard/panel:v5.3.0
|
||||
imagePullPolicy: Always
|
||||
envFrom:
|
||||
- secretRef:
|
||||
|
||||
@@ -10,7 +10,7 @@ resources:
|
||||
helmCharts:
|
||||
- name: cert-manager
|
||||
repo: https://charts.jetstack.io
|
||||
version: 1.20.0
|
||||
version: 1.21.1
|
||||
releaseName: cert-manager
|
||||
namespace: cert-manager
|
||||
valuesFile: values.yaml
|
||||
|
||||
@@ -7,7 +7,7 @@ resources:
|
||||
helmCharts:
|
||||
- name: external-secrets
|
||||
repo: https://charts.external-secrets.io
|
||||
version: 1.1.0
|
||||
version: 2.10.0
|
||||
releaseName: external-secrets
|
||||
namespace: external-secrets
|
||||
valuesFile: values.yaml
|
||||
|
||||
@@ -9,7 +9,7 @@ resources:
|
||||
helmCharts:
|
||||
- name: keycloakx
|
||||
repo: https://codecentric.github.io/helm-charts
|
||||
version: 7.1.11
|
||||
version: 7.3.1
|
||||
releaseName: keycloak
|
||||
namespace: keycloak
|
||||
valuesFile: values.yaml
|
||||
@@ -7,7 +7,7 @@ kind: Kustomization
|
||||
helmCharts:
|
||||
- name: longhorn
|
||||
repo: https://charts.longhorn.io
|
||||
version: 1.12.0
|
||||
version: 1.12.1
|
||||
releaseName: longhorn
|
||||
namespace: longhorn-system
|
||||
valuesFile: values.yaml
|
||||
|
||||
@@ -144,6 +144,8 @@ spec:
|
||||
{{ .amnezia_fellow }}
|
||||
USER_web_petting: |-
|
||||
{{ .web_petting }}
|
||||
USER_airtrail: |-
|
||||
{{ .airtrail }}
|
||||
data:
|
||||
- secretKey: authentik
|
||||
sourceRef:
|
||||
@@ -365,3 +367,14 @@ spec:
|
||||
metadataPolicy: None
|
||||
key: 2a9deb39-ef22-433e-a1be-df1555625e22
|
||||
property: fields[20].value
|
||||
- secretKey: airtrail
|
||||
sourceRef:
|
||||
storeRef:
|
||||
name: vaultwarden-login
|
||||
kind: ClusterSecretStore
|
||||
remoteRef:
|
||||
conversionStrategy: Default
|
||||
decodingStrategy: None
|
||||
metadataPolicy: None
|
||||
key: 2a9deb39-ef22-433e-a1be-df1555625e22
|
||||
property: fields[21].value
|
||||
@@ -14,15 +14,15 @@ resources:
|
||||
helmCharts:
|
||||
- name: kube-prometheus-stack
|
||||
repo: https://prometheus-community.github.io/helm-charts
|
||||
version: 84.3.0
|
||||
version: 88.6.2
|
||||
releaseName: prometheus
|
||||
namespace: prometheus
|
||||
valuesFile: prom-values.yaml
|
||||
includeCRDs: true
|
||||
|
||||
- name: loki
|
||||
repo: https://grafana.github.io/helm-charts
|
||||
version: 6.29.0
|
||||
repo: https://grafana-community.github.io/helm-charts
|
||||
version: 18.11.7
|
||||
releaseName: loki
|
||||
namespace: prometheus
|
||||
valuesFile: loki-values.yaml
|
||||
@@ -30,7 +30,7 @@ helmCharts:
|
||||
|
||||
- name: promtail
|
||||
repo: https://grafana.github.io/helm-charts
|
||||
version: 6.16.6
|
||||
version: 6.17.1
|
||||
releaseName: promtail
|
||||
namespace: prometheus
|
||||
valuesFile: promtail-values.yaml
|
||||
|
||||
@@ -95,6 +95,11 @@ prometheus:
|
||||
|
||||
grafana:
|
||||
enabled: true
|
||||
|
||||
sidecar:
|
||||
datasources:
|
||||
alertmanager:
|
||||
uid: ff9iga3xqregwc
|
||||
|
||||
serviceAccount:
|
||||
create: true
|
||||
|
||||
Reference in new issue
Block a user