feat(homelab): add switch namespace alias, configure gitea
This commit is contained in:
26
aliases/kswitchns.sh
Executable file
26
aliases/kswitchns.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: kswitchns <namespace>"
|
||||
echo "Current namespace: $(kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null || echo 'default')"
|
||||
echo ""
|
||||
echo "Available namespaces:"
|
||||
kubectl get namespaces --no-headers -o custom-columns=":metadata.name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NAMESPACE="$1"
|
||||
|
||||
# Verify namespace exists
|
||||
if ! kubectl get namespace "$NAMESPACE" &>/dev/null; then
|
||||
echo "Error: Namespace '$NAMESPACE' does not exist"
|
||||
echo ""
|
||||
echo "Available namespaces:"
|
||||
kubectl get namespaces --no-headers -o custom-columns=":metadata.name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set namespace for current context
|
||||
kubectl config set-context --current --namespace="$NAMESPACE"
|
||||
|
||||
echo "Switched to namespace: $NAMESPACE"
|
||||
@@ -12,7 +12,7 @@ resources:
|
||||
gitea:
|
||||
config:
|
||||
repository:
|
||||
ROOT: /git-data/git/repositories
|
||||
ROOT: /mnt/git-data/git/repositories
|
||||
database:
|
||||
DB_TYPE: sqlite3
|
||||
session:
|
||||
@@ -21,8 +21,14 @@ gitea:
|
||||
ADAPTER: memory
|
||||
queue:
|
||||
TYPE: level
|
||||
admin:
|
||||
existingSecret: gitea-admin-secret
|
||||
email: luca_lise@icloud.ca
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: kube
|
||||
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
postgresql:
|
||||
enabled: false
|
||||
@@ -40,4 +46,4 @@ extraVolumes:
|
||||
path: /data
|
||||
extraContainerVolumeMounts:
|
||||
- name: git-nfs
|
||||
mountPath: /git-data
|
||||
mountPath: /mnt/git-data
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
networking.extraHosts = ''
|
||||
192.168.18.31 traefik.lucalise.ca
|
||||
192.168.18.31 media.lucalise.ca
|
||||
192.168.18.31 git.lucalise.ca
|
||||
192.168.18.31 git-new.lucalise.ca
|
||||
'';
|
||||
|
||||
services.resolved = {
|
||||
|
||||
Reference in New Issue
Block a user