Skip to content

Commit

Permalink
K8s: regression issue on template for nodes service.enabled (#2484)
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 authored Dec 2, 2024
1 parent a4c352d commit cf0c839
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions charts/selenium-grid/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes

| Repository | Name | Version |
|------------|------|---------|
| https://jaegertracing.github.io/helm-charts | jaeger | 3.3.2 |
| https://jaegertracing.github.io/helm-charts | jaeger | 3.3.3 |
| https://kedacore.github.io/charts | keda | 2.16.0 |
| https://kubernetes.github.io/ingress-nginx | ingress-nginx | 4.11.3 |
| https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | 66.2.2 |
| https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | 66.3.0 |

## Values

Expand Down
6 changes: 3 additions & 3 deletions charts/selenium-grid/templates/chrome-node-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }}
namespace: {{ .Release.Namespace }}
namespace: {{ $.Release.Namespace }}
labels:
name: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }}
{{- include "seleniumGrid.commonLabels" . | nindent 4 }}
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
{{- with $nodeConfig.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -17,7 +17,7 @@ spec:
type: {{ $nodeConfig.service.type }}
selector:
app: {{ template "seleniumGrid.chromeNode.fullname" (list $nodeConfig $) }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ $.Release.Name }}
{{- if and (eq $nodeConfig.service.type "LoadBalancer") ($nodeConfig.service.loadBalancerIP) }}
loadBalancerIP: {{ $nodeConfig.service.loadBalancerIP }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/firefox-node-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
namespace: {{ $.Release.Namespace }}
labels:
name: {{ template "seleniumGrid.firefoxNode.fullname" (list $nodeConfig $) }}
{{- include "seleniumGrid.commonLabels" . | nindent 4 }}
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
{{- with $nodeConfig.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
6 changes: 6 additions & 0 deletions tests/charts/templates/render/dummy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,22 @@ chromeNode:
annotations:
"restartOnUpdate": "true"
terminationGracePeriodSeconds: 7200
service:
enabled: true

firefoxNode:
nodeMaxSessions: 1
annotations:
"restartOnUpdate": "true"
terminationGracePeriodSeconds: 720
service:
enabled: true

edgeNode:
annotations:
"restartOnUpdate": "true"
service:
enabled: true
videoRecorder:
uploader:
enabled: false
Expand Down
6 changes: 6 additions & 0 deletions tests/charts/templates/render/dummy_solution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,20 @@ selenium-grid:
nodeMaxSessions: 2
affinity: *affinity
terminationGracePeriodSeconds: 7200
service:
enabled: true

firefoxNode:
nodeMaxSessions: 1
affinity: *affinity
terminationGracePeriodSeconds: 720
service:
enabled: true

edgeNode:
affinity: *affinity
service:
enabled: true
videoRecorder:
uploader:
enabled: false
Expand Down

0 comments on commit cf0c839

Please sign in to comment.