Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions pkg/helm/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{- if .Values.httpRoute.enabled }}
{{- if not .Values.httpRoute.parentRefs }}
{{- fail "httpRoute.parentRefs must be set when httpRoute.enabled is true" }}
{{- end }}
apiVersion: {{ .Values.httpRoute.apiVersion | default "gateway.networking.k8s.io/v1" }}
kind: HTTPRoute
metadata:
name: {{ template "pgadmin4.fullname" . }}
{{- with .Values.commonLabels }}
labels: {{ . | toYaml | nindent 4 }}
{{- end }}
{{- if or .Values.httpRoute.annotations .Values.commonAnnotations }}
annotations: {{ merge .Values.httpRoute.annotations .Values.commonAnnotations | toYaml | nindent 4 }}
{{- end }}
spec:
parentRefs: {{- toYaml .Values.httpRoute.parentRefs | nindent 4 }}
{{- $hostnames := .Values.httpRoute.hostnames }}
{{- if and (not $hostnames) .Values.ingress.hostname }}
{{- $hostnames = list (tpl .Values.ingress.hostname .) }}
{{- end }}
{{- with $hostnames }}
hostnames: {{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- if .Values.httpRoute.rules }}
{{- toYaml .Values.httpRoute.rules | nindent 4 }}
{{- else }}
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: {{ template "pgadmin4.fullname" . }}
port: {{ .Values.service.port }}
{{- end }}
{{- end }}
19 changes: 19 additions & 0 deletions pkg/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,25 @@ ingress:
annotations: {}
# If set, enables TLS configuration in the Ingress resource.
tlsSecret: ""
httpRoute:
# Enable a Gateway API HTTPRoute as an alternative to the Ingress above.
enabled: false
# apiVersion for the HTTPRoute resource. Override if your Gateway API
# implementation still serves the resource under v1beta1.
apiVersion: gateway.networking.k8s.io/v1
# parentRefs is required when httpRoute.enabled is true. It references the
# Gateway (and optionally a listener) that should route to pgAdmin.
parentRefs: []
# - name: my-gateway
# namespace: gateway-system
# sectionName: https
# hostnames for the route. When empty, falls back to ingress.hostname.
hostnames: []
# - pgadmin4.example.com
annotations: {}
# Custom routing rules. When empty, a single rule forwards all traffic
# ("/" PathPrefix) to the pgAdmin service.
rules: []
startupProbe:
enabled: false
httpGet:
Expand Down