From 44cccb5f6b75c532aa6b097e2989d7581e78869e Mon Sep 17 00:00:00 2001 From: makefunstuff Date: Fri, 28 Jun 2024 13:30:53 +0300 Subject: proper refactoring --- scripts/create-secret | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/create-secret (limited to 'scripts/create-secret') 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 " +} + +case "$#" in + 3) + createSecret $1 $2 $3 + ;; + *) + help + ;; +esac -- cgit 1.4.1-2-gfad0