From 76c0d817997ed27ea0f8be335da07f5f17dc8a5a Mon Sep 17 00:00:00 2001 From: Catherine Fang Date: Mon, 6 May 2024 13:33:50 -0400 Subject: [PATCH] Add readiness and liveness probe --- .../deploy/production/adapter.yaml | 17 +++++++++++++++++ .../production/adapter_new_resource_model.yaml | 17 +++++++++++++++++ .../staging/adapter_new_resource_model.yaml | 17 +++++++++++++++++ .../staging/adapter_old_resource_model.yaml | 17 +++++++++++++++++ ...er_new_resource_model_with_core_metrics.yaml | 17 +++++++++++++++++ 5 files changed, 85 insertions(+) diff --git a/custom-metrics-stackdriver-adapter/deploy/production/adapter.yaml b/custom-metrics-stackdriver-adapter/deploy/production/adapter.yaml index 6cd04139f..79cb634b9 100644 --- a/custom-metrics-stackdriver-adapter/deploy/production/adapter.yaml +++ b/custom-metrics-stackdriver-adapter/deploy/production/adapter.yaml @@ -78,6 +78,23 @@ spec: command: - /adapter - --use-new-resource-model=false + - --secure-port=6443 + readinessProbe: + failureThreshold: 5 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /livez + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 resources: limits: cpu: 250m diff --git a/custom-metrics-stackdriver-adapter/deploy/production/adapter_new_resource_model.yaml b/custom-metrics-stackdriver-adapter/deploy/production/adapter_new_resource_model.yaml index a66442fbe..c00e25828 100644 --- a/custom-metrics-stackdriver-adapter/deploy/production/adapter_new_resource_model.yaml +++ b/custom-metrics-stackdriver-adapter/deploy/production/adapter_new_resource_model.yaml @@ -96,6 +96,23 @@ spec: - /adapter - --use-new-resource-model=true - --fallback-for-container-metrics=true + - --secure-port=6443 + readinessProbe: + failureThreshold: 5 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /livez + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 resources: limits: cpu: 250m diff --git a/custom-metrics-stackdriver-adapter/deploy/staging/adapter_new_resource_model.yaml b/custom-metrics-stackdriver-adapter/deploy/staging/adapter_new_resource_model.yaml index 208017ee5..688cba5b6 100644 --- a/custom-metrics-stackdriver-adapter/deploy/staging/adapter_new_resource_model.yaml +++ b/custom-metrics-stackdriver-adapter/deploy/staging/adapter_new_resource_model.yaml @@ -100,6 +100,23 @@ spec: - /adapter - --use-new-resource-model=true - --fallback-for-container-metrics=true + - --secure-port=6443 + readinessProbe: + failureThreshold: 5 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /livez + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 resources: limits: cpu: 250m diff --git a/custom-metrics-stackdriver-adapter/deploy/staging/adapter_old_resource_model.yaml b/custom-metrics-stackdriver-adapter/deploy/staging/adapter_old_resource_model.yaml index 03adacf75..4cb8a7a2b 100644 --- a/custom-metrics-stackdriver-adapter/deploy/staging/adapter_old_resource_model.yaml +++ b/custom-metrics-stackdriver-adapter/deploy/staging/adapter_old_resource_model.yaml @@ -82,6 +82,23 @@ spec: command: - /adapter - --use-new-resource-model=false + - --secure-port=6443 + readinessProbe: + failureThreshold: 5 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /livez + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 resources: limits: cpu: 250m diff --git a/custom-metrics-stackdriver-adapter/deploy/test/adapter_new_resource_model_with_core_metrics.yaml b/custom-metrics-stackdriver-adapter/deploy/test/adapter_new_resource_model_with_core_metrics.yaml index abd3c946a..f57c4ce73 100644 --- a/custom-metrics-stackdriver-adapter/deploy/test/adapter_new_resource_model_with_core_metrics.yaml +++ b/custom-metrics-stackdriver-adapter/deploy/test/adapter_new_resource_model_with_core_metrics.yaml @@ -100,6 +100,23 @@ spec: - /adapter - --use-new-resource-model=true - --enable-core-metrics-api + - --secure-port=6443 + readinessProbe: + failureThreshold: 5 + httpGet: + path: /readyz + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 + livenessProbe: + failureThreshold: 5 + httpGet: + path: /livez + port: https + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 5 resources: limits: cpu: 250m