diff options
author | makefunstuff <[email protected]> | 2024-06-28 12:30:53 +0200 |
---|---|---|
committer | makefunstuff <[email protected]> | 2024-06-28 12:30:53 +0200 |
commit | 44cccb5f6b75c532aa6b097e2989d7581e78869e (patch) | |
tree | ad2d4b607ce63210707d3ddc26a9c88301544bb4 /scripts | |
parent | 303262c75bd8d3ad2e166760f0518a0d8aa0591c (diff) | |
download | k3s-lab-44cccb5f6b75c532aa6b097e2989d7581e78869e.tar.gz |
proper refactoring
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-secret | 24 | ||||
-rwxr-xr-x | scripts/deploy-argocd | 12 | ||||
-rw-r--r-- | scripts/setup-apps | 0 |
3 files changed, 36 insertions, 0 deletions
diff --git a/scripts/create-secret b/scripts/create-secret new file mode 100755 index 0000000..d9aa929 --- /dev/null +++ b/scripts/create-secret @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +function createSecret() { + local secretName=$1 + local secretKey=$2 + local secretValue=$3 + + kubectl create secret generic $secretName --from-literal=$secretKey=$secretValue +} + +function help() { + echo "Usage: create-secret <secret name> <secret key> <secret value>" +} + +case "$#" in + 3) + createSecret $1 $2 $3 + ;; + *) + help + ;; +esac diff --git a/scripts/deploy-argocd b/scripts/deploy-argocd new file mode 100755 index 0000000..2fdec58 --- /dev/null +++ b/scripts/deploy-argocd @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + + +if kubectl get namespace argocd; then + echo "Namespace 'argocd' alreay exists. Doing nothing" +else + echo "Creating argocd namespace" + kubectl create namespace argocd +fi + diff --git a/scripts/setup-apps b/scripts/setup-apps new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/scripts/setup-apps |