Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa7717b3b1 |
@@ -13,10 +13,13 @@ ArgoCD homelab project
|
|||||||
| Application | Status |
|
| Application | Status |
|
||||||
| :--- | :---: |
|
| :--- | :---: |
|
||||||
| **argocd** | [](https://ag.hexor.cy/applications/argocd/argocd) |
|
| **argocd** | [](https://ag.hexor.cy/applications/argocd/argocd) |
|
||||||
|
| **auth-proxy** | [](https://ag.hexor.cy/applications/argocd/auth-proxy) |
|
||||||
| **authentik** | [](https://ag.hexor.cy/applications/argocd/authentik) |
|
| **authentik** | [](https://ag.hexor.cy/applications/argocd/authentik) |
|
||||||
| **cert-manager** | [](https://ag.hexor.cy/applications/argocd/cert-manager) |
|
| **cert-manager** | [](https://ag.hexor.cy/applications/argocd/cert-manager) |
|
||||||
| **external-secrets** | [](https://ag.hexor.cy/applications/argocd/external-secrets) |
|
| **external-secrets** | [](https://ag.hexor.cy/applications/argocd/external-secrets) |
|
||||||
| **gpu** | [](https://ag.hexor.cy/applications/argocd/gpu) |
|
| **gpu** | [](https://ag.hexor.cy/applications/argocd/gpu) |
|
||||||
|
| **kanidm** | [](https://ag.hexor.cy/applications/argocd/kanidm) |
|
||||||
|
| **keycloak** | [](https://ag.hexor.cy/applications/argocd/keycloak) |
|
||||||
| **kube-system-custom** | [](https://ag.hexor.cy/applications/argocd/kube-system-custom) |
|
| **kube-system-custom** | [](https://ag.hexor.cy/applications/argocd/kube-system-custom) |
|
||||||
| **kubernetes-dashboard** | [](https://ag.hexor.cy/applications/argocd/kubernetes-dashboard) |
|
| **kubernetes-dashboard** | [](https://ag.hexor.cy/applications/argocd/kubernetes-dashboard) |
|
||||||
| **longhorn** | [](https://ag.hexor.cy/applications/argocd/longhorn) |
|
| **longhorn** | [](https://ag.hexor.cy/applications/argocd/longhorn) |
|
||||||
@@ -39,8 +42,7 @@ ArgoCD homelab project
|
|||||||
| Application | Status |
|
| Application | Status |
|
||||||
| :--- | :---: |
|
| :--- | :---: |
|
||||||
| **comfyui** | [](https://ag.hexor.cy/applications/argocd/comfyui) |
|
| **comfyui** | [](https://ag.hexor.cy/applications/argocd/comfyui) |
|
||||||
| **furumi-dev** | [](https://ag.hexor.cy/applications/argocd/furumi-dev) |
|
| **furumi** | [](https://ag.hexor.cy/applications/argocd/furumi) |
|
||||||
| **furumi-server** | [](https://ag.hexor.cy/applications/argocd/furumi-server) |
|
|
||||||
| **gitea** | [](https://ag.hexor.cy/applications/argocd/gitea) |
|
| **gitea** | [](https://ag.hexor.cy/applications/argocd/gitea) |
|
||||||
| **greece-notifier** | [](https://ag.hexor.cy/applications/argocd/greece-notifier) |
|
| **greece-notifier** | [](https://ag.hexor.cy/applications/argocd/greece-notifier) |
|
||||||
| **hexound** | [](https://ag.hexor.cy/applications/argocd/hexound) |
|
| **hexound** | [](https://ag.hexor.cy/applications/argocd/hexound) |
|
||||||
@@ -62,9 +64,12 @@ ArgoCD homelab project
|
|||||||
| **sonarr-stack** | [](https://ag.hexor.cy/applications/argocd/sonarr-stack) |
|
| **sonarr-stack** | [](https://ag.hexor.cy/applications/argocd/sonarr-stack) |
|
||||||
| **stirling-pdf** | [](https://ag.hexor.cy/applications/argocd/stirling-pdf) |
|
| **stirling-pdf** | [](https://ag.hexor.cy/applications/argocd/stirling-pdf) |
|
||||||
| **syncthing** | [](https://ag.hexor.cy/applications/argocd/syncthing) |
|
| **syncthing** | [](https://ag.hexor.cy/applications/argocd/syncthing) |
|
||||||
|
| **teamspeak** | [](https://ag.hexor.cy/applications/argocd/teamspeak) |
|
||||||
| **tg-bots** | [](https://ag.hexor.cy/applications/argocd/tg-bots) |
|
| **tg-bots** | [](https://ag.hexor.cy/applications/argocd/tg-bots) |
|
||||||
| **vaultwarden** | [](https://ag.hexor.cy/applications/argocd/vaultwarden) |
|
| **vaultwarden** | [](https://ag.hexor.cy/applications/argocd/vaultwarden) |
|
||||||
| **vpn** | [](https://ag.hexor.cy/applications/argocd/vpn) |
|
| **vpn** | [](https://ag.hexor.cy/applications/argocd/vpn) |
|
||||||
|
| **web-petting** | [](https://ag.hexor.cy/applications/argocd/web-petting) |
|
||||||
|
| **wedding** | [](https://ag.hexor.cy/applications/argocd/wedding) |
|
||||||
| **xandikos** | [](https://ag.hexor.cy/applications/argocd/xandikos) |
|
| **xandikos** | [](https://ag.hexor.cy/applications/argocd/xandikos) |
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`proxy.hexor.cy`)
|
- match: Host(`secret-reader.hexor.cy`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
- name: auth-proxy
|
- name: auth-proxy
|
||||||
@@ -30,16 +30,16 @@ spec:
|
|||||||
- name: secret-reader
|
- name: secret-reader
|
||||||
port: 80
|
port: 80
|
||||||
tls:
|
tls:
|
||||||
secretName: proxy-tls
|
secretName: secret-reader-tls
|
||||||
---
|
---
|
||||||
apiVersion: cert-manager.io/v1
|
apiVersion: cert-manager.io/v1
|
||||||
kind: Certificate
|
kind: Certificate
|
||||||
metadata:
|
metadata:
|
||||||
name: proxy-tls
|
name: secret-reader-tls
|
||||||
spec:
|
spec:
|
||||||
secretName: proxy-tls
|
secretName: secret-reader-tls
|
||||||
issuerRef:
|
issuerRef:
|
||||||
name: letsencrypt
|
name: letsencrypt
|
||||||
kind: ClusterIssuer
|
kind: ClusterIssuer
|
||||||
dnsNames:
|
dnsNames:
|
||||||
- proxy.hexor.cy
|
- secret-reader.hexor.cy
|
||||||
|
|||||||
@@ -236,52 +236,29 @@ data:
|
|||||||
|
|
||||||
cd /app
|
cd /app
|
||||||
|
|
||||||
write_xray_api_port() {
|
|
||||||
API_PORT="$1"
|
|
||||||
case "$API_PORT" in
|
|
||||||
""|*[!0-9]*)
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
CURRENT_PORT=""
|
|
||||||
if [ -f /shared/xray-api-port ]; then
|
|
||||||
CURRENT_PORT=$(cat /shared/xray-api-port)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$API_PORT" != "$CURRENT_PORT" ]; then
|
|
||||||
echo "Found xray API port: $API_PORT"
|
|
||||||
echo -n "$API_PORT" > /shared/xray-api-port
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
LOG_PIPE="/tmp/pasarguard-main.log"
|
|
||||||
rm -f "$LOG_PIPE"
|
|
||||||
mkfifo "$LOG_PIPE"
|
|
||||||
|
|
||||||
# Capture main logs so the Xray API listener is not confused with Xray's metrics listener.
|
|
||||||
{
|
|
||||||
while IFS= read -r line; do
|
|
||||||
echo "$line"
|
|
||||||
case "$line" in
|
|
||||||
*"transport/internet/tcp: listening TCP on 127.0.0.1:"*)
|
|
||||||
API_PORT=$(echo "$line" | sed -n 's/.*listening TCP on 127\.0\.0\.1:\([0-9][0-9]*\).*/\1/p')
|
|
||||||
write_xray_api_port "$API_PORT"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
} < "$LOG_PIPE" &
|
|
||||||
LOG_READER_PID=$!
|
|
||||||
|
|
||||||
# Start main process in background
|
# Start main process in background
|
||||||
./main > "$LOG_PIPE" 2>&1 &
|
./main &
|
||||||
MAIN_PID=$!
|
MAIN_PID=$!
|
||||||
|
|
||||||
|
# Start continuous port monitoring in background
|
||||||
|
{
|
||||||
|
sleep 10 # Wait for xray to start initially
|
||||||
|
LAST_PORT=""
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
API_PORT=$(netstat -tlpn | grep xray | grep 127.0.0.1 | awk '{print $4}' | cut -d: -f2 | head -1)
|
||||||
|
if [ -n "$API_PORT" ] && [ "$API_PORT" != "$LAST_PORT" ]; then
|
||||||
|
echo "Found xray API port: $API_PORT"
|
||||||
|
echo -n "$API_PORT" > /shared/xray-api-port
|
||||||
|
LAST_PORT="$API_PORT"
|
||||||
|
fi
|
||||||
|
sleep 5 # Check every 5 seconds
|
||||||
|
done
|
||||||
|
} &
|
||||||
|
PORT_MONITOR_PID=$!
|
||||||
|
|
||||||
# Wait for main process to finish
|
# Wait for main process to finish
|
||||||
wait $MAIN_PID
|
wait $MAIN_PID
|
||||||
MAIN_STATUS=$?
|
|
||||||
|
|
||||||
# Clean up log reader
|
# Clean up port monitor
|
||||||
wait $LOG_READER_PID 2>/dev/null
|
kill $PORT_MONITOR_PID 2>/dev/null
|
||||||
rm -f "$LOG_PIPE"
|
|
||||||
exit $MAIN_STATUS
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ spec:
|
|||||||
mountPath: /scripts
|
mountPath: /scripts
|
||||||
containers:
|
containers:
|
||||||
- name: pasarguard-node
|
- name: pasarguard-node
|
||||||
image: pasarguard/node:v0.5.0
|
image: pasarguard/node:v0.4.0
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
@@ -116,20 +116,14 @@ spec:
|
|||||||
- name: metrics
|
- name: metrics
|
||||||
containerPort: 9550
|
containerPort: 9550
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
startupProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /scrape
|
path: /scrape
|
||||||
port: metrics
|
port: metrics
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 5
|
|
||||||
failureThreshold: 36
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: metrics
|
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 60
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 10
|
||||||
failureThreshold: 6
|
failureThreshold: 3
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /scrape
|
path: /scrape
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- name: RUST_LOG
|
- name: RUST_LOG
|
||||||
value: "info"
|
value: "info"
|
||||||
- name: WEB_PETTING_DEBUG
|
|
||||||
value: "false"
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "256Mi"
|
memory: "256Mi"
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
|
||||||
kind: Application
|
|
||||||
metadata:
|
|
||||||
name: reloader
|
|
||||||
namespace: argocd
|
|
||||||
spec:
|
|
||||||
project: core
|
|
||||||
destination:
|
|
||||||
namespace: reloader
|
|
||||||
server: https://kubernetes.default.svc
|
|
||||||
source:
|
|
||||||
repoURL: ssh://git@gt.hexor.cy:30022/ab/homelab.git
|
|
||||||
targetRevision: HEAD
|
|
||||||
path: k8s/core/reloader
|
|
||||||
syncPolicy:
|
|
||||||
automated:
|
|
||||||
selfHeal: true
|
|
||||||
prune: true
|
|
||||||
syncOptions:
|
|
||||||
- CreateNamespace=true
|
|
||||||
- ServerSideApply=true
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
|
|
||||||
resources:
|
|
||||||
- app.yaml
|
|
||||||
|
|
||||||
helmCharts:
|
|
||||||
- name: reloader
|
|
||||||
repo: https://stakater.github.io/stakater-charts
|
|
||||||
version: 2.2.12
|
|
||||||
releaseName: reloader
|
|
||||||
namespace: reloader
|
|
||||||
valuesFile: values.yaml
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
reloader:
|
|
||||||
watchGlobally: true
|
|
||||||
autoReloadAll: true
|
|
||||||
reloadOnCreate: true
|
|
||||||
reloadOnDelete: false
|
|
||||||
reloadStrategy: annotations
|
|
||||||
ignoreConfigMaps: false
|
|
||||||
ignoreSecrets: false
|
|
||||||
ignoreJobs: false
|
|
||||||
ignoreCronJobs: false
|
|
||||||
enableHA: true
|
|
||||||
syncAfterRestart: true
|
|
||||||
logLevel: info
|
|
||||||
rbac:
|
|
||||||
enabled: true
|
|
||||||
deployment:
|
|
||||||
replicas: 2
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 128Mi
|
|
||||||
limits:
|
|
||||||
cpu: 150m
|
|
||||||
memory: 512Mi
|
|
||||||
@@ -9,12 +9,12 @@ groups = [
|
|||||||
|
|
||||||
proxy_applications = {
|
proxy_applications = {
|
||||||
secret-reader = {
|
secret-reader = {
|
||||||
domain = "proxy.hexor.cy"
|
domain = "secret-reader.hexor.cy"
|
||||||
allowed_groups = ["hexor-admin", "app-pass"]
|
allowed_groups = ["hexor-guest", "hexor-admin"]
|
||||||
}
|
}
|
||||||
pass = {
|
pass = {
|
||||||
domain = "pass.hexor.cy"
|
domain = "pass.hexor.cy"
|
||||||
allowed_groups = ["hexor-admin", "app-pass"]
|
allowed_groups = ["hexor-guest", "hexor-admin"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,3 +56,4 @@ oauth2_applications = {
|
|||||||
post_logout_redirect_uris = ["https://pet.hexor.cy/*", "https://xn--l1acako8eb.xn--p1ai/*", "https://мурняня.рф/*"]
|
post_logout_redirect_uris = ["https://pet.hexor.cy/*", "https://xn--l1acako8eb.xn--p1ai/*", "https://мурняня.рф/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user