fix: remove oidc-login cache

This commit is contained in:
Masaki Yatsu
2025-11-23 14:58:26 +09:00
parent 041c0f9de5
commit 2f6e9dcba8

View File

@@ -164,7 +164,18 @@ restart:
# Setup k8s OIDC authentication # Setup k8s OIDC authentication
setup-oidc-auth: setup-oidc-auth:
#!/bin/bash
set -euo pipefail
just env::check just env::check
# Clear OIDC token cache if it exists
if [ -d ~/.kube/cache/oidc-login ]; then
if gum confirm "Clear OIDC token cache? (Recommended after Keycloak reinstall)"; then
rm -rf ~/.kube/cache/oidc-login/
echo "OIDC token cache cleared."
fi
fi
gomplate -f ./k3s/config.gomplate.yaml | \ gomplate -f ./k3s/config.gomplate.yaml | \
ssh ${LOCAL_K8S_HOST} "sudo tee /etc/rancher/k3s/config.yaml > /dev/null" ssh ${LOCAL_K8S_HOST} "sudo tee /etc/rancher/k3s/config.yaml > /dev/null"
ssh ${LOCAL_K8S_HOST} "sudo systemctl restart k3s" ssh ${LOCAL_K8S_HOST} "sudo systemctl restart k3s"