From 01c237023dd99ba9f788fe45d3222a2694067ff2 Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 21 Apr 2021 09:36:44 +0900 Subject: [PATCH 1/4] Add prestop for graceful shutdown --- charts/scalardl/templates/envoy/deployment.yaml | 4 ++++ charts/scalardl/templates/ledger/deployment.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/scalardl/templates/envoy/deployment.yaml b/charts/scalardl/templates/envoy/deployment.yaml index bf0a72e8..d01ef001 100644 --- a/charts/scalardl/templates/envoy/deployment.yaml +++ b/charts/scalardl/templates/envoy/deployment.yaml @@ -51,6 +51,10 @@ spec: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "sleep 30"] resources: {{- toYaml .Values.envoy.resources | nindent 12 }} {{- with .Values.envoy.nodeSelector }} diff --git a/charts/scalardl/templates/ledger/deployment.yaml b/charts/scalardl/templates/ledger/deployment.yaml index 56f3cbb0..35e42449 100644 --- a/charts/scalardl/templates/ledger/deployment.yaml +++ b/charts/scalardl/templates/ledger/deployment.yaml @@ -74,6 +74,10 @@ spec: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "sleep 30"] resources: {{- toYaml .Values.ledger.resources | nindent 12 }} {{- with .Values.ledger.nodeSelector }} From e7dbcb261bf6a5f650655fa9e1a1433b59c44348 Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 21 Apr 2021 15:04:08 +0900 Subject: [PATCH 2/4] Add helthcheck for envoy --- charts/scalardl/templates/envoy/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/scalardl/templates/envoy/deployment.yaml b/charts/scalardl/templates/envoy/deployment.yaml index d01ef001..397b4822 100644 --- a/charts/scalardl/templates/envoy/deployment.yaml +++ b/charts/scalardl/templates/envoy/deployment.yaml @@ -54,7 +54,7 @@ spec: lifecycle: preStop: exec: - command: ["/bin/sh", "-c", "sleep 30"] + command: ["/bin/sh", "-c", "curl -sX POST 127.0.0.1:9001/healthcheck/fail; sleep 30"] resources: {{- toYaml .Values.envoy.resources | nindent 12 }} {{- with .Values.envoy.nodeSelector }} From 0ae6742b55e045fcbad0b5fce72490f343e0d54b Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 21 Apr 2021 15:31:06 +0900 Subject: [PATCH 3/4] Update scalar-envoy image --- charts/scalardl/Chart.yaml | 2 +- charts/scalardl/README.md | 4 ++-- charts/scalardl/values.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/scalardl/Chart.yaml b/charts/scalardl/Chart.yaml index f0820bbf..f92f8a93 100644 --- a/charts/scalardl/Chart.yaml +++ b/charts/scalardl/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: scalardl description: Implementation scalardl. type: application -version: 1.2.2 +version: 1.2.3 appVersion: 2.1.0 deprecated: false icon: https://scalar-labs.com/wp-content/themes/scalar/assets/img/logo_scalar.svg diff --git a/charts/scalardl/README.md b/charts/scalardl/README.md index 18f2755e..537afafe 100644 --- a/charts/scalardl/README.md +++ b/charts/scalardl/README.md @@ -1,7 +1,7 @@ # scalardl Implementation scalardl. -Current chart version is `1.2.2` +Current chart version is `1.2.3` ## Values @@ -11,7 +11,7 @@ Current chart version is `1.2.2` | envoy.envoyConfiguration.adminAccessLogPath | string | `"/dev/stdout"` | admin log path | | envoy.image.pullPolicy | string | `"IfNotPresent"` | Specify a imagePullPolicy | | envoy.image.repository | string | `"ghcr.io/scalar-labs/scalar-envoy"` | Docker image | -| envoy.image.version | string | `"1.0.0"` | | +| envoy.image.version | string | `"1.0.1"` | | | envoy.imagePullSecrets | list | `[]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. | | envoy.nodeSelector | object | `{}` | nodeSelector is form of node selection constraint | | envoy.podSecurityContext | object | `{}` | PodSecurityContext holds pod-level security attributes and common container settings | diff --git a/charts/scalardl/values.yaml b/charts/scalardl/values.yaml index 96a5ee9e..4c51c398 100644 --- a/charts/scalardl/values.yaml +++ b/charts/scalardl/values.yaml @@ -20,7 +20,7 @@ envoy: # envoy.image.repository -- Docker image repository: ghcr.io/scalar-labs/scalar-envoy # envoy.image.tag -- Docker tag - version: 1.0.0 + version: 1.0.1 # envoy.image.pullPolicy -- Specify a imagePullPolicy pullPolicy: IfNotPresent From fc9467fa75092e426b56ca3dd6e34e7cec237960 Mon Sep 17 00:00:00 2001 From: tei-k Date: Thu, 22 Apr 2021 11:44:40 +0900 Subject: [PATCH 4/4] Delete lifecycle from ledger template --- charts/scalardl/templates/ledger/deployment.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/charts/scalardl/templates/ledger/deployment.yaml b/charts/scalardl/templates/ledger/deployment.yaml index 35e42449..56f3cbb0 100644 --- a/charts/scalardl/templates/ledger/deployment.yaml +++ b/charts/scalardl/templates/ledger/deployment.yaml @@ -74,10 +74,6 @@ spec: periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 - lifecycle: - preStop: - exec: - command: ["/bin/sh", "-c", "sleep 30"] resources: {{- toYaml .Values.ledger.resources | nindent 12 }} {{- with .Values.ledger.nodeSelector }}