diff --git a/Taskfile.yaml b/Taskfile.yaml index fc3b365..f937d15 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -7,7 +7,7 @@ vars: SCRIPTS_DIR: "{{.ROOT_DIR}}/scripts" SOPS_CONFIG_FILE: "{{.ROOT_DIR}}/.sops.yaml" AGE_DIR: ~/.config/sops/age - AGE_FILE: "{{.AGE_DIR}}/keys.txt" + AGE_FILE: "{{.AGE_DIR}}/rd350.key" #env: # KUBECONFIG: "{{.KUBECONFIG_FILE}}" diff --git a/kubernetes/lianalabs/apps/labs/homepage/app/resources/settings.yaml b/kubernetes/lianalabs/apps/labs/homepage/app/resources/settings.yaml index a718149..e9c9f10 100644 --- a/kubernetes/lianalabs/apps/labs/homepage/app/resources/settings.yaml +++ b/kubernetes/lianalabs/apps/labs/homepage/app/resources/settings.yaml @@ -17,6 +17,8 @@ layout: columns: 4 Services: tab: Main + Tools: + tab: Main Home: tab: Main Endpoints: diff --git a/scripts/kubeconform.sh b/scripts/kubeconform.sh index a651496..033b515 100644 --- a/scripts/kubeconform.sh +++ b/scripts/kubeconform.sh @@ -1,4 +1,5 @@ #!/usr/bin/bash + set -o errexit set -o pipefail diff --git a/scripts/wip.sh b/scripts/wip.sh index 3cb85ca..38f15de 100755 --- a/scripts/wip.sh +++ b/scripts/wip.sh @@ -1,10 +1,40 @@ -#!/usr/bin/bash +#!/bin/bash +# Improved version of brettinternet's wip.sh +# https://github.com/brettinternet/homeops/blob/main/scripts/wip.sh +# +# Usage: +# create WIP commit +# push to current branch +# reconcile the cluster with flux +# remove previous WIP commit +# +# Options: +# -c, --cluster Specify the cluster to reconcile (default: lianalabs) +# -h, --help Show this help message # Usage: create WIP commit # push to current branch # reconcile the cluster with flux # remove previous WIP commit +CLUSTER="lianalabs" + +function show_help { + echo "Usage: $0 [options]" + echo "" + echo "Options:" + echo " -c, --cluster Specify the cluster to reconcile (default: lianalabs)" + echo " -h, --help Show this help message" + exit 0 +} + +# Ensure secrets can be encrypted before we push +function check_go_task { + if ! command -v task &> /dev/null; then + echo "Error: go-task is not installed. Please install it before running this script." + exit 1 + fi +} echo -n "Checking variables..." if [ ! -d "$ROOT_DIR" ]; then @@ -43,6 +73,22 @@ function gpcf { git push --force-with-lease origin "$(git_current_branch)" } +while [[ "$#" -gt 0 ]]; do + case $1 in + -c|--cluster) + CLUSTER="$2" + shift 2 + ;; + -h|--help) + show_help + ;; + *) + echo "Unknown parameter passed: $1" + exit 1 + ;; + esac +done + echo "Encrypting secrets" echo "" task sops:encrypt-all @@ -51,7 +97,7 @@ gwip gpcf echo "Reconciling flux" echo "" -task flux:reconcile cluster=lianalabs +task flux:reconcile cluster=$CLUSTER echo "" echo "Git Log:" gunwip