Skip to content
Merged
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ helm install convoy .
| server.env.storage.s3.secretKey | string | `""` | Ignored in case of secret parameter with non-empty value |
| server.env.storage.s3.session_token | string | `""` | |
| server.env.storage.type | string | `""` | |
| server.gateway.annotations | object | `{}` | Annotations for the HTTPRoute |
| server.gateway.create | bool | `false` | Whether to create a Gateway resource |
| server.gateway.enabled | bool | `false` | Enable Gateway API for the server |
| server.gateway.hostnames | list | `["test.com"]` | Hostnames for the HTTPRoute |
| server.gateway.parentRefs | list | `[{"name":"convoy-gateway","namespace":"gateway-system"}]` | Parent refs for the HTTPRoute (e.g., the Gateway) |
| server.gateway.rules | list | `[{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | Rules for the HTTPRoute |
| server.image.pullPolicy | string | `"IfNotPresent"` | Pull policy for the server image |
| server.image.repository | string | `"getconvoy/convoy"` | Repository to be used by the server. The latest tag is used by default |
| server.ingress.annotations | object | `{}` | |
Expand Down
21 changes: 21 additions & 0 deletions charts/server/templates/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if and .Values.gateway.enabled .Values.gateway.create -}}
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: {{ include "convoy-server.fullname" . }}
labels:
{{- include "convoy-server.labels" . | nindent 4 }}
{{- with .Values.gateway.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
gatewayClassName: {{ .Values.gateway.gatewayClassName | default "convoy-gateway-class" }}
listeners:
- name: http
port: 80
protocol: HTTP
allowedRoutes:
namespaces:
from: Same
{{- end }}
42 changes: 42 additions & 0 deletions charts/server/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{- if .Values.gateway.enabled -}}
{{- if and .Values.ingress.enabled .Values.gateway.enabled -}}
{{- fail "Both ingress and gateway are enabled. Please enable only one." -}}
{{- end -}}
{{- $fullName := include "convoy-server.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "convoy-server.labels" . | nindent 4 }}
{{- with .Values.gateway.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.gateway.parentRefs }}
parentRefs:
{{- toYaml .Values.gateway.parentRefs | nindent 4 }}
{{- end }}
{{- if .Values.gateway.hostnames }}
hostnames:
{{- range .Values.gateway.hostnames }}
- {{ . | quote }}
{{- end }}
{{- end }}
rules:
{{- range .Values.gateway.rules }}
- backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
{{- if .matches }}
matches:
{{- toYaml .matches | nindent 8 }}
{{- end }}
{{- if .filters }}
filters:
{{- toYaml .filters | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,27 @@ ingress:
- path: /
pathType: Prefix

gateway:
# -- Enable Gateway API for the server
enabled: false
# -- Whether to create a Gateway resource
create: false
# -- Annotations for the HTTPRoute
annotations: {}
# -- Hostnames for the HTTPRoute
hostnames:
- test.com
# -- Parent refs for the HTTPRoute (e.g., the Gateway)
parentRefs:
- name: convoy-gateway
# namespace: gateway-system
# -- Rules for the HTTPRoute
rules:
- matches:
- path:
type: PathPrefix
value: /

autoscaling:
enabled: true
minReplicas: 1
Expand Down
21 changes: 21 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,27 @@ server:
- path: /
pathType: Prefix

gateway:
# -- Enable Gateway API for the server
enabled: false
# -- Whether to create a Gateway resource
create: false
# -- Annotations for the HTTPRoute
annotations: {}
# -- Hostnames for the HTTPRoute
hostnames:
- test.com
# -- Parent refs for the HTTPRoute (e.g., the Gateway)
parentRefs:
- name: convoy-gateway
namespace: gateway-system
# -- Rules for the HTTPRoute
rules:
- matches:
- path:
type: PathPrefix
value: /

service:
# -- Type of service for the server
type: ClusterIP
Expand Down
Loading