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:
|
gitea:
|
||||||
config:
|
config:
|
||||||
repository:
|
repository:
|
||||||
ROOT: /git-data/git/repositories
|
ROOT: /mnt/git-data/git/repositories
|
||||||
database:
|
database:
|
||||||
DB_TYPE: sqlite3
|
DB_TYPE: sqlite3
|
||||||
session:
|
session:
|
||||||
@@ -21,8 +21,14 @@ gitea:
|
|||||||
ADAPTER: memory
|
ADAPTER: memory
|
||||||
queue:
|
queue:
|
||||||
TYPE: level
|
TYPE: level
|
||||||
|
admin:
|
||||||
|
existingSecret: gitea-admin-secret
|
||||||
|
email: luca_lise@icloud.ca
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: kube
|
kubernetes.io/hostname: kube
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -40,4 +46,4 @@ extraVolumes:
|
|||||||
path: /data
|
path: /data
|
||||||
extraContainerVolumeMounts:
|
extraContainerVolumeMounts:
|
||||||
- name: git-nfs
|
- name: git-nfs
|
||||||
mountPath: /git-data
|
mountPath: /mnt/git-data
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
192.168.18.31 traefik.lucalise.ca
|
192.168.18.31 traefik.lucalise.ca
|
||||||
192.168.18.31 media.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 = {
|
services.resolved = {
|
||||||
|
|||||||
Reference in New Issue
Block a user