Skip to content

Commit 7e85888

Browse files
committed
K8s: Component service name in the same namespace
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 575723a commit 7e85888

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

charts/selenium-grid/CONFIGURATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ A Helm chart for creating a Selenium Grid Server in Kubernetes
329329
| tracing.enabled | bool | `false` | Enable tracing. Implies installing Jaeger |
330330
| tracing.enabledWithExistingEndpoint | bool | `false` | Enable tracing without automatically installing Jaeger |
331331
| tracing.exporter | string | `"otlp"` | Exporter type for tracing. Recommended `otlp` for wide compatibility with observability backends (e.g. Jaeger, Elastic, etc.) |
332-
| tracing.exporterEndpoint | string | `"http://{{ .Release.Name }}-jaeger-collector.{{ .Release.Namespace }}:4317"` | Exporter endpoint for pushing trace data |
332+
| tracing.exporterEndpoint | string | `"http://{{ .Release.Name }}-jaeger-collector:4317"` | Exporter endpoint for pushing trace data |
333333
| tracing.globalAutoConfigure | bool | `true` | Enable global auto-configuration for tracing |
334334
| tracing.ingress.enabled | bool | `true` | Enable ingress resource to access the Jaeger |
335335
| tracing.ingress.annotations | string | `nil` | Annotations for Jaeger ingress resource |

charts/selenium-grid/configs/scrape/selenium-grid.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
insecure_skip_verify: true
1313
static_configs:
1414
- targets:
15-
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}.{{ .Release.Namespace }}:{{ $.Values.monitoring.exporter.port }}'
15+
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}:{{ $.Values.monitoring.exporter.port }}'

charts/selenium-grid/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ Graphql Url for internal monitoring exporter
707707
{{- end -}}
708708

709709
{{- define "seleniumGrid.url.host" -}}
710-
{{- $host := printf "%s.%s.svc.cluster.local" (include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $ ) (.Release.Namespace) -}}
710+
{{- $host := printf "%s" (include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $) -}}
711711
{{- if eq (include "seleniumGrid.ingress.enabled" $) "true" -}}
712712
{{- if and (not .Values.ingress.hostname) .Values.global.K8S_PUBLIC_IP -}}
713713
{{- $host = .Values.global.K8S_PUBLIC_IP -}}
@@ -721,7 +721,7 @@ Graphql Url for internal monitoring exporter
721721
{{- end -}}
722722

723723
{{- define "seleniumGrid.server.url.host" -}}
724-
{{- $host := printf "%s.%s.svc.cluster.local" (include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $ ) (.Release.Namespace) -}}
724+
{{- $host := printf "%s" (include ($.Values.isolateComponents | ternary "seleniumGrid.router.fullname" "seleniumGrid.hub.fullname") $) -}}
725725
{{- $host }}
726726
{{- end -}}
727727

charts/selenium-grid/templates/distributor-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ spec:
5252
- name: SE_DISTRIBUTOR_PORT
5353
value: {{ .Values.components.distributor.port | quote }}
5454
- name: SE_ROUTER_HOST
55-
value: '{{ template "seleniumGrid.router.fullname" . }}.{{ .Release.Namespace }}'
55+
value: {{ template "seleniumGrid.router.fullname" $ | quote }}
5656
- name: SE_ROUTER_PORT
5757
value: {{ .Values.components.router.port | quote }}
5858
- name: SE_SESSIONS_MAP_HOST
59-
value: '{{ template "seleniumGrid.sessionMap.fullname" . }}.{{ .Release.Namespace }}'
59+
value: {{ template "seleniumGrid.sessionMap.fullname" $ | quote }}
6060
- name: SE_SESSIONS_MAP_PORT
6161
value: {{ .Values.components.sessionMap.port | quote }}
6262
- name: SE_SESSION_QUEUE_HOST
63-
value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}.{{ .Release.Namespace }}'
63+
value: {{ template "seleniumGrid.sessionQueue.fullname" $ | quote }}
6464
- name: SE_SESSION_QUEUE_PORT
6565
value: {{ .Values.components.sessionQueue.port | quote }}
6666
{{- if .Values.components.distributor.newSessionThreadPoolSize }}
6767
- name: SE_NEW_SESSION_THREAD_POOL_SIZE
6868
value: {{ .Values.components.distributor.newSessionThreadPoolSize | quote }}
6969
{{- else if (eq (include "seleniumGrid.useKEDA" $) "true") }}
7070
- name: SE_NEW_SESSION_THREAD_POOL_SIZE
71-
value: '{{ template "seleniumGrid.autoscaling.distributor.threadPoolSize" $ }}'
71+
value: {{ template "seleniumGrid.autoscaling.distributor.threadPoolSize" $ | quote }}
7272
{{- end }}
7373
{{- with .Values.components.extraEnvironmentVariables }}
7474
{{- tpl (toYaml .) $ | nindent 12 }}

