diff --git a/charts/goldpinger/templates/http_route.yaml b/charts/goldpinger/templates/http_route.yaml new file mode 100644 index 0000000..a623411 --- /dev/null +++ b/charts/goldpinger/templates/http_route.yaml @@ -0,0 +1,32 @@ +{{- if .Values.httproute.enabled -}} +{{- $fullName := include "goldpinger.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + labels: + {{- include "goldpinger.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + name: {{ $fullName }} +spec: + {{- with .Values.httproute.hostnames }} + hostnames: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ .Values.service.port }} + weight: 1 + matches: + - path: + type: PathPrefix + value: / +{{- end }} diff --git a/charts/goldpinger/values.yaml b/charts/goldpinger/values.yaml index 6026875..e0c7c88 100644 --- a/charts/goldpinger/values.yaml +++ b/charts/goldpinger/values.yaml @@ -74,6 +74,18 @@ ingress: # hosts: # - chart-example.local +httproute: + enabled: false + hostnames: [] + # - chart-example.local + parentRefs: [] + # - group: gateway.networking.k8s.io + # kind: Gateway + # name: default-gateway + # namespace: "gateway-namespace" + annotations: {} + + ## Set a priorityClassName for the pod. If left blank a default priority will be set. priorityClassName: