From 3230ed13ac2f7b3cff9b5cde7ca08911b13e9317 Mon Sep 17 00:00:00 2001 From: Mauricio Zanetti Salomao Date: Tue, 5 Aug 2025 09:02:11 -0300 Subject: [PATCH 1/2] LFXV2-211 - update service and deployment configurations to use dynamic port values - add HTTPRoute resource Signed-off-by: Mauricio Zanetti Salomao --- .../templates/deployment.yaml | 2 +- .../templates/httproute.yaml | 34 +++++++++++++++++++ .../templates/ingressroute.yaml | 25 -------------- .../templates/service.yaml | 2 +- charts/lfx-v2-query-service/values.yaml | 20 +++++++++-- 5 files changed, 53 insertions(+), 30 deletions(-) create mode 100644 charts/lfx-v2-query-service/templates/httproute.yaml delete mode 100644 charts/lfx-v2-query-service/templates/ingressroute.yaml diff --git a/charts/lfx-v2-query-service/templates/deployment.yaml b/charts/lfx-v2-query-service/templates/deployment.yaml index 8040e6e..33ac4cf 100644 --- a/charts/lfx-v2-query-service/templates/deployment.yaml +++ b/charts/lfx-v2-query-service/templates/deployment.yaml @@ -34,7 +34,7 @@ spec: - secretRef: name: {{ .Values.secret.name }} ports: - - containerPort: 8080 + - containerPort: {{ .Values.service.port }} name: web livenessProbe: httpGet: diff --git a/charts/lfx-v2-query-service/templates/httproute.yaml b/charts/lfx-v2-query-service/templates/httproute.yaml new file mode 100644 index 0000000..9cc265c --- /dev/null +++ b/charts/lfx-v2-query-service/templates/httproute.yaml @@ -0,0 +1,34 @@ +# Copyright The Linux Foundation and each contributor to LFX. +# SPDX-License-Identifier: MIT +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: lfx-v2-query-service + namespace: {{ .Values.lfx.namespace }} +spec: + parentRefs: + - name: {{ .Values.traefik.gateway.name }} + namespace: {{ .Values.traefik.gateway.namespace }} + hostnames: + - "lfx-api.{{ .Values.lfx.domain }}" + rules: + # Main application endpoints (with authentication) + - matches: + - path: + type: Exact + value: /query + - path: + type: PathPrefix + value: /query/ + {{- if .Values.heimdall.enabled }} + filters: + - type: ExtensionRef + extensionRef: + group: traefik.io + kind: Middleware + name: heimdall + {{- end }} + backendRefs: + - name: lfx-v2-query-service + port: {{ .Values.service.port }} diff --git a/charts/lfx-v2-query-service/templates/ingressroute.yaml b/charts/lfx-v2-query-service/templates/ingressroute.yaml deleted file mode 100644 index 1e22151..0000000 --- a/charts/lfx-v2-query-service/templates/ingressroute.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright The Linux Foundation and each contributor to LFX. -# SPDX-License-Identifier: MIT ---- -apiVersion: traefik.io/v1alpha1 -kind: IngressRoute -metadata: - name: lfx-v2-query-service - namespace: {{ .Release.Namespace }} -spec: - entryPoints: - - web - - websecure - routes: - - kind: Rule - match: >- - Host(`{{.Values.ingress.hostname}}`) && PathPrefix(`/query/`) - priority: 10 - middlewares: - {{- if .Values.heimdall.enabled }} - - name: heimdall - {{- end }} - services: - - kind: Service - name: lfx-v2-query-service - port: web diff --git a/charts/lfx-v2-query-service/templates/service.yaml b/charts/lfx-v2-query-service/templates/service.yaml index 39734de..7efd0c6 100644 --- a/charts/lfx-v2-query-service/templates/service.yaml +++ b/charts/lfx-v2-query-service/templates/service.yaml @@ -10,7 +10,7 @@ metadata: spec: ports: - name: web - port: 80 + port: {{ .Values.service.port }} targetPort: web selector: diff --git a/charts/lfx-v2-query-service/values.yaml b/charts/lfx-v2-query-service/values.yaml index 60de1d0..c158a38 100644 --- a/charts/lfx-v2-query-service/values.yaml +++ b/charts/lfx-v2-query-service/values.yaml @@ -9,9 +9,23 @@ image: tag: "" pullPolicy: IfNotPresent -# ingress is the configuration for the ingress routing -ingress: - hostname: lfx-api.k8s.orb.local +# traefik is the configuration for Traefik Gateway API routing +traefik: + # gateway specifies the platform Gateway to attach to + gateway: + name: lfx-platform-gateway + +# lfx is the configuration for LFX platform +lfx: + # domain is the base domain for routing + domain: k8s.orb.local + # namespace is the target namespace for deployment + namespace: lfx + +# service is the configuration for the Kubernetes service +service: + # port is the service port + port: 8080 # nats is the configuration for the NATS server nats: From 06454f49690fc1046a711ed866e82bd0c7479c0b Mon Sep 17 00:00:00 2001 From: Mauricio Zanetti Salomao Date: Tue, 5 Aug 2025 11:30:03 -0300 Subject: [PATCH 2/2] LFXV2-211 - traefik namespace value Generated with [GitHub Copilot](https://github.com/features/copilot) Signed-off-by: Mauricio Zanetti Salomao --- charts/lfx-v2-query-service/values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/lfx-v2-query-service/values.yaml b/charts/lfx-v2-query-service/values.yaml index c158a38..bef4c50 100644 --- a/charts/lfx-v2-query-service/values.yaml +++ b/charts/lfx-v2-query-service/values.yaml @@ -14,6 +14,7 @@ traefik: # gateway specifies the platform Gateway to attach to gateway: name: lfx-platform-gateway + namespace: lfx # lfx is the configuration for LFX platform lfx: