diff --git a/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml b/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml index 927377adc..ba5208956 100644 --- a/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml +++ b/charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml @@ -1,4 +1,4 @@ -{{- if $.Values.autoscaling.patchObjectFinalizers.enabled }} +{{- if and (eq (include "seleniumGrid.useKEDA" $) "true") $.Values.autoscaling.patchObjectFinalizers.enabled }} apiVersion: batch/v1 kind: Job metadata: diff --git a/charts/selenium-grid/templates/rbac-role.yaml b/charts/selenium-grid/templates/patch-keda/rbac-role.yaml similarity index 84% rename from charts/selenium-grid/templates/rbac-role.yaml rename to charts/selenium-grid/templates/patch-keda/rbac-role.yaml index 9b264079a..40da4db5c 100644 --- a/charts/selenium-grid/templates/rbac-role.yaml +++ b/charts/selenium-grid/templates/patch-keda/rbac-role.yaml @@ -1,4 +1,4 @@ -{{- if $.Values.rbacRole.create }} +{{- if and (eq (include "seleniumGrid.useKEDA" $) "true") $.Values.autoscaling.patchObjectFinalizers.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: diff --git a/charts/selenium-grid/templates/rbac-rolebinding.yaml b/charts/selenium-grid/templates/patch-keda/rbac-rolebinding.yaml similarity index 88% rename from charts/selenium-grid/templates/rbac-rolebinding.yaml rename to charts/selenium-grid/templates/patch-keda/rbac-rolebinding.yaml index 487eb8341..e9d1d3321 100644 --- a/charts/selenium-grid/templates/rbac-rolebinding.yaml +++ b/charts/selenium-grid/templates/patch-keda/rbac-rolebinding.yaml @@ -1,4 +1,4 @@ -{{- if $.Values.rbacRoleBinding.create }} +{{- if and (eq (include "seleniumGrid.useKEDA" $) "true") $.Values.autoscaling.patchObjectFinalizers.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index 0e4d1d9a9..aa9c2cdc9 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -74,7 +74,6 @@ serviceAccount: # RBAC settings rbacRole: - create: true # nameOverride: annotations: {} rules: @@ -95,7 +94,6 @@ rbacRole: verbs: [get, list, patch, update, delete] rbacRoleBinding: - create: true # nameOverride: annotations: {} roleRef: