summaryrefslogtreecommitdiff
path: root/scripts/k8s.yaml
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-09-06 16:29:40 +0200
committerSanto Cariotti <santo@dcariotti.me>2024-09-06 16:29:40 +0200
commitb8b0f661e6857731215798c6759e0ade9b3099f6 (patch)
treef5b887aec46e5521f90da61d98267d2170daebc6 /scripts/k8s.yaml
parentff68c8cd24baef66ebb038d237b8f501c84edde5 (diff)
Fix scripts and add compose
Diffstat (limited to 'scripts/k8s.yaml')
-rwxr-xr-xscripts/k8s.yaml40
1 files changed, 0 insertions, 40 deletions
diff --git a/scripts/k8s.yaml b/scripts/k8s.yaml
deleted file mode 100755
index 350a19a..0000000
--- a/scripts/k8s.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-usage() {
- echo "Usage: $0 (apply|delete)"
-}
-
-if [ $# -ne 1 ]; then
- usage
- exit 1
-fi
-
-command=$1
-
-if [ "$1" != "apply" ] && [ "$1" != "delete" ]; then
- usage
- exit 1
-fi
-
-K8S_FOLDER="../k8s"
-
-if [ "$(basename "$PWD")" = "backend" ]; then
- K8S_FOLDER="./k8s"
-fi
-
-YAML_FILES=(
- "cas-config.yaml"
- "cas-deployment.yaml"
- "cas-secret.yaml"
- "cas-service.yaml"
- "network-policy.yaml"
- "pgdata-pvc.yaml"
- "postgres-deployment.yaml"
- "postgres-service.yaml"
-)
-
-for file in "${YAML_FILES[@]}"; do
- file="$K8S_FOLDER/$file"
- echo "${command^}ing $file ..."
- envsubst < $file | kubectl "$command" -f -
-done