This repository has been archived by the owner on Jun 22, 2024. It is now read-only.
forked from SeleniumHQ/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(chart): job to patch scaledobject stuck in deleting (SeleniumHQ#2222
) Signed-off-by: Viet Nguyen Duc <[email protected]>
- Loading branch information
Showing
16 changed files
with
157 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{- if eq (include "seleniumGrid.useKEDA" $) "true" }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} | ||
namespace: {{ .Release.Namespace }} | ||
annotations: | ||
"helm.sh/hook-delete-policy": hook-succeeded | ||
"helm.sh/resource-policy": delete | ||
{{- with $.Values.autoscaling.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
deploymentName: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} | ||
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }} | ||
{{- with $.Values.customLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
template: | ||
metadata: | ||
name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} | ||
spec: | ||
activeDeadlineSeconds: 120 | ||
serviceAccountName: {{ template "seleniumGrid.serviceAccount.fullname" $ }} | ||
serviceAccount: {{ template "seleniumGrid.serviceAccount.fullname" $ }} | ||
containers: | ||
- name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }} | ||
image: {{ $.Values.global.seleniumGrid.kubectlImage }} | ||
command: | ||
- "bin/bash" | ||
- "-c" | ||
- "kubectl get ScaledObjects,ScaledJobs -n {{ .Release.Namespace }} -l component.autoscaling=true -o=json | jq '.metadata.finalizers = null' | kubectl apply -f -" | ||
restartPolicy: Never | ||
{{- end }} |
20 changes: 20 additions & 0 deletions
20
charts/selenium-grid/templates/patch-keda/patch-keda-rb.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- if eq (include "seleniumGrid.useKEDA" $) "true" }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ template "seleniumGrid.keda.roleBinding.fullname" $ }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
deploymentName: {{ template "seleniumGrid.keda.roleBinding.fullname" $ }} | ||
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }} | ||
{{- with $.Values.customLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "seleniumGrid.serviceAccount.fullname" $ }} | ||
roleRef: | ||
kind: Role | ||
name: {{ template "seleniumGrid.keda.role.fullname" $ }} | ||
apiGroup: rbac.authorization.k8s.io | ||
{{- end }} |
37 changes: 37 additions & 0 deletions
37
charts/selenium-grid/templates/patch-keda/patch-keda-role.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{{- if eq (include "seleniumGrid.useKEDA" $) "true" }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ template "seleniumGrid.keda.role.fullname" $ }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
deploymentName: {{ template "seleniumGrid.keda.role.fullname" $ }} | ||
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }} | ||
{{- with $.Values.customLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
rules: | ||
- apiGroups: | ||
- keda.sh | ||
resources: | ||
- scaledjobs | ||
- scaledjobs/finalizers | ||
- scaledjobs/status | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- keda.sh | ||
resources: | ||
- scaledobjects | ||
- scaledobjects/finalizers | ||
- scaledobjects/status | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- keda.sh | ||
resources: | ||
- triggerauthentications | ||
- triggerauthentications/status | ||
verbs: | ||
- '*' | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters