Skip to content

Commit

Permalink
chart: fix config ingress.tls
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Jun 21, 2024
1 parent 904b8ea commit e16a167
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/helm-chart-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ on:
request-timeout:
description: 'Test parameter for different request timeout'
required: false
default: '370'
default: '15'
max-replicas-count:
description: 'Test parameter for autoscaling to set maxReplicaCount'
required: false
default: '30'
default: '10'
log-level:
description: 'Test parameter for different log level'
required: false
Expand Down Expand Up @@ -148,8 +148,8 @@ jobs:
echo "SET_MAX_REPLICAS=${SET_MAX_REPLICAS}" >> $GITHUB_ENV
echo "LOG_LEVEL=${LOG_LEVEL}" >> $GITHUB_ENV
env:
AUTOSCALING_POLL_INTERVAL: ${{ github.event.inputs.request-timeout || '370' }}
SET_MAX_REPLICAS: ${{ github.event.inputs.max-replicas-count || '30' }}
AUTOSCALING_POLL_INTERVAL: ${{ github.event.inputs.request-timeout || '15' }}
SET_MAX_REPLICAS: ${{ github.event.inputs.max-replicas-count || '10' }}
LOG_LEVEL: ${{ github.event.inputs.log-level || 'FINE' }}
- name: Test Selenium Grid on Kubernetes ${{ matrix.k8s-version }} with Autoscaling ${{ matrix.test-strategy }}
uses: nick-invision/retry@master
Expand Down
2 changes: 1 addition & 1 deletion charts/selenium-grid/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
secretName: {{ tpl (.secretName) $ | quote }}
secretName: {{ tpl (default "" .secretName) $ | quote }}
{{- end }}
{{- end }}
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ kind: Job
metadata:
name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }}
namespace: {{ .Release.Namespace }}
annotations: &patch_objects_job_annotations
{{- with $.Values.autoscaling.patchObjectFinalizers.annotations }}
annotations: &patch_objects_job_annotations
{{- toYaml . | nindent 4 }}
{{- end }}
labels: &patch_objects_job_labels
Expand All @@ -18,8 +18,10 @@ metadata:
spec:
template:
metadata:
labels: *patch_objects_job_labels
{{- with $.Values.autoscaling.patchObjectFinalizers.annotations }}
annotations: *patch_objects_job_annotations
{{- end }}
labels: *patch_objects_job_labels
name: {{ template "seleniumGrid.keda.patchObjectsJob.fullname" $ }}
spec:
activeDeadlineSeconds: {{ $.Values.autoscaling.patchObjectFinalizers.activeDeadlineSeconds }}
Expand Down
6 changes: 3 additions & 3 deletions charts/selenium-grid/templates/patch-keda/rbac-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: Role
metadata:
name: {{ template "seleniumGrid.rbac.role.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with $.Values.rbacRole.annotations }}
annotations:
{{- with $.Values.rbacRole.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
deploymentName: {{ template "seleniumGrid.rbac.role.fullname" $ }}
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ kind: RoleBinding
metadata:
name: {{ template "seleniumGrid.rbac.roleBinding.fullname" $ }}
namespace: {{ .Release.Namespace }}
{{- with $.Values.rbacRoleBinding.annotations }}
annotations:
{{- with $.Values.rbacRoleBinding.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
deploymentName: {{ template "seleniumGrid.rbac.roleBinding.fullname" $ }}
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/selenium-grid/templates/server-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ metadata:
{{- end }}
data:
SE_SERVER_PROTOCOL: {{ include "seleniumGrid.server.protocol" . | quote }}
{{- with $.Values.serverConfigMap.env }}
{{- toYaml . | nindent 2 }}
{{- range $key, $value := .Values.serverConfigMap.env }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.tls.enabled }}
SE_HTTPS_CERTIFICATE: {{ printf "%s/%s" .Values.serverConfigMap.certVolumeMountPath .Values.serverConfigMap.certificateFile | quote }}
Expand Down
3 changes: 3 additions & 0 deletions tests/charts/templates/render/dummy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ ingress:
name: '{{ ternary (include "seleniumGrid.router.fullname" $ ) (include "seleniumGrid.hub.fullname" $ ) $.Values.isolateComponents }}'
port:
number: 4444
tls:
- hosts:
- '*.my.domain.com'

isolateComponents: true

Expand Down
3 changes: 3 additions & 0 deletions tests/charts/templates/render/dummy_solution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ selenium-grid:
name: '{{ ternary (include "seleniumGrid.router.fullname" $ ) (include "seleniumGrid.hub.fullname" $ ) $.Values.isolateComponents }}'
port:
number: 4444
tls:
- hosts:
- '*.my.domain.com'

isolateComponents: true

Expand Down

0 comments on commit e16a167

Please sign in to comment.