Skip to content

Commit 7727b6d

Browse files
authored
K8s: Use KEDA patch image tag for scaler implementation preview (#2477)
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent bea0769 commit 7727b6d

File tree

6 files changed

+33
-14
lines changed

6 files changed

+33
-14
lines changed

Diff for: .keda/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ You can involve to review and discuss the pull requests to help us early detect
4949

5050
[kedacore/keda](https://github.com/kedacore/keda)
5151

52-
- https://github.com/kedacore/keda/pull/6169
52+
- https://github.com/kedacore/keda/pull/6368
53+
54+
~~- https://github.com/kedacore/keda/pull/6169 (merged, v2.16.0)~~
5355

5456
[kedacore/keda-docs](https://github.com/kedacore/keda-docs)
5557

56-
- https://github.com/kedacore/keda-docs/pull/1468
58+
- https://github.com/kedacore/keda-docs/pull/1504
59+
60+
~~- https://github.com/kedacore/keda-docs/pull/1468 (merged, v2.16.0)~~
5761

5862
# Resources
5963

Diff for: Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ PLATFORMS := $(or $(PLATFORMS),$(shell echo $$PLATFORMS),$(CURRENT_PLATFORM))
2626
SEL_PASSWD := $(or $(SEL_PASSWD),$(SEL_PASSWD),secret)
2727
CHROMIUM_VERSION := $(or $(CHROMIUM_VERSION),$(CHROMIUM_VERSION),latest)
2828
SBOM_OUTPUT := $(or $(SBOM_OUTPUT),$(SBOM_OUTPUT),package_versions.txt)
29-
KEDA_TAG_PREV_VERSION := $(or $(KEDA_TAG_PREV_VERSION),$(KEDA_TAG_PREV_VERSION),2.16.0-selenium-grid)
29+
KEDA_TAG_PREV_VERSION := $(or $(KEDA_TAG_PREV_VERSION),$(KEDA_TAG_PREV_VERSION),2.15.1-selenium-grid)
3030
KEDA_TAG_VERSION := $(or $(KEDA_TAG_VERSION),$(KEDA_TAG_VERSION),2.16.0-selenium-grid)
3131
KEDA_BASED_NAME := $(or $(KEDA_BASED_NAME),$(KEDA_BASED_NAME),ndviet)
32-
KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.16.0-selenium-grid)
32+
KEDA_BASED_TAG := $(or $(KEDA_BASED_TAG),$(KEDA_BASED_TAG),2.16.0-selenium-grid-20241127)
3333

3434
all: hub \
3535
distributor \
@@ -352,7 +352,7 @@ tag_latest:
352352
docker tag $(NAME)/standalone-docker:$(TAG_VERSION) $(NAME)/standalone-docker:latest
353353
docker tag $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) $(NAME)/video:latest
354354

355-
release_latest:
355+
release_latest: release_grid_scaler_latest
356356
docker push $(NAME)/base:latest
357357
docker push $(NAME)/hub:latest
358358
docker push $(NAME)/distributor:latest
@@ -397,7 +397,7 @@ tag_nightly:
397397
docker tag $(NAME)/standalone-docker:$(TAG_VERSION) $(NAME)/standalone-docker:nightly
398398
docker tag $(NAME)/video:$(FFMPEG_TAG_VERSION)-$(BUILD_DATE) $(NAME)/video:nightly
399399

400-
release_nightly:
400+
release_nightly: release_grid_scaler_nightly
401401
docker push $(NAME)/base:nightly
402402
docker push $(NAME)/hub:nightly
403403
docker push $(NAME)/distributor:nightly
@@ -477,7 +477,7 @@ tag_major_minor:
477477
docker tag $(NAME)/standalone-firefox:$(TAG_VERSION) $(NAME)/standalone-firefox:$(MAJOR_MINOR_PATCH)
478478
docker tag $(NAME)/standalone-docker:$(TAG_VERSION) $(NAME)/standalone-docker:$(MAJOR_MINOR_PATCH)
479479

480-
release: tag_major_minor
480+
release: tag_major_minor release_grid_scaler
481481
@if ! docker images $(NAME)/base | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/base version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi
482482
@if ! docker images $(NAME)/hub | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/hub version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi
483483
@if ! docker images $(NAME)/distributor | awk '{ print $$2 }' | grep -q -F $(TAG_VERSION); then echo "$(NAME)/distributor version $(TAG_VERSION) is not yet built. Please run 'make build'"; false; fi

Diff for: charts/selenium-grid/CONFIGURATION.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
327327
| autoscaling.enableWithExistingKEDA | bool | `false` | Enable autoscaling without automatically installing KEDA |
328328
| autoscaling.scalingType | string | `"job"` | Which type of KEDA scaling to use: job or deployment |
329329
| autoscaling.authenticationRef | object | `{"annotations":{"helm.sh/hook":"post-install,post-upgrade,post-rollback","helm.sh/hook-weight":"0"},"name":""}` | Specify an external KEDA TriggerAuthentication resource is used for scaler triggers config. Apply for all browser nodes |
330-
| autoscaling.useCachedMetrics | bool | `false` | Enables caching of metric values during polling interval (as specified in .spec.pollingInterval). |
331-
| autoscaling.metricType | string | `"Value"` | The type of metric that should be used (Override the default: AverageValue in KEDA) |
330+
| autoscaling.useCachedMetrics | bool | `false` | Enables caching of metric values during polling interval (as specified in .spec.pollingInterval, the default: false in KEDA). |
331+
| autoscaling.metricType | string | `""` | The type of metric that should be used (The default: AverageValue in KEDA) |
332332
| autoscaling.annotations | object | `{"helm.sh/hook":"post-install,post-upgrade,post-rollback","helm.sh/hook-weight":"1"}` | Annotations for KEDA resources: ScaledObject and ScaledJob |
333333
| autoscaling.patchObjectFinalizers.nameOverride | string | `nil` | Override the name of the patch job |
334334
| 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 |
@@ -583,6 +583,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
583583
| videoRecorder.extraVolumes | list | `[]` | Extra volumes for video recorder pod |
584584
| videoRecorder.s3 | object | `{"args":[],"command":[],"extraEnvironmentVariables":null,"imageName":"aws-cli","imagePullPolicy":"IfNotPresent","imageRegistry":"bitnami","imageTag":"latest","securityContext":{"runAsUser":0}}` | Container spec for the uploader if above it is defined as "uploader.name: s3" |
585585
| customLabels | object | `{}` | Custom labels for k8s resources |
586+
| keda.image | object | `{"keda":{"registry":"selenium","repository":"keda","tag":"2.15.1-selenium-grid-20241101"},"metricsApiServer":{"registry":"selenium","repository":"keda-metrics-apiserver","tag":"2.15.1-selenium-grid-20241101"},"webhooks":{"registry":"selenium","repository":"keda-admission-webhooks","tag":"2.15.1-selenium-grid-20241101"}}` | Specify image for KEDA components |
586587
| keda.additionalAnnotations | string | `nil` | Annotations for KEDA resources |
587588
| keda.http.timeout | int | `60000` | |
588589
| keda.webhooks | object | `{"enabled":false}` | Enable KEDA admission webhooks component |

Diff for: charts/selenium-grid/templates/_helpers.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ triggers:
249249
authenticationRef:
250250
name: {{ template "seleniumGrid.autoscaling.authenticationRef.fullname" $ }}
251251
useCachedMetrics: {{ $.Values.autoscaling.useCachedMetrics }}
252-
{{- if eq $.Values.autoscaling.scalingType "deployment" }}
252+
{{- if and (eq $.Values.autoscaling.scalingType "deployment") $.Values.autoscaling.metricType }}
253253
metricType: {{ $.Values.autoscaling.metricType }}
254254
{{- end }}
255255
{{- end }}

Diff for: charts/selenium-grid/values.yaml

+17-3
Original file line numberDiff line numberDiff line change
@@ -838,10 +838,10 @@ autoscaling:
838838
# TriggerAuthentication is used by ScaledObject/ScaledJob, hence weight should be less than those hooks
839839
"helm.sh/hook-weight": "0"
840840
# Configuration for ScaledObject triggers https://keda.sh/docs/latest/reference/scaledobject-spec/#triggers
841-
# -- Enables caching of metric values during polling interval (as specified in .spec.pollingInterval).
841+
# -- Enables caching of metric values during polling interval (as specified in .spec.pollingInterval, the default: false in KEDA).
842842
useCachedMetrics: false
843-
# -- The type of metric that should be used (Override the default: AverageValue in KEDA)
844-
metricType: Value
843+
# -- The type of metric that should be used (The default: AverageValue in KEDA)
844+
metricType: ""
845845
# -- Annotations for KEDA resources: ScaledObject and ScaledJob
846846
annotations:
847847
"helm.sh/hook": post-install,post-upgrade,post-rollback
@@ -1794,6 +1794,20 @@ customLabels: {}
17941794
# Configuration for dependency chart keda
17951795
keda:
17961796
# enabled: false
1797+
# -- Specify image for KEDA components
1798+
image:
1799+
keda:
1800+
registry: selenium
1801+
repository: keda
1802+
tag: "2.15.1-selenium-grid-20241101"
1803+
metricsApiServer:
1804+
registry: selenium
1805+
repository: keda-metrics-apiserver
1806+
tag: "2.15.1-selenium-grid-20241101"
1807+
webhooks:
1808+
registry: selenium
1809+
repository: keda-admission-webhooks
1810+
tag: "2.15.1-selenium-grid-20241101"
17971811
# -- Annotations for KEDA resources
17981812
additionalAnnotations:
17991813
http:

Diff for: tests/charts/make/chart_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ MAX_SESSIONS_CHROME=${MAX_SESSIONS_CHROME:-"1"}
5555
MAX_SESSIONS_FIREFOX=${MAX_SESSIONS_FIREFOX:-"1"}
5656
MAX_SESSIONS_EDGE=${MAX_SESSIONS_EDGE:-"1"}
5757
TEST_NAME_OVERRIDE=${TEST_NAME_OVERRIDE:-"false"}
58-
TEST_PATCHED_KEDA=${TEST_PATCHED_KEDA:-"false"}
58+
TEST_PATCHED_KEDA=${TEST_PATCHED_KEDA:-"true"}
5959
BASIC_AUTH_EMBEDDED_URL=${BASIC_AUTH_EMBEDDED_URL:-"false"}
6060
SELENIUM_GRID_MONITORING=${SELENIUM_GRID_MONITORING:-"true"}
6161
TEST_EXISTING_PTS=${TEST_EXISTING_PTS:-"false"}

0 commit comments

Comments
 (0)