diff --git a/charts/lfx-v2-query-service/templates/deployment.yaml b/charts/lfx-v2-query-service/templates/deployment.yaml index 8f3cc0e..505db52 100644 --- a/charts/lfx-v2-query-service/templates/deployment.yaml +++ b/charts/lfx-v2-query-service/templates/deployment.yaml @@ -36,7 +36,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 2dd8656..b3a08f7 100644 --- a/charts/lfx-v2-query-service/values.yaml +++ b/charts/lfx-v2-query-service/values.yaml @@ -9,9 +9,24 @@ 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 + namespace: lfx + +# 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: