From 4d71caf810dcc34d827936be54d7dc4aedbe65d7 Mon Sep 17 00:00:00 2001 From: Vaibhav Pathak Date: Thu, 12 Feb 2026 17:08:21 +0530 Subject: [PATCH] nginx removed --- .../schedulerservice/templates/httproute.yaml | 50 +++++++++++++++++++ helm/schedulerservice/values.yaml | 24 +++++++-- 2 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 helm/schedulerservice/templates/httproute.yaml diff --git a/helm/schedulerservice/templates/httproute.yaml b/helm/schedulerservice/templates/httproute.yaml new file mode 100644 index 0000000..1a0fbbf --- /dev/null +++ b/helm/schedulerservice/templates/httproute.yaml @@ -0,0 +1,50 @@ +{{- if .Values.httpRoute.enabled -}} +{{- $fullName := include "schedulerservice.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "schedulerservice.labels" . | nindent 4 }} + {{- with .Values.httpRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + parentRefs: + {{- with .Values.httpRoute.parentRefs }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.httpRoute.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + {{- if .Values.httpRoute.rules }} + {{- range .Values.httpRoute.rules }} + - matches: + {{- with .matches }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} + backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + weight: 1 + {{- end }} + {{- else }} + # Default rule if no custom rules provided + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + weight: 1 + {{- end }} +{{- end }} diff --git a/helm/schedulerservice/values.yaml b/helm/schedulerservice/values.yaml index d0d2d45..4fe4059 100644 --- a/helm/schedulerservice/values.yaml +++ b/helm/schedulerservice/values.yaml @@ -44,11 +44,11 @@ service: targetPort: 8080 annotations: {} +# Ingress configuration (DEPRECATED - use httpRoute below instead) ingress: enabled: false - className: "nginx" - annotations: - nginx.ingress.kubernetes.io/ssl-redirect: "false" + className: "" + annotations: {} hosts: - host: schedulerservice.example.com paths: @@ -56,6 +56,24 @@ ingress: pathType: Prefix tls: [] +# Gateway API HTTPRoute configuration (modern replacement for Ingress) +httpRoute: + enabled: false + annotations: {} + # Reference to the Gateway that will handle this route + parentRefs: + - name: main-gateway + namespace: traefik + sectionName: https + # Hostnames for this route + hostnames: [] + # Optional: Custom routing rules (if not specified, defaults to PathPrefix /) + # rules: + # - matches: + # - path: + # type: PathPrefix + # value: /schedulerService + resources: limits: cpu: 1000m