Skip to content

Commit

Permalink
chart(breaking change): rollback config ingress.enabled to create i…
Browse files Browse the repository at this point in the history
…ngress resource only

Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Aug 29, 2024
1 parent 4e00e3e commit 24d5ae6
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 22 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ jobs:
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 120
max_attempts: 5
retry_wait_seconds: 300
continue_on_error: true
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release
- name: Tag images as latest
if: github.event.inputs.skip-build-push-image != 'true'
Expand All @@ -144,16 +145,18 @@ jobs:
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 120
max_attempts: 5
retry_wait_seconds: 300
continue_on_error: true
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} make release_latest
- name: Tag browser images
if: github.event.inputs.skip-build-push-image != 'true'
uses: nick-invision/retry@master
with:
timeout_minutes: 20
max_attempts: 3
retry_wait_seconds: 120
max_attempts: 5
retry_wait_seconds: 300
continue_on_error: true
command: VERSION="${GRID_VERSION}" BUILD_DATE=${BUILD_DATE} PUSH_IMAGE=true make tag_and_push_browser_images
- name: Delete previous nightly tag & release if any
uses: dev-drprasad/delete-tag-and-release@master
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- repository: https://kubernetes.github.io/ingress-nginx
version: 4.11.2
name: ingress-nginx
condition: ingress.enabled, ingress-nginx.enabled
condition: ingress.enableWithController, ingress-nginx.enabled
- repository: https://jaegertracing.github.io/helm-charts
version: 3.2.0
name: jaeger
Expand Down
12 changes: 5 additions & 7 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ Below is an example of Grid UI accessible via NodePort with secure connection, a

```bash
helm upgrade -i $RELEASENAME -n $NAMESPACE docker-selenium/selenium-grid \
--set ingress.enableWithExistingController=false \
--set ingress.enabled=false \
--set isolateComponents=true \
--set components.router.serviceType=NodePort \
--set tls.enabled=true \
Expand Down Expand Up @@ -786,14 +786,12 @@ For example, below is the config with using external TLS Secret for the Ingress

```yaml
ingress:
enableWithController: true
hostname: selenium-grid.prod.domain.com
tls:
- secretName: my-external-tls-secret
hosts:
- selenium-grid.prod.domain.com
ingress-ngnix:
enabled: true
```

In case the Ingress resource is configured without `hostname` and `tls`, the incoming traffic access via `global.K8S_PUBLIC_IP`. When sub-chart `ingress-nginx` is enabled (deploy Ingress NGINX Controller together), the default TLS secret can also be assigned via `ingress-nginx.controller.extraArgs.default-ssl-certificate`.
Expand All @@ -802,7 +800,7 @@ For example (replace `$RELEASENAME` and `$NAMESPACE` with your values):
```bash
helm upgrade -i $RELEASENAME -n $NAMESPACE docker-selenium/selenium-grid \
--set global.K8S_PUBLIC_IP=$(hostname -i) \
--set tls.ingress.enabled=true \
--set tls.ingress.enableWithController=true \
--set tls.nameOverride=my-external-tls-secret \
--set ingress-nginx.controller.extraArgs.default-ssl-certificate=$NAMESPACE/my-external-tls-secret
```
Expand Down Expand Up @@ -894,8 +892,8 @@ This table contains the configuration parameters of the chart and their default
| `busConfigMap.annotations` | `{}` | Custom annotations for configmap |
| `nodeConfigMap.nameOverride` | `` | Name of the configmap that contains common environment variables for browser nodes |
| `nodeConfigMap.annotations` | `{}` | Custom annotations for configmap |
| `ingress.enabled` | `false` | Enable ingress. Implies installing Ingress NGINX Controller |
| `ingress.enableWithExistingController` | `true` | Enable ingress without automatically installing Ingress NGINX Controller |
| `ingress.enabled` | `true` | Enable to create ingres resource |
| `ingress.enableWithController` | `false` | Enable ingress resource with automatically installing Ingress NGINX Controller |
| `ingress.className` | `""` | Name of ingress class to select which controller will implement ingress resource |
| `ingress.annotations` | `{}` | Custom annotations for ingress resource |
| `ingress.nginx.proxyTimeout` | `3600` | Value is used to set for NGINX ingress annotations related to proxy timeout |
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Is autoscaling using KEDA enabled
Is ingress enabled
*/}}
{{- define "seleniumGrid.ingress.enabled" -}}
{{- or .Values.ingress.enabled .Values.ingress.enableWithExistingController | ternary "true" "" -}}
{{- or .Values.ingress.enabled .Values.ingress.enableWithController | ternary "true" "" -}}
{{- end -}}

{{/*
Expand Down
8 changes: 4 additions & 4 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ rbacRoleBinding:

# Configure the ingress resource to access the Grid installation.
ingress:
# Enable ingress. Implies installing Ingress NGINX Controller
enabled: false
# Enable ingress without automatically installing Ingress NGINX Controller
enableWithExistingController: true
# Enable to create ingress resource
enabled: true
# Enable ingress resource with automatically installing Ingress NGINX Controller
enableWithController: false
# Name of ingress class to select which controller will implement ingress resource
className: ""
# Refer to list nginx annotations: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md#annotations
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/ci/base-auth-ingress-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ serverConfigMap:
SE_SUPERVISORD_LOG_LEVEL: "info"

ingress:
enabled: true
enableWithController: true
className: nginx
hostname: ""

Expand Down
2 changes: 1 addition & 1 deletion tests/charts/make/chart_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ fi
if [ "${SERVICE_TYPE_NODEPORT}" = "true" ]; then
HELM_COMMAND_SET_IMAGES="${HELM_COMMAND_SET_IMAGES} \
--set ingress.enabled=false \
--set ingress.enableWithExistingController=false \
--set ingress.enableWithController=false \
--set hub.serviceType=NodePort \
--set components.router.serviceType=NodePort \
"
Expand Down
2 changes: 1 addition & 1 deletion tests/charts/refValues/simplex-minikube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tls:
generateTLS: true

ingress:
enabled: true
enableWithController: true
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
Expand Down

0 comments on commit 24d5ae6

Please sign in to comment.