diff --git a/charts/stelloauth/templates/httproute.yaml b/charts/stelloauth/templates/httproute.yaml new file mode 100644 index 0000000..f481998 --- /dev/null +++ b/charts/stelloauth/templates/httproute.yaml @@ -0,0 +1,19 @@ +{{- if .Values.httpRoute.enabled }} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ include "stelloauth.fullname" . }} + labels: + {{- include "stelloauth.labels" . | nindent 4 }} +spec: + parentRefs: + {{- toYaml .Values.httpRoute.parentRefs | nindent 4 }} + {{- if .Values.httpRoute.hostnames }} + hostnames: + {{- toYaml .Values.httpRoute.hostnames | nindent 4 }} + {{- end }} + rules: + - backendRefs: + - name: {{ include "stelloauth.fullname" . }} + port: {{ .Values.service.port }} +{{- end }} diff --git a/charts/stelloauth/values.yaml b/charts/stelloauth/values.yaml index 75cfbca..a60a0b0 100644 --- a/charts/stelloauth/values.yaml +++ b/charts/stelloauth/values.yaml @@ -38,6 +38,16 @@ ingress: pathType: Prefix tls: [] +# Gateway API HTTPRoute — alternative to Ingress for clusters running nginx-gateway-fabric +# or another Gateway API implementation. +httpRoute: + enabled: false + parentRefs: [] + # - name: nginx-gateway + # namespace: nginx-gateway + hostnames: [] + # - stelloauth.example.com + resources: {} rateLimit: