From bfe6265a446bb87a141b8fe1cccf734cb32d793a Mon Sep 17 00:00:00 2001 From: iloveicedgreentea <31193909+iloveicedgreentea@users.noreply.github.com> Date: Fri, 1 Oct 2021 16:18:13 -0400 Subject: [PATCH] update documentation --- cloudfunctions/backup/Readme.md | 12 +++++++++--- cloudfunctions/scaledown/Readme.md | 19 ++++++++----------- cloudfunctions/scaleup/Readme.md | 10 +++++----- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/cloudfunctions/backup/Readme.md b/cloudfunctions/backup/Readme.md index e019f19..63dd146 100644 --- a/cloudfunctions/backup/Readme.md +++ b/cloudfunctions/backup/Readme.md @@ -1,3 +1,9 @@ -BACKUP_FILE_NAME - The basename of the backup file. Assumes zip. Don't include file extension. -BUCKET_NAME - the destination backup bucket -BUCKET_NAME_DR - secondary bucket to write to for DR. The valheim SA should not have access to this \ No newline at end of file +# Backup + +This CF will perform a daily backup and optionally copy it to a secondary bucket. + +## Env Vars + +* BACKUP_FILE_NAME - The basename of the backup file. Assumes zip. Don't include file extension. +* BUCKET_NAME - the destination backup bucket +* BUCKET_NAME_DR - secondary bucket to write to for DR. The valheim SA should not have access to this \ No newline at end of file diff --git a/cloudfunctions/scaledown/Readme.md b/cloudfunctions/scaledown/Readme.md index df16246..d38ef69 100644 --- a/cloudfunctions/scaledown/Readme.md +++ b/cloudfunctions/scaledown/Readme.md @@ -1,18 +1,15 @@ # GKE Scaler -Scales a node pool to 0 when it is inactive based on cluster metrics +Scales a node pool to 0 when it is inactive based on pod CPU metrics ## Requirements -a baseline of metrics (typical metrics when cluster is idle, cpu/mem) -cluster name -node pool name -desired scale up (1 for stateful services like games) +* You must gather a baseline of CPU metrics - it is expressed in CPU/s e.g `0.2` ## Env vars -"CLUSTER_NAME" -"PROJECT_ID" -"NODEPOOL_NAME" -"LOCATION" -CONTAINER_NAME -METRICS_BASELINE - This number should be a float which is the value when your server is idle based on the avg last 10 min. Use metrics explorer to find the cpu usage for an avg of 10m when no players are on. The upper bound should be the avg when 1 player is on. E.g "0.2" which means scale down the node pool to 0 when the pod CPU usage is 0.2 for last 10 min \ No newline at end of file +* CLUSTER_NAME +* PROJECT_ID +* NODEPOOL_NAME +* LOCATION +* CONTAINER_NAME +* METRICS_BASELINE - This number should be a float which is the value when your server is idle based on the avg last 10 min. Use metrics explorer to find the cpu usage for an avg of 10m when no players are on. The upper bound should be the avg when 1 player is on. E.g "0.2" which means scale down the node pool to 0 when the pod CPU usage is 0.2 for last 10 min \ No newline at end of file diff --git a/cloudfunctions/scaleup/Readme.md b/cloudfunctions/scaleup/Readme.md index a6670d8..ff0f4a2 100644 --- a/cloudfunctions/scaleup/Readme.md +++ b/cloudfunctions/scaleup/Readme.md @@ -2,11 +2,11 @@ Scales the cluster up based on invocation. -If invoked, and the cluster is at 0, it will scale it to 1. Could be event driven or HTTP based cloudfunction. +If invoked, and the cluster is at 0, it will scale it to 1. ## Env vars -"CLUSTER_NAME" -"PROJECT_ID" -"NODEPOOL_NAME" -"LOCATION" \ No newline at end of file +* CLUSTER_NAME +* PROJECT_ID +* NODEPOOL_NAME +* LOCATION \ No newline at end of file