From 2b07413b0da03fed6071bda5d3bc83e7eda0d664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Smolarek?= <34063647+Razz4780@users.noreply.github.com> Date: Tue, 8 Oct 2024 18:19:33 +0200 Subject: [PATCH] Configuring no target pods session timeout (#116) For https://github.com/metalbear-co/operator/pull/672 --- mirrord-operator/Chart.yaml | 2 +- mirrord-operator/templates/deployment.yaml | 4 ++++ mirrord-operator/values.yaml | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/mirrord-operator/Chart.yaml b/mirrord-operator/Chart.yaml index dc98490..09f1a30 100644 --- a/mirrord-operator/Chart.yaml +++ b/mirrord-operator/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.9.1 +version: 1.9.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/mirrord-operator/templates/deployment.yaml b/mirrord-operator/templates/deployment.yaml index 9f807fd..5b067ae 100644 --- a/mirrord-operator/templates/deployment.yaml +++ b/mirrord-operator/templates/deployment.yaml @@ -88,6 +88,10 @@ spec: - name: OPERATOR_AGENT_CONNECTION_TLS value: "true" {{- end }} + {{- if .Values.operator.noPodTargetsSessionTimeoutMillis }} + - name: OPERATOR_NO_POD_TARGETS_SESSION_TIMEOUT_MILLIS + value: {{ .Values.operator.noPodTargetsSessionTimeoutMillis | quote }} + {{- end }} envFrom: - secretRef: name: {{ .Values.license.file.secret }} diff --git a/mirrord-operator/values.yaml b/mirrord-operator/values.yaml index 7936719..e555e21 100644 --- a/mirrord-operator/values.yaml +++ b/mirrord-operator/values.yaml @@ -35,6 +35,9 @@ operator: ## Controls how long (in seconds) a session is allowed to live for. # maxSessionTimeSeconds: 3600 + ## Controls how long (in milliseconds) a session can live when there are no pods ready to be targeted. + # noPodTargetsSessionTimeoutMillis: 6000 + ## This should be enough for around 200~ concurrent sessions. limits: cpu: 200m