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
10 changes: 10 additions & 0 deletions charts/self-learning-platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ helm show values self-learning-platform/self-learning-platform
| envFromFiles | list | `[]` | Load all variables from files |
| envFromSecrets | object | `{}` | Variables from secrets |
| fullnameOverride | string | `""` | String to fully override self-learning-platform.fullname template |
| gateway | object | `{"annotations":{},"className":"","create":false,"enabled":false,"filters":[],"hostnames":[],"labels":{},"listeners":[{"name":"http","port":80,"protocol":"HTTP"}],"parentRefs":[{"name":"","namespace":""}],"rules":[{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]}` | Gateway API configuration (Gateway + HTTPRoute resources) </br> Ref: https://gateway-api.sigs.k8s.io/ </br> Requires Gateway API CRDs installed in the cluster. </br> TLS is configured at the Gateway listener level, not the HTTPRoute. |
| gateway.annotations | object | `{}` | Annotations for the HTTPRoute |
| gateway.className | string | `""` | GatewayClass name — required when create is true |
| gateway.create | bool | `false` | Set to false to attach to a pre-existing Gateway via parentRefs. |
| gateway.filters | list | `[]` | Additional request/response filters |
| gateway.hostnames | list | `[]` | Hostnames to match (leave empty to match all hostnames) |
| gateway.labels | object | `{}` | Additional labels for the HTTPRoute |
| gateway.listeners | list | `[{"name":"http","port":80,"protocol":"HTTP"}]` | Gateway listeners — used only when create is true |
| gateway.parentRefs | list | `[{"name":"","namespace":""}]` | Ignored when create is true (auto-wired to the chart-managed Gateway). |
| gateway.rules | list | `[{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | Route rules (backendRefs are auto-generated from service config) |
| global | object | `{"imagePullSecrets":[],"imageRegistry":""}` | Global section contains configuration options that are applied to all services |
| global.imagePullSecrets | list | `[]` | Specifies the secrets to use for pulling images from private registries |
| global.imageRegistry | string | `""` | Specifies the registry to pull images from. Leave empty for the default registry |
Expand Down
14 changes: 13 additions & 1 deletion charts/self-learning-platform/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ To learn more about the release, try:
$ helm status {{ .Release.Name }} -n {{ .Release.Namespace }}
$ helm get all {{ .Release.Name }} -n {{ .Release.Namespace }}

{{- if .Values.ingress.enabled }}
{{- if .Values.gateway.enabled }}

The application is accessible via Gateway API at:
{{- if .Values.gateway.hostnames }}
{{- range .Values.gateway.hostnames }}
{{ . }}
{{- end }}
{{- else }}
(HTTPRoute - no hostnames configured)
{{- end }}
(Gateway API / HTTPRoute)

{{- else if .Values.ingress.enabled }}

The application is accessible via Ingress at:
{{- range .Values.ingress.hosts }}
Expand Down
40 changes: 40 additions & 0 deletions charts/self-learning-platform/templates/gateway-httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{- if .Values.gateway.enabled -}}
{{- $fullName := include "self-learning-platform.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "self-learning-platform.labels" . | nindent 4 }}
{{- with .Values.gateway.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- if .Values.gateway.create }}
- name: {{ $fullName }}-gateway
namespace: {{ .Release.Namespace }}
{{- else }}
{{- toYaml .Values.gateway.parentRefs | nindent 4 }}
{{- end }}
{{- if .Values.gateway.hostnames }}
hostnames:
{{- toYaml .Values.gateway.hostnames | nindent 4 }}
{{- end }}
rules:
{{- range .Values.gateway.rules }}
- {{- if .matches }}
matches:
{{- toYaml .matches | nindent 8 }}
{{- end }}
{{- if .filters }}
filters:
{{- toYaml .filters | nindent 8 }}
{{- end }}
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/self-learning-platform/templates/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if and .Values.gateway.enabled .Values.gateway.create -}}
{{- $fullName := include "self-learning-platform.fullname" . -}}
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: {{ $fullName }}-gateway
labels:
{{- include "self-learning-platform.labels" . | nindent 4 }}
spec:
gatewayClassName: {{ required "gateway.className is required when gateway.create is true" .Values.gateway.className }}
listeners:
{{- toYaml .Values.gateway.listeners | nindent 4 }}
{{- end }}
38 changes: 38 additions & 0 deletions charts/self-learning-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,44 @@ ingress:
# hosts:
# - self-learning-platform.local

# -- Gateway API configuration (Gateway + HTTPRoute resources)
# </br> Ref: https://gateway-api.sigs.k8s.io/
# </br> Requires Gateway API CRDs installed in the cluster.
# </br> TLS is configured at the Gateway listener level, not the HTTPRoute.
gateway:
enabled: false
# -- Set to true to let the chart create and manage the Gateway resource.
# -- Set to false to attach to a pre-existing Gateway via parentRefs.
create: false
# -- GatewayClass name — required when create is true
className: ""
# -- Gateway listeners — used only when create is true
listeners:
- name: http
protocol: HTTP
port: 80
# -- References to parent Gateway resources.
# -- Ignored when create is true (auto-wired to the chart-managed Gateway).
parentRefs:
- name: ""
namespace: ""
# sectionName: ""
# -- Hostnames to match (leave empty to match all hostnames)
hostnames: []
# - self-learning-platform.local
# -- Route rules (backendRefs are auto-generated from service config)
rules:
- matches:
- path:
type: PathPrefix
value: /
# -- Additional request/response filters
filters: []
# -- Additional labels for the HTTPRoute
labels: {}
# -- Annotations for the HTTPRoute
annotations: {}

# -- Resource limits and requests
resources:
requests:
Expand Down
Loading