charts/selenium-grid/templates/event-bus-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- $eventBusHost := printf "%s.%s.svc.cluster.local" (ternary (include "seleniumGrid.eventBus.fullname" .) (include "seleniumGrid.hub.fullname" .) .Values.isolateComponents) (.Release.Namespace) -}}
1+
{{- $eventBusHost := printf "%s.%s" (ternary (include "seleniumGrid.eventBus.fullname" .) (include "seleniumGrid.hub.fullname" .) .Values.isolateComponents) (.Release.Namespace) -}}
22
{{- $eventBusPublishPort := ternary .Values.components.eventBus.publishPort .Values.hub.publishPort .Values.isolateComponents -}}
33
{{- $eventBusSubscribePort := ternary .Values.components.eventBus.subscribePort .Values.hub.subscribePort .Values.isolateComponents -}}
44
apiVersion: v1

charts/selenium-grid/templates/node-configmap.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{{- $distributorHost := printf "%s.%s.svc.cluster.local" (include "seleniumGrid.distributor.fullname" .) (.Release.Namespace) -}}
2-
{{- $routerHost := printf "%s.%s.svc.cluster.local" (include "seleniumGrid.router.fullname" .) (.Release.Namespace) -}}
3-
{{- $hubHost := printf "%s.%s.svc.cluster.local" (include "seleniumGrid.hub.fullname" .) (.Release.Namespace) -}}
1+
{{- $distributorHost := printf "%s.%s" (include "seleniumGrid.distributor.fullname" .) (.Release.Namespace) -}}
2+
{{- $routerHost := printf "%s.%s" (include "seleniumGrid.router.fullname" .) (.Release.Namespace) -}}
3+
{{- $hubHost := printf "%s.%s" (include "seleniumGrid.hub.fullname" .) (.Release.Namespace) -}}
44
apiVersion: v1
55
kind: ConfigMap
66
metadata:

charts/selenium-grid/templates/router-deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ spec:
5050
- name: SE_ROUTER_PORT
5151
value: {{ .Values.components.router.port | quote }}
5252
- name: SE_DISTRIBUTOR_HOST
53-
value: '{{ template "seleniumGrid.distributor.fullname" . }}.{{ .Release.Namespace }}'
53+
value: {{ template "seleniumGrid.distributor.fullname" $ | quote }}
5454
- name: SE_DISTRIBUTOR_PORT
5555
value: {{ .Values.components.distributor.port | quote }}
5656
- name: SE_SESSIONS_MAP_HOST
57-
value: '{{ template "seleniumGrid.sessionMap.fullname" . }}.{{ .Release.Namespace }}'
57+
value: {{ template "seleniumGrid.sessionMap.fullname" $ | quote }}
5858
- name: SE_SESSIONS_MAP_PORT
5959
value: {{ .Values.components.sessionMap.port | quote }}
6060
- name: SE_SESSION_QUEUE_HOST
61-
value: '{{ template "seleniumGrid.sessionQueue.fullname" . }}.{{ .Release.Namespace }}'
61+
value: {{ template "seleniumGrid.sessionQueue.fullname" $ | quote }}
6262
- name: SE_SESSION_QUEUE_PORT
6363
value: {{ .Values.components.sessionQueue.port | quote }}
6464
{{- with .Values.components.router.subPath }}

charts/selenium-grid/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ tracing:
844844
# -- Exporter type for tracing. Recommended `otlp` for wide compatibility with observability backends (e.g. Jaeger, Elastic, etc.)
845845
exporter: otlp
846846
# -- Exporter endpoint for pushing trace data
847-
exporterEndpoint: "http://{{ .Release.Name }}-jaeger-collector.{{ .Release.Namespace }}:4317"
847+
exporterEndpoint: "http://{{ .Release.Name }}-jaeger-collector:4317"
848848
# -- Enable global auto-configuration for tracing
849849
globalAutoConfigure: true
850850
ingress:

tests/charts/templates/render/dummy_solution.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ selenium-grid:
4242
insecure_skip_verify: true
4343
static_configs:
4444
- targets:
45-
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}.{{ .Release.Namespace }}:{{ $.Values.monitoring.exporter.port }}'
45+
- '{{ template "seleniumGrid.monitoring.exporter.fullname" $ }}:{{ $.Values.monitoring.exporter.port }}'
4646
4747
basicAuth:
4848
create: false

tests/charts/templates/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_graphql_url_for_autoscaling_constructed_without_basic_auth_in_url(self)
8080
logger.info(f"Assert graphql url is constructed without basic auth in url")
8181
base64_url = doc['data']['SE_NODE_GRID_GRAPHQL_URL']
8282
decoded_url = base64.b64decode(base64_url).decode('utf-8')
83-
self.assertTrue(decoded_url == f'https://{RELEASE_NAME}selenium-router.default.svc.cluster.local:4444/selenium/graphql', decoded_url)
83+
self.assertTrue(decoded_url == f'https://{RELEASE_NAME}selenium-router.default:4444/selenium/graphql', decoded_url)
8484

8585
def test_distributor_new_session_thread_pool_size(self):
8686
resources_name = [f'{RELEASE_NAME}selenium-distributor']

0 commit comments

Comments
 (0)