Compare commits
3 Commits
586ceb9f4e
...
1b2e571bfe
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b2e571bfe | |||
| cb70bf91b5 | |||
| 2597abd084 |
@ -4,10 +4,10 @@
|
|||||||
# Fallback: kubectl port-forward to service (OK for small/medium files).
|
# Fallback: kubectl port-forward to service (OK for small/medium files).
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# scripts/manual_jellyfin_load.fish <LOCAL_PATH> [REMOTE_SUBDIR] [JELLYFIN_API_KEY]
|
# scripts/jellyfin_manual_load.fish <LOCAL_PATH> [REMOTE_SUBDIR] [JELLYFIN_API_KEY]
|
||||||
# Examples:
|
# Examples:
|
||||||
# scripts/manual_jellyfin_load.fish "$HOME/Downloads/Avatar - The Last Airbender (2005 - 2008) [1080p]" kids_tv "$JELLYFIN_API_TOKEN"
|
# scripts/jellyfin_manual_load.fish "$HOME/Downloads/Avatar - The Last Airbender (2005 - 2008) [1080p]" kids_tv "$JELLYFIN_API_TOKEN"
|
||||||
# scripts/manual_jellyfin_load.fish "$HOME/Movies/." movies # copy contents-only into /media/movies
|
# scripts/jellyfin_manual_load.fish "$HOME/Movies/." movies # copy contents-only into /media/movies
|
||||||
|
|
||||||
function usage
|
function usage
|
||||||
echo "Usage: "(basename (status filename))" <LOCAL_PATH> [REMOTE_SUBDIR] [JELLYFIN_API_KEY]"
|
echo "Usage: "(basename (status filename))" <LOCAL_PATH> [REMOTE_SUBDIR] [JELLYFIN_API_KEY]"
|
||||||
|
|||||||
23
scripts/longhorn_volume_usage.fish
Normal file
23
scripts/longhorn_volume_usage.fish
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
function pvc-usage --description "Show Longhorn PVC usage (human-readable) mapped to namespace/name"
|
||||||
|
begin
|
||||||
|
kubectl -n longhorn-system get volumes.longhorn.io -o json \
|
||||||
|
| jq -r '.items[] | "\(.metadata.name)\t\(.status.actualSize)\t\(.spec.size)"' \
|
||||||
|
| sed 's/^/V\t/'
|
||||||
|
|
||||||
|
kubectl get pvc -A -o json \
|
||||||
|
| jq -r '.items[] | "\(.spec.volumeName)\t\(.metadata.namespace)/\(.metadata.name)"' \
|
||||||
|
| sed 's/^/P\t/'
|
||||||
|
end \
|
||||||
|
| awk 'BEGIN{FS="\t"}
|
||||||
|
$1=="V"{vol=$2; vu[vol]=$3; vs[vol]=$4}
|
||||||
|
$1=="P"{vol=$2; name=$3; map[vol]=name}
|
||||||
|
END{
|
||||||
|
for (v in vu){
|
||||||
|
used=vu[v]+0; size=vs[v]+0; pct=(size>0?used/size*100:0);
|
||||||
|
cmd="numfmt --to=iec --suffix=B " used; cmd|getline hu; close(cmd);
|
||||||
|
cmd="numfmt --to=iec --suffix=B " size; cmd|getline hs; close(cmd);
|
||||||
|
n=(v in map?map[v]:v);
|
||||||
|
printf "%-40s %-10s / %-10s (%5.1f%%)\n", n, hu, hs, pct
|
||||||
|
}
|
||||||
|
}' | sort
|
||||||
|
end
|
||||||
@ -18,6 +18,21 @@ spec:
|
|||||||
fsGroupChangePolicy: OnRootMismatch
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/worker: "true"
|
node-role.kubernetes.io/worker: "true"
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4","rpi5"]
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 50
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4"]
|
||||||
containers:
|
containers:
|
||||||
- name: monerod
|
- name: monerod
|
||||||
image: registry.bstein.dev/infra/monerod:0.18.4.1
|
image: registry.bstein.dev/infra/monerod:0.18.4.1
|
||||||
|
|||||||
@ -15,6 +15,21 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/worker: "true"
|
node-role.kubernetes.io/worker: "true"
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4","rpi5"]
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 50
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4"]
|
||||||
containers:
|
containers:
|
||||||
- name: monero-p2pool
|
- name: monero-p2pool
|
||||||
image: registry.bstein.dev/infra/monero-p2pool:4.9
|
image: registry.bstein.dev/infra/monero-p2pool:4.9
|
||||||
|
|||||||
@ -15,6 +15,14 @@ spec:
|
|||||||
priorityClassName: scavenger
|
priorityClassName: scavenger
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/worker: "true"
|
node-role.kubernetes.io/worker: "true"
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4","rpi5"]
|
||||||
volumes:
|
volumes:
|
||||||
- name: payout
|
- name: payout
|
||||||
secret:
|
secret:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# services/gitea/deployment.yaml
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
@ -22,6 +23,21 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/worker: "true"
|
node-role.kubernetes.io/worker: "true"
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4","rpi5"]
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 50
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4"]
|
||||||
containers:
|
containers:
|
||||||
- name: gitea
|
- name: gitea
|
||||||
image: gitea/gitea:1.23
|
image: gitea/gitea:1.23
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# services/gitea/ingress.yaml
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
|
# services/gitea/kustomization.yaml
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
# namespace: gitea
|
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# services/gitea/namespace.yaml
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# services/gitea/pvc.yaml
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# services/gitea/service.yaml
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@ -21,7 +21,7 @@ spec:
|
|||||||
runtimeClassName: nvidia
|
runtimeClassName: nvidia
|
||||||
containers:
|
containers:
|
||||||
- name: jellyfin
|
- name: jellyfin
|
||||||
image: docker.io/jellyfin/jellyfin:2025082505
|
image: docker.io/jellyfin/jellyfin:10.10.7
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
|
|||||||
@ -15,6 +15,21 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/worker: "true"
|
node-role.kubernetes.io/worker: "true"
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4","rpi5"]
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 50
|
||||||
|
preference:
|
||||||
|
matchExpressions:
|
||||||
|
- key: hardware
|
||||||
|
operator: In
|
||||||
|
values: ["rpi4"]
|
||||||
containers:
|
containers:
|
||||||
- name: zot
|
- name: zot
|
||||||
image: ghcr.io/project-zot/zot-linux-arm64:latest
|
image: ghcr.io/project-zot/zot-linux-arm64:latest
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user