Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## master / unreleased

* [FEATURE] Parquet converter: allow running it as a StatefulSet with a persistent volume per pod #685
* [FEATURE] Add optional Gateway API `HTTPRoute` for the nginx service (`httpRoute.*`) as an alternative to `ingress` #689
* [ENHANCEMENT] Expose `nginx.config.client_body_buffer_size` to set the nginx `client_body_buffer_size` #350
* [DEPENDENCY] Update Helm release rollout-operator to v0.53.1 #683
* [DEPENDENCY] Update prom/memcached-exporter Docker tag to v0.18.0 #684
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ Kubernetes: `^1.19.0-0`
| distributor.​topologySpreadConstraints | list | `[]` | |
| externalConfigSecretName | string | `"secret-with-config.yaml"` | |
| externalConfigVersion | string | `"0"` | |
| httpRoute.​annotations | object | `{}` | Annotations for the HTTPRoute |
| httpRoute.​enabled | bool | `false` | Create an HTTPRoute for the nginx service |
| httpRoute.​filters | list | `[]` | Filters of the route rule |
| httpRoute.​hostnames | list | `[]` | Hostnames matched by the HTTPRoute (templated) |
| httpRoute.​labels | object | `{}` | Extra labels for the HTTPRoute |
| httpRoute.​matches | list | `[{"path":{"type":"PathPrefix","value":"/"}}]` | Request matches of the route rule |
| httpRoute.​parentRefs | list | `[]` | Gateways the HTTPRoute attaches to |
| image.​pullPolicy | string | `"IfNotPresent"` | |
| image.​pullSecrets | list | `[]` | Optionally specify an array of imagePullSecrets. Secrets must be manually created in the namespace. ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| image.​repository | string | `"quay.io/cortexproject/cortex"` | |
Expand Down
37 changes: 37 additions & 0 deletions templates/nginx/nginx-httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{- if and .Values.httpRoute.enabled .Values.nginx.enabled -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ include "cortex.nginxFullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "cortex.nginxLabels" . | nindent 4 }}
{{- with .Values.httpRoute.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.httpRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ include "cortex.nginxFullname" . }}
port: {{ .Values.nginx.service.port | default .Values.nginx.http_listen_port }}
{{- with .Values.httpRoute.matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.httpRoute.filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
24 changes: 24 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@ ingress:
- /
tls: []

# Gateway API HTTPRoute that routes traffic to the nginx service, as an alternative to `ingress`.
# Requires the Gateway API CRDs (v1) in the cluster.
httpRoute:
# -- Create an HTTPRoute for the nginx service
enabled: false
# -- Annotations for the HTTPRoute
annotations: {}
# -- Extra labels for the HTTPRoute
labels: {}
# -- Gateways the HTTPRoute attaches to
parentRefs: []
# - name: my-gateway
# namespace: gateway-system
# sectionName: https
# -- Hostnames matched by the HTTPRoute (templated)
hostnames: []
# -- Request matches of the route rule
matches:
- path:
type: PathPrefix
value: /
# -- Filters of the route rule
filters: []

serviceAccount:
create: true
name:
Expand Down
Loading