From 5c581775a5b8217a8fad21b64204117eb90576df Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Mon, 1 Jan 2024 07:53:36 +0100 Subject: [PATCH] Remove Homepage Revalidation Temporarily --- app/page.tsx | 2 +- kubernetes/config.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 kubernetes/config.yaml diff --git a/app/page.tsx b/app/page.tsx index d56e30a..5b8ef31 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,7 +3,7 @@ import HomepageComponent from "./(components)/HomepageComponent"; const datasquirel = require("datasquirel"); -export const revalidate = 3600; +// export const revalidate = 3600; type DsqlResponse = { success: boolean; diff --git a/kubernetes/config.yaml b/kubernetes/config.yaml new file mode 100644 index 0000000..e9e072e --- /dev/null +++ b/kubernetes/config.yaml @@ -0,0 +1,46 @@ +--- +apiVersion: "v1" +kind: "Namespace" +metadata: + name: "tben" +--- +apiVersion: "apps/v1" +kind: "Deployment" +metadata: + name: "tben-me-personal-site" + namespace: "tben" + labels: + app: "tben-me-personal-site" +spec: + replicas: 3 + selector: + matchLabels: + app: "tben-me-personal-site" + template: + metadata: + labels: + app: "tben-me-personal-site" + spec: + containers: + - name: "tben-me-1" + image: "us-central1-docker.pkg.dev/unique-yew-406206/tben-docker-repo-gcp/tben-me" +--- +apiVersion: "autoscaling/v2beta1" +kind: "HorizontalPodAutoscaler" +metadata: + name: "tben-me-personal-site-hpa-cvjy" + namespace: "tben" + labels: + app: "tben-me-personal-site" +spec: + scaleTargetRef: + kind: "Deployment" + name: "tben-me-personal-site" + apiVersion: "apps/v1" + minReplicas: 1 + maxReplicas: 5 + metrics: + - type: "Resource" + resource: + name: "cpu" + targetAverageUtilization: 80