diff --git a/charts/selenium-grid/CONFIGURATION.md b/charts/selenium-grid/CONFIGURATION.md index 58e184875..6c84818c8 100644 --- a/charts/selenium-grid/CONFIGURATION.md +++ b/charts/selenium-grid/CONFIGURATION.md @@ -301,6 +301,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes | autoscaling.enableWithExistingKEDA | bool | `false` | Enable autoscaling without automatically installing KEDA | | autoscaling.scalingType | string | `"job"` | Which type of KEDA scaling to use: job or deployment | | autoscaling.annotations | object | `{"helm.sh/hook":"post-install,post-upgrade,post-rollback","helm.sh/hook-weight":"1"}` | Annotations for KEDA resources: ScaledObject and ScaledJob | +| autoscaling.patchObjectFinalizers.nameOverride | string | `nil` | Override the name of the patch job | | autoscaling.patchObjectFinalizers.enabled | bool | `true` | Enable patching finalizers for KEDA scaled resources. Workaround for Hook post-upgrade selenium-grid/templates/x-node-hpa.yaml failed: object is being deleted: scaledobjects.keda.sh "x" already exists | | autoscaling.patchObjectFinalizers.activeDeadlineSeconds | int | `120` | Deadline (in seconds) for patch job to complete | | autoscaling.patchObjectFinalizers.annotations | object | `{"helm.sh/hook":"post-install,post-upgrade,post-rollback,pre-delete","helm.sh/hook-delete-policy":"hook-succeeded,before-hook-creation","helm.sh/hook-weight":"-1"}` | Annotations for patch job | diff --git a/charts/selenium-grid/templates/_nameHelpers.tpl b/charts/selenium-grid/templates/_nameHelpers.tpl index fd9916a9a..6778381d1 100644 --- a/charts/selenium-grid/templates/_nameHelpers.tpl +++ b/charts/selenium-grid/templates/_nameHelpers.tpl @@ -52,7 +52,7 @@ component.autoscaling: "{{ .Release.Name }}" {{- if eq $root.Release.Name "selenium" }} {{- $component | trunc 63 | trimSuffix "-" -}} {{- else -}} -{{- printf "%s-%s" $root.Release.Name $component | trunc 63 | trimSuffix "-" -}} +{{- printf "%s-%s" $root.Release.Name $component | replace "." "" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{- end -}} @@ -74,7 +74,7 @@ Event bus fullname Event bus ConfigMap fullname */}} {{- define "seleniumGrid.eventBus.configmap.fullname" -}} -{{- tpl (default (include "seleniumGrid.eventBus.fullname" $) .Values.busConfigMap.nameOverride) $ | trunc 63 | trimSuffix "-" -}} +{{- tpl (default (include "seleniumGrid.component.name" (list "selenium-event-bus-config" $)) .Values.busConfigMap.nameOverride) $ | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* @@ -207,7 +207,7 @@ Server ConfigMap fullname Patch scaledObjects finalizers job fullname */}} {{- define "seleniumGrid.keda.patchObjectsJob.fullname" -}} -{{- tpl (include "seleniumGrid.component.name" (list "selenium-patch-scaledobjects-finalizers" $)) $ | trunc 63 | trimSuffix "-" -}} +{{- tpl ( default (include "seleniumGrid.component.name" (list "selenium-patch-scaledobjects-finalizers" $)) .Values.autoscaling.patchObjectFinalizers.nameOverride) $ | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 656cbbcfe..dbcfcd891 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -785,6 +785,8 @@ autoscaling: "helm.sh/hook": post-install,post-upgrade,post-rollback "helm.sh/hook-weight": "1" patchObjectFinalizers: + # -- Override the name of the patch job + nameOverride: # -- Enable patching finalizers for KEDA scaled resources. Workaround for Hook post-upgrade selenium-grid/templates/x-node-hpa.yaml failed: object is being deleted: scaledobjects.keda.sh "x" already exists enabled: true # -- Deadline (in seconds) for patch job to complete