From e2ecec9e5ac42767c11631f6755627c4dd39cb6c Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Thu, 3 Feb 2022 15:31:32 -0600 Subject: [PATCH 1/9] feat(cloud): update cloud-server chart --- charts/cloud-screenshot/templates/cloud-screenshot.yml | 2 +- charts/cloud-server/templates/secrets.yml | 1 + charts/cloud-server/values.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index da6c5b4..1764304 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -156,7 +156,7 @@ spec: readOnly: true subPath: nginx.conf -{{ range $index, $_ := until 10 }} +{{ range $_, $index := seq 10 }} {{ include "screenshot.container.worker" (dict "Values" $.Values "index" $index) }} {{ end }} diff --git a/charts/cloud-server/templates/secrets.yml b/charts/cloud-server/templates/secrets.yml index 9b98561..4b4355b 100644 --- a/charts/cloud-server/templates/secrets.yml +++ b/charts/cloud-server/templates/secrets.yml @@ -13,6 +13,7 @@ stringData: AUTH_SALT='{{ .Values.AUTH_SALT }}' CLOUD_SERVER_PATH='{{ .Values.INSTALL_PATH }}' CLOUD_SERVER_REPO_URL='{{ .Values.CLOUD_SERVER_REPO_URL }}' + COOKIE_SALT='{{ .Values.COOKIE_SALT }}' DB_HOST_0='{{ .Values.DB_HOST_0 }}' DB_HOST_1='{{ .Values.DB_HOST_1 }}' DB_HOST_2='{{ .Values.DB_HOST_2 }}' diff --git a/charts/cloud-server/values.yaml b/charts/cloud-server/values.yaml index fe06f6a..5b4424a 100644 --- a/charts/cloud-server/values.yaml +++ b/charts/cloud-server/values.yaml @@ -8,6 +8,7 @@ AUTH_SALT: CLOUD_SERVER_IMAGE: CLOUD_SERVER_REPO_URL: CLOUD_SERVER_VERSION: +COOKIE_SALT: DB_HOST_0: DB_HOST_1: From 6be12f42617b66a9ab1219aabd38b7ba653c7d40 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Thu, 3 Feb 2022 15:33:14 -0600 Subject: [PATCH 2/9] feat(cloud): :doh: --- charts/cloud-server/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloud-server/Chart.yaml b/charts/cloud-server/Chart.yaml index e08dd44..4d5cc61 100644 --- a/charts/cloud-server/Chart.yaml +++ b/charts/cloud-server/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-server -version: 0.9.1 +version: 0.9.2 From 756af315b0a49b1b05fbf3e904b9ac3143c5218d Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Thu, 3 Feb 2022 15:53:11 -0600 Subject: [PATCH 3/9] feat(cloud): :rolling_eyes: --- charts/cloud-screenshot/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index efafb25..42324b5 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.8 +version: 0.9.9 From 9e8f6b0e84e6cddc1085e033f83652767b0e7976 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Fri, 4 Feb 2022 14:21:10 -0600 Subject: [PATCH 4/9] feat(cloud): update cloud-screenshot chart Reduce number of workers to test performance which seems to be degraded with 10 workers. build: [release] --- charts/cloud-screenshot/Chart.yaml | 2 +- charts/cloud-screenshot/templates/cloud-screenshot.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index 42324b5..e537162 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.9 +version: 0.9.10 diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index 1764304..fda100f 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -156,7 +156,7 @@ spec: readOnly: true subPath: nginx.conf -{{ range $_, $index := seq 10 }} +{{ range $_, $index := seq 5 }} {{ include "screenshot.container.worker" (dict "Values" $.Values "index" $index) }} {{ end }} From bf6620852f251e030606f61f2f5d813bffe3460f Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Fri, 4 Feb 2022 14:32:09 -0600 Subject: [PATCH 5/9] feat(cloud): update cloud-screenshot chart Fix incorrect template function usage. --- charts/cloud-screenshot/Chart.yaml | 2 +- charts/cloud-screenshot/templates/cloud-screenshot.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index e537162..4f2e3a6 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.10 +version: 0.9.11 diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index fda100f..0160fc2 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -156,7 +156,7 @@ spec: readOnly: true subPath: nginx.conf -{{ range $_, $index := seq 5 }} +{{ range $_, $index := untilStep 1 5 1 }} {{ include "screenshot.container.worker" (dict "Values" $.Values "index" $index) }} {{ end }} From f9aa3fcc901627904fb223ff390e9694e223f01f Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Tue, 8 Feb 2022 14:50:28 -0600 Subject: [PATCH 6/9] feat(cloud): update cloud-screenshot chart --- charts/cloud-screenshot/Chart.yaml | 2 +- charts/cloud-screenshot/templates/cloud-screenshot.yml | 2 +- charts/cloud-screenshot/values.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index 4f2e3a6..eb50828 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.11 +version: 0.9.12 diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index 0160fc2..5e5b303 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -156,7 +156,7 @@ spec: readOnly: true subPath: nginx.conf -{{ range $_, $index := untilStep 1 5 1 }} +{{ range $_, $index := untilStep 1 (int .Values.CLOUD_SCREENSHOT_WORKERS) 1 }} {{ include "screenshot.container.worker" (dict "Values" $.Values "index" $index) }} {{ end }} diff --git a/charts/cloud-screenshot/values.yaml b/charts/cloud-screenshot/values.yaml index 1f35373..9c7f135 100644 --- a/charts/cloud-screenshot/values.yaml +++ b/charts/cloud-screenshot/values.yaml @@ -8,6 +8,7 @@ AUTH_SALT: CLOUD_SCREENSHOT_IMAGE: CLOUD_SCREENSHOT_REPO_URL: CLOUD_SCREENSHOT_VERSION: +CLOUD_SCREENSHOT_WORKERS: DB_HOST_0: DB_HOST_1: From eb656fe102c059e71e3f4ba0e402ddb16959dccb Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Tue, 8 Feb 2022 16:50:24 -0600 Subject: [PATCH 7/9] feat(cloud): add support for running multi-pod/multi-node --- charts/cloud-screenshot/Chart.yaml | 2 +- charts/cloud-screenshot/templates/cloud-screenshot.yml | 6 +++++- charts/cloud-screenshot/values.yaml | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index eb50828..6fc6631 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.12 +version: 0.9.13 diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index 5e5b303..7d3a07f 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -20,7 +20,11 @@ metadata: labels: app: cloud-screenshot spec: - replicas: 1 + replicas: {{ .Values.REPLICAS }} + strategy: + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 selector: matchLabels: app: cloud-screenshot diff --git a/charts/cloud-screenshot/values.yaml b/charts/cloud-screenshot/values.yaml index 9c7f135..2323255 100644 --- a/charts/cloud-screenshot/values.yaml +++ b/charts/cloud-screenshot/values.yaml @@ -27,6 +27,8 @@ LOGGED_IN_SALT: NONCE_KEY: NONCE_SALT: +REPLICAS: + S3_BUCKET_CLOUD_ITEMS: S3_BUCKET_CLOUD_ITEMS_BACKUP_1: S3_BUCKET_CLOUD_ITEMS_BACKUP_2: From 75835067ecde1bd6d083f0eb0e54efd023f101cf Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Tue, 8 Feb 2022 16:59:31 -0600 Subject: [PATCH 8/9] feat(cloud): add missing antiAffinity rule to cloud screenshot chart. --- charts/cloud-screenshot/Chart.yaml | 2 +- charts/cloud-screenshot/templates/cloud-screenshot.yml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index 6fc6631..0b2766d 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.13 +version: 0.9.14 diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index 7d3a07f..29c0977 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -34,6 +34,16 @@ spec: app: cloud-screenshot redis-cluster-client: 'true' spec: + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - cloud-screenshot + topologyKey: kubernetes.io/hostname initContainers: - name: init env: From 49d270123018e10006e0ad89f7e276ab99ed13b2 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Thu, 10 Feb 2022 14:23:38 -0600 Subject: [PATCH 9/9] feat(cloud): update cloud-screenshot chart Add a host alias for the screenshot apps address so that request to the app from itself will be routed to the instance making the request and not to an instance on another node. --- charts/cloud-screenshot/Chart.yaml | 2 +- charts/cloud-screenshot/templates/cloud-screenshot.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/cloud-screenshot/Chart.yaml b/charts/cloud-screenshot/Chart.yaml index 0b2766d..60745be 100644 --- a/charts/cloud-screenshot/Chart.yaml +++ b/charts/cloud-screenshot/Chart.yaml @@ -5,4 +5,4 @@ maintainers: - email: dustin@elegantthemes.com name: Elegant Themes name: cloud-screenshot -version: 0.9.14 +version: 0.9.15 diff --git a/charts/cloud-screenshot/templates/cloud-screenshot.yml b/charts/cloud-screenshot/templates/cloud-screenshot.yml index 29c0977..52b59b6 100644 --- a/charts/cloud-screenshot/templates/cloud-screenshot.yml +++ b/charts/cloud-screenshot/templates/cloud-screenshot.yml @@ -44,6 +44,10 @@ spec: values: - cloud-screenshot topologyKey: kubernetes.io/hostname + hostAliases: + - ip: '127.0.0.1' + hostnames: + - 'cloud-screenshot.dc-screenshot.svc.cluster.local' initContainers: - name: init env: