From 79ee291b56aa8cd1b5451c0ea4df79dc57eab723 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 10:20:33 +0100 Subject: [PATCH 01/26] added HTTPRoute to all charts with ingresses via Copilot --- HTTPROUTE_CHANGES.md | 94 +++++++++++++++++++ charts/o-neko-catnip/templates/httproute.yaml | 29 ++++++ charts/o-neko-catnip/values.yaml | 21 +++++ charts/o-neko/templates/httproute.yaml | 29 ++++++ charts/o-neko/values.yaml | 21 +++++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-admin-dashboard/values.yaml | 13 +++ charts/sophora-ai/templates/httproute.yaml | 33 +++++++ charts/sophora-ai/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-contentapi/values.yaml | 8 ++ .../templates/httproute.yaml | 38 ++++++++ .../sophora-image-access-service/values.yaml | 17 ++++ .../sophora-image-ai/templates/httproute.yaml | 33 +++++++ charts/sophora-image-ai/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-indexing-service/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-linkchecker/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-media-finder/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-metadata-supplier/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-schema-docs/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-seo-check/values.yaml | 8 ++ .../sophora-server/templates/httproute.yaml | 31 ++++++ charts/sophora-server/values.yaml | 13 +++ charts/sophora-ugc/templates/httproute.yaml | 33 +++++++ charts/sophora-ugc/values.yaml | 8 ++ .../templates/httproute.yaml | 30 ++++++ charts/sophora-webclient/values.yaml | 8 ++ .../templates/httproute.yaml | 33 +++++++ charts/sophora-youtube-connector/values.yaml | 8 ++ 35 files changed, 828 insertions(+) create mode 100644 HTTPROUTE_CHANGES.md create mode 100644 charts/o-neko-catnip/templates/httproute.yaml create mode 100644 charts/o-neko/templates/httproute.yaml create mode 100644 charts/sophora-admin-dashboard/templates/httproute.yaml create mode 100644 charts/sophora-ai/templates/httproute.yaml create mode 100644 charts/sophora-contentapi/templates/httproute.yaml create mode 100644 charts/sophora-image-access-service/templates/httproute.yaml create mode 100644 charts/sophora-image-ai/templates/httproute.yaml create mode 100644 charts/sophora-indexing-service/templates/httproute.yaml create mode 100644 charts/sophora-linkchecker/templates/httproute.yaml create mode 100644 charts/sophora-media-finder/templates/httproute.yaml create mode 100644 charts/sophora-metadata-supplier/templates/httproute.yaml create mode 100644 charts/sophora-schema-docs/templates/httproute.yaml create mode 100644 charts/sophora-seo-check/templates/httproute.yaml create mode 100644 charts/sophora-server/templates/httproute.yaml create mode 100644 charts/sophora-ugc/templates/httproute.yaml create mode 100644 charts/sophora-webclient/templates/httproute.yaml create mode 100644 charts/sophora-youtube-connector/templates/httproute.yaml diff --git a/HTTPROUTE_CHANGES.md b/HTTPROUTE_CHANGES.md new file mode 100644 index 00000000..7d8d3c4a --- /dev/null +++ b/HTTPROUTE_CHANGES.md @@ -0,0 +1,94 @@ +# HTTPRoute Support Added to Helm Charts + +## Summary + +All Helm charts in the `helm-charts` repository that contain Kubernetes Ingress resources have been extended to also provide optional HTTPRoute resources for the Gateway API. + +## Charts Updated + +The following 18 charts now support HTTPRoute (Gateway API) in addition to Ingress: + +1. **o-neko** - Added httproute.yaml template and values +2. **o-neko-catnip** - Added httproute.yaml template and values +3. **sophora-admin-dashboard** - Added httproute.yaml template and values +4. **sophora-ai** - Added httproute.yaml template and values +5. **sophora-contentapi** - Added httproute.yaml template and values +6. **sophora-image-access-service** - Added httproute.yaml template and values (with support for multiple routes) +7. **sophora-image-ai** - Added httproute.yaml template and values +8. **sophora-importer** - HTTPRoute support already existed (no changes needed) +9. **sophora-indexing-service** - Added httproute.yaml template and values +10. **sophora-linkchecker** - Added httproute.yaml template and values +11. **sophora-media-finder** - Added httproute.yaml template and values +12. **sophora-metadata-supplier** - Added httproute.yaml template and values +13. **sophora-schema-docs** - Added httproute.yaml template and values +14. **sophora-seo-check** - Added httproute.yaml template and values +15. **sophora-server** - Added httproute.yaml template and values +16. **sophora-ugc** - Added httproute.yaml template and values +17. **sophora-webclient** - Added httproute.yaml template and values +18. **sophora-youtube-connector** - Added httproute.yaml template and values + +## Implementation Details + +### HTTPRoute Templates + +Each chart now includes a `templates/httproute.yaml` file that: +- Is conditionally created based on `httproute.enabled` value +- Uses the Gateway API v1 specification +- Supports parentRefs for Gateway attachment +- Supports hostname filtering +- Supports path matching (PathPrefix, Exact, or RegularExpression) +- Includes the same labels and annotations pattern as Ingress resources +- Routes traffic to the same backend service as the Ingress + +### Values.yaml Configuration + +Each chart's `values.yaml` file now includes an `httproute` section with the following configuration options: + +```yaml +httproute: + enabled: false # Whether to create HTTPRoute (disabled by default) + parentRefs: [] # Gateway references + hostnames: [] # Hostnames for routing + pathMatchType: PathPrefix # Path match type (PathPrefix, Exact, RegularExpression) + pathValue: / # Path value for matching + annotations: {} # Additional annotations +``` + +### Special Cases + +1. **sophora-image-access-service**: Supports multiple HTTPRoutes via `extraHTTPRoute` array, similar to its `extraIngress` support. + +2. **sophora-importer**: Already had HTTPRoute support with a more advanced configuration including custom rules and filters. + +3. **sophora-server**: Uses the server's HTTP port from `sophora.server.ports.http` configuration. + +## Usage Example + +To enable HTTPRoute for a chart deployment: + +```yaml +httproute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-system + hostnames: + - "myapp.example.com" + pathMatchType: PathPrefix + pathValue: / + annotations: + custom.annotation: "value" +``` + +## Migration Path + +Users can: +1. Continue using Ingress resources (default behavior) +2. Enable HTTPRoute alongside Ingress for testing +3. Migrate to HTTPRoute exclusively by disabling Ingress and enabling HTTPRoute + +All changes are backward compatible - existing deployments will continue to work without modification. + +## Gateway API Compatibility + +The HTTPRoute resources use the `gateway.networking.k8s.io/v1` API version, which is the stable Gateway API specification. diff --git a/charts/o-neko-catnip/templates/httproute.yaml b/charts/o-neko-catnip/templates/httproute.yaml new file mode 100644 index 00000000..08381e19 --- /dev/null +++ b/charts/o-neko-catnip/templates/httproute.yaml @@ -0,0 +1,29 @@ +{{- if .Values.httproute.enabled -}} +{{- $fullName := include "o-neko-catnip.fullname" . -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + labels: {{- include "o-neko-catnip.labels" . | nindent 4 }} + name: {{ $fullName }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- range .Values.httproute.hostnames }} + hostnames: + - {{ required "A hostname for the HTTPRoute must be provided in .Values.httproute.hostnames" . | quote }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: 8080 + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/o-neko-catnip/values.yaml b/charts/o-neko-catnip/values.yaml index a310e94f..9c98b6d9 100644 --- a/charts/o-neko-catnip/values.yaml +++ b/charts/o-neko-catnip/values.yaml @@ -119,6 +119,27 @@ ingress: defaultBackend: enabled: false +httproute: + ## @param httproute.enabled Whether to create an HTTPRoute resource (Gateway API) + enabled: false + ## @param httproute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + ## e.g. + ## parentRefs: + ## - name: my-gateway + ## namespace: gateway-namespace + parentRefs: [] + ## @param httproute.hostnames Array with hostnames used for the HTTPRoute + ## e.g. + ## hostnames: + ## - "catnip.oneko.com" + hostnames: [] + ## @param httproute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) + pathMatchType: PathPrefix + ## @param httproute.pathValue Path value for the HTTPRoute + pathValue: / + ## @param httproute.annotations annotations for the HTTPRoute + annotations: {} + ## @section Metrics and Alerting ## ## Specific for the use with the kube-prometheus-stack diff --git a/charts/o-neko/templates/httproute.yaml b/charts/o-neko/templates/httproute.yaml new file mode 100644 index 00000000..3cf88732 --- /dev/null +++ b/charts/o-neko/templates/httproute.yaml @@ -0,0 +1,29 @@ +{{- if .Values.httproute.enabled -}} +{{- $fullName := include "o-neko.fullname" . -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + labels: {{- include "o-neko.labels" . | nindent 4 }} + name: {{ $fullName }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- range .Values.httproute.hostnames }} + hostnames: + - {{ required "A hostname for the HTTPRoute must be provided in .Values.httproute.hostnames" . | quote }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: 8080 + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/o-neko/values.yaml b/charts/o-neko/values.yaml index d513decd..e5a2b37d 100644 --- a/charts/o-neko/values.yaml +++ b/charts/o-neko/values.yaml @@ -148,6 +148,27 @@ ingress: ## @param ingress.annotations annotations for the ingress annotations: {} +httproute: + ## @param httproute.enabled Whether to create an HTTPRoute resource (Gateway API) + enabled: false + ## @param httproute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + ## e.g. + ## parentRefs: + ## - name: my-gateway + ## namespace: gateway-namespace + parentRefs: [] + ## @param httproute.hostnames Array with hostnames used for the HTTPRoute + ## e.g. + ## hostnames: + ## - "oneko.my-company.com" + hostnames: [] + ## @param httproute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) + pathMatchType: PathPrefix + ## @param httproute.pathValue Path value for the HTTPRoute + pathValue: / + ## @param httproute.annotations annotations for the HTTPRoute + annotations: {} + ## @section Metrics ## ## Specific for the use with the kube-prometheus-stack diff --git a/charts/sophora-admin-dashboard/templates/httproute.yaml b/charts/sophora-admin-dashboard/templates/httproute.yaml new file mode 100644 index 00000000..ceeeebc6 --- /dev/null +++ b/charts/sophora-admin-dashboard/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} +{{- $fullName := include "sophora-admin-dashboard.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-admin-dashboard.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-admin-dashboard/values.yaml b/charts/sophora-admin-dashboard/values.yaml index 8f2ec588..8ac0c37f 100644 --- a/charts/sophora-admin-dashboard/values.yaml +++ b/charts/sophora-admin-dashboard/values.yaml @@ -208,6 +208,19 @@ ingress: # hosts: # - chart-example.local +httproute: + enabled: false + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace + parentRefs: [] + # hostnames: + # - "dashboard.example.com" + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + resources: requests: cpu: 50m diff --git a/charts/sophora-ai/templates/httproute.yaml b/charts/sophora-ai/templates/httproute.yaml new file mode 100644 index 00000000..210c2746 --- /dev/null +++ b/charts/sophora-ai/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-ai.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-ai.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-ai/values.yaml b/charts/sophora-ai/values.yaml index fa4c282b..9c815c36 100644 --- a/charts/sophora-ai/values.yaml +++ b/charts/sophora-ai/values.yaml @@ -216,6 +216,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + extraDeploy: [] # Extra volumes. diff --git a/charts/sophora-contentapi/templates/httproute.yaml b/charts/sophora-contentapi/templates/httproute.yaml new file mode 100644 index 00000000..93479e93 --- /dev/null +++ b/charts/sophora-contentapi/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-contentapi.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-contentapi.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-contentapi/values.yaml b/charts/sophora-contentapi/values.yaml index cdec409f..4ba145e1 100644 --- a/charts/sophora-contentapi/values.yaml +++ b/charts/sophora-contentapi/values.yaml @@ -70,6 +70,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + extraDeploy: [] podAnnotations: {} diff --git a/charts/sophora-image-access-service/templates/httproute.yaml b/charts/sophora-image-access-service/templates/httproute.yaml new file mode 100644 index 00000000..a89d9114 --- /dev/null +++ b/charts/sophora-image-access-service/templates/httproute.yaml @@ -0,0 +1,38 @@ +{{ $allHTTPRoutes := .Values.extraHTTPRoute -}} +{{ if .Values.httproute.enabled -}} + {{ $allHTTPRoutes = prepend $allHTTPRoutes .Values.httproute -}} +{{ end -}} +{{ $fullName := include "access-service.fullname" $ -}} +{{ $svcPort := $.Values.service.httpPort -}} +{{ range $index, $httproute := $allHTTPRoutes -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }}{{ eq $index 0 | ternary "" (printf "-%d" $index) }} + labels: + {{- include "access-service.labels" $ | nindent 4 }} + {{- with $httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with $httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if $httproute.hostnames }} + hostnames: + {{- range $httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ $httproute.pathMatchType | default "PathPrefix" }} + value: {{ $httproute.pathValue | default "/" }} +--- +{{ end }} diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index 9723935d..50cf5cda 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -79,6 +79,23 @@ extraIngress: [] # hosts: # tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + +extraHTTPRoute: [] + #- parentRefs: + # - name: my-gateway + # hostnames: + # - example.com + # pathMatchType: PathPrefix + # pathValue: / + # annotations: {} + serviceAccount: create: false diff --git a/charts/sophora-image-ai/templates/httproute.yaml b/charts/sophora-image-ai/templates/httproute.yaml new file mode 100644 index 00000000..bc008b20 --- /dev/null +++ b/charts/sophora-image-ai/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-image-ai.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-image-ai.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-image-ai/values.yaml b/charts/sophora-image-ai/values.yaml index 15ea492b..0daa8c95 100644 --- a/charts/sophora-image-ai/values.yaml +++ b/charts/sophora-image-ai/values.yaml @@ -63,6 +63,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + extraDeploy: [] # Extra volumes. diff --git a/charts/sophora-indexing-service/templates/httproute.yaml b/charts/sophora-indexing-service/templates/httproute.yaml new file mode 100644 index 00000000..e101bb98 --- /dev/null +++ b/charts/sophora-indexing-service/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-indexing-service.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-indexing-service.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-indexing-service/values.yaml b/charts/sophora-indexing-service/values.yaml index 25abc881..41cb60f9 100644 --- a/charts/sophora-indexing-service/values.yaml +++ b/charts/sophora-indexing-service/values.yaml @@ -93,6 +93,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + resources: requests: cpu: 1 diff --git a/charts/sophora-linkchecker/templates/httproute.yaml b/charts/sophora-linkchecker/templates/httproute.yaml new file mode 100644 index 00000000..13c97b05 --- /dev/null +++ b/charts/sophora-linkchecker/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-linkchecker.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-linkchecker.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-linkchecker/values.yaml b/charts/sophora-linkchecker/values.yaml index 5010b0b8..7ead8ef3 100644 --- a/charts/sophora-linkchecker/values.yaml +++ b/charts/sophora-linkchecker/values.yaml @@ -70,6 +70,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + extraDeploy: [] podAnnotations: {} diff --git a/charts/sophora-media-finder/templates/httproute.yaml b/charts/sophora-media-finder/templates/httproute.yaml new file mode 100644 index 00000000..2c90de00 --- /dev/null +++ b/charts/sophora-media-finder/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-media-finder.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-media-finder.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-media-finder/values.yaml b/charts/sophora-media-finder/values.yaml index f4af6c01..bdf0790f 100644 --- a/charts/sophora-media-finder/values.yaml +++ b/charts/sophora-media-finder/values.yaml @@ -34,6 +34,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + startupProbe: path: /actuator/health failureThreshold: 15 diff --git a/charts/sophora-metadata-supplier/templates/httproute.yaml b/charts/sophora-metadata-supplier/templates/httproute.yaml new file mode 100644 index 00000000..a25e1334 --- /dev/null +++ b/charts/sophora-metadata-supplier/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-metadata-supplier.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-metadata-supplier.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-metadata-supplier/values.yaml b/charts/sophora-metadata-supplier/values.yaml index 0472cfb2..6722db15 100644 --- a/charts/sophora-metadata-supplier/values.yaml +++ b/charts/sophora-metadata-supplier/values.yaml @@ -99,6 +99,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + prometheusRule: enabled: false defaultRules: diff --git a/charts/sophora-schema-docs/templates/httproute.yaml b/charts/sophora-schema-docs/templates/httproute.yaml new file mode 100644 index 00000000..849dd9a2 --- /dev/null +++ b/charts/sophora-schema-docs/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-schema-docs.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-schema-docs.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-schema-docs/values.yaml b/charts/sophora-schema-docs/values.yaml index 48afb1ff..0ebd8428 100644 --- a/charts/sophora-schema-docs/values.yaml +++ b/charts/sophora-schema-docs/values.yaml @@ -103,6 +103,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + extraDeploy: [] podAnnotations: {} diff --git a/charts/sophora-seo-check/templates/httproute.yaml b/charts/sophora-seo-check/templates/httproute.yaml new file mode 100644 index 00000000..92090496 --- /dev/null +++ b/charts/sophora-seo-check/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-seo-check.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-seo-check.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-seo-check/values.yaml b/charts/sophora-seo-check/values.yaml index 05ff4884..689c52be 100644 --- a/charts/sophora-seo-check/values.yaml +++ b/charts/sophora-seo-check/values.yaml @@ -54,6 +54,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + extraDeploy: [] podAnnotations: {} diff --git a/charts/sophora-server/templates/httproute.yaml b/charts/sophora-server/templates/httproute.yaml new file mode 100644 index 00000000..27e43a35 --- /dev/null +++ b/charts/sophora-server/templates/httproute.yaml @@ -0,0 +1,31 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-server.fullname" . -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: {{ include "sophora-server.topLevelLabels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ .Values.sophora.server.ports.http }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index 046d3885..c814d525 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -365,6 +365,19 @@ ingress: # hosts: # - chart-example.local +httproute: + enabled: false + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace + parentRefs: [] + # hostnames: + # - "server.example.com" + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + # This can be used to configure a different ingress for the SRPC service as it might require different settings. # The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC # The paths can be regex-matched since all SRPC-calls have the root-path sophora.srpc diff --git a/charts/sophora-ugc/templates/httproute.yaml b/charts/sophora-ugc/templates/httproute.yaml new file mode 100644 index 00000000..bfdbcf69 --- /dev/null +++ b/charts/sophora-ugc/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-ugc.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-ugc.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-ugc/values.yaml b/charts/sophora-ugc/values.yaml index e1e5ba97..e8e878da 100644 --- a/charts/sophora-ugc/values.yaml +++ b/charts/sophora-ugc/values.yaml @@ -24,6 +24,14 @@ ingress: hosts: annotations: {} +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + authentication: secret: diff --git a/charts/sophora-webclient/templates/httproute.yaml b/charts/sophora-webclient/templates/httproute.yaml new file mode 100644 index 00000000..28cb0e1d --- /dev/null +++ b/charts/sophora-webclient/templates/httproute.yaml @@ -0,0 +1,30 @@ +{{- if .Values.httproute.enabled -}} +{{- $fullName := include "webclient.fullname" . -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: 8080 + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-webclient/values.yaml b/charts/sophora-webclient/values.yaml index 1ad30b17..0674dda0 100644 --- a/charts/sophora-webclient/values.yaml +++ b/charts/sophora-webclient/values.yaml @@ -50,6 +50,14 @@ ingress: hosts: annotations: {} +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + service: type: ClusterIP port: 8080 diff --git a/charts/sophora-youtube-connector/templates/httproute.yaml b/charts/sophora-youtube-connector/templates/httproute.yaml new file mode 100644 index 00000000..78f8eca2 --- /dev/null +++ b/charts/sophora-youtube-connector/templates/httproute.yaml @@ -0,0 +1,33 @@ +{{- if .Values.httproute.enabled -}} + {{- $fullName := include "sophora-youtube-connector.fullname" . -}} + {{- $svcPort := .Values.service.port -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + labels: + {{- include "sophora-youtube-connector.labels" . | nindent 4 }} + {{- with .Values.httproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.httproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.httproute.hostnames }} + hostnames: + {{- range .Values.httproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} + matches: + - path: + type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httproute.pathValue | default "/" }} +{{- end }} diff --git a/charts/sophora-youtube-connector/values.yaml b/charts/sophora-youtube-connector/values.yaml index 94b655f9..e21d08ca 100644 --- a/charts/sophora-youtube-connector/values.yaml +++ b/charts/sophora-youtube-connector/values.yaml @@ -47,6 +47,14 @@ ingress: hosts: tls: [] +httproute: + enabled: false + parentRefs: [] + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + serviceAccount: create: annotations: From 996e8b6bcf8c952b7eea06e37ed64ba9aeeec28a Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 10:31:39 +0100 Subject: [PATCH 02/26] All chart versions have been incremented following semantic versioning (minor version bump) --- HTTPROUTE_CHANGES.md | 38 +++++++++---------- charts/o-neko-catnip/Chart.yaml | 4 +- charts/o-neko/Chart.yaml | 6 +-- charts/sophora-admin-dashboard/Chart.yaml | 4 +- charts/sophora-ai/Chart.yaml | 4 +- charts/sophora-contentapi/Chart.yaml | 4 +- .../sophora-image-access-service/Chart.yaml | 4 +- charts/sophora-image-ai/Chart.yaml | 4 +- charts/sophora-importer/Chart.yaml | 6 +-- charts/sophora-indexing-service/Chart.yaml | 4 +- charts/sophora-linkchecker/Chart.yaml | 4 +- charts/sophora-media-finder/Chart.yaml | 6 +-- charts/sophora-metadata-supplier/Chart.yaml | 4 +- charts/sophora-schema-docs/Chart.yaml | 4 +- charts/sophora-seo-check/Chart.yaml | 4 +- charts/sophora-server/Chart.yaml | 6 +-- charts/sophora-ugc/Chart.yaml | 6 +-- charts/sophora-webclient/Chart.yaml | 4 +- charts/sophora-youtube-connector/Chart.yaml | 6 +-- 19 files changed, 60 insertions(+), 62 deletions(-) diff --git a/HTTPROUTE_CHANGES.md b/HTTPROUTE_CHANGES.md index 7d8d3c4a..6af62efe 100644 --- a/HTTPROUTE_CHANGES.md +++ b/HTTPROUTE_CHANGES.md @@ -2,30 +2,30 @@ ## Summary -All Helm charts in the `helm-charts` repository that contain Kubernetes Ingress resources have been extended to also provide optional HTTPRoute resources for the Gateway API. +All Helm charts in the `helm-charts` repository that contain Kubernetes Ingress resources have been extended to also provide optional HTTPRoute resources for the Gateway API. Chart versions have been incremented to new minor versions to reflect these changes. ## Charts Updated The following 18 charts now support HTTPRoute (Gateway API) in addition to Ingress: -1. **o-neko** - Added httproute.yaml template and values -2. **o-neko-catnip** - Added httproute.yaml template and values -3. **sophora-admin-dashboard** - Added httproute.yaml template and values -4. **sophora-ai** - Added httproute.yaml template and values -5. **sophora-contentapi** - Added httproute.yaml template and values -6. **sophora-image-access-service** - Added httproute.yaml template and values (with support for multiple routes) -7. **sophora-image-ai** - Added httproute.yaml template and values -8. **sophora-importer** - HTTPRoute support already existed (no changes needed) -9. **sophora-indexing-service** - Added httproute.yaml template and values -10. **sophora-linkchecker** - Added httproute.yaml template and values -11. **sophora-media-finder** - Added httproute.yaml template and values -12. **sophora-metadata-supplier** - Added httproute.yaml template and values -13. **sophora-schema-docs** - Added httproute.yaml template and values -14. **sophora-seo-check** - Added httproute.yaml template and values -15. **sophora-server** - Added httproute.yaml template and values -16. **sophora-ugc** - Added httproute.yaml template and values -17. **sophora-webclient** - Added httproute.yaml template and values -18. **sophora-youtube-connector** - Added httproute.yaml template and values +1. **o-neko** - v2.0.1 → v2.1.0 +2. **o-neko-catnip** - v1.3.4 → v1.4.0 +3. **sophora-admin-dashboard** - v1.5.0 → v1.6.0 +4. **sophora-ai** - v2.0.4 → v2.1.0 +5. **sophora-contentapi** - v1.0.2 → v1.1.0 +6. **sophora-image-access-service** - v1.4.0 → v1.5.0 +7. **sophora-image-ai** - v2.1.3 → v2.2.0 +8. **sophora-importer** - v2.4.1 → v2.5.0 (HTTPRoute support already existed, updated for consistency) +9. **sophora-indexing-service** - v1.5.0 → v1.6.0 +10. **sophora-linkchecker** - v0.1.4 → v0.2.0 +11. **sophora-media-finder** - v0.2.6 → v0.3.0 +12. **sophora-metadata-supplier** - v1.3.6 → v1.4.0 +13. **sophora-schema-docs** - v2.1.4 → v2.2.0 +14. **sophora-seo-check** - v1.0.3 → v1.1.0 +15. **sophora-server** - v3.1.2 → v3.2.0 +16. **sophora-ugc** - v2.0.15 → v2.1.0 +17. **sophora-webclient** - v1.4.5 → v1.5.0 +18. **sophora-youtube-connector** - v1.2.4 → v1.3.0 ## Implementation Details diff --git a/charts/o-neko-catnip/Chart.yaml b/charts/o-neko-catnip/Chart.yaml index f9afcf75..b303bb3b 100644 --- a/charts/o-neko-catnip/Chart.yaml +++ b/charts/o-neko-catnip/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: o-neko-catnip description: A Helm chart for the O-Neko URL trigger type: application -version: 1.3.4 +version: 1.4.0 annotations: artifacthub.io/changes: | - kind: added - description: "added Artifacthub changelog annotation" + description: "Added HTTPRoute support for Gateway API" appVersion: "1.3.2" sources: diff --git a/charts/o-neko/Chart.yaml b/charts/o-neko/Chart.yaml index f24817ad..750ee4da 100644 --- a/charts/o-neko/Chart.yaml +++ b/charts/o-neko/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: o-neko description: A Helm chart for O-Neko type: application -version: 2.0.1 +version: 2.1.0 annotations: artifacthub.io/changes: | - - kind: changed - description: "Updated O-Neko to 1.8.2" + - kind: added + description: "Added HTTPRoute support for Gateway API" appVersion: "1.8.2" sources: diff --git a/charts/sophora-admin-dashboard/Chart.yaml b/charts/sophora-admin-dashboard/Chart.yaml index 79381ded..e821fe2b 100644 --- a/charts/sophora-admin-dashboard/Chart.yaml +++ b/charts/sophora-admin-dashboard/Chart.yaml @@ -13,8 +13,8 @@ icon: https://subshell.com/logos/admindashboard104~1x1.1683631966185.png # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.5.0 +version: 1.6.0 annotations: artifacthub.io/changes: | - kind: added - description: "add configs useExternalUrl and usesV2Api." + description: "Added HTTPRoute support for Gateway API" diff --git a/charts/sophora-ai/Chart.yaml b/charts/sophora-ai/Chart.yaml index 40f583fb..4e842d21 100644 --- a/charts/sophora-ai/Chart.yaml +++ b/charts/sophora-ai/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-ai description: Sophora AI type: application -version: 2.0.4 +version: 2.1.0 annotations: artifacthub.io/changes: | - kind: added - description: added configuration for new Reader Copy feature + description: "Added HTTPRoute support for Gateway API" appVersion: 1.5.5 sources: diff --git a/charts/sophora-contentapi/Chart.yaml b/charts/sophora-contentapi/Chart.yaml index 3c949bec..df7cd263 100644 --- a/charts/sophora-contentapi/Chart.yaml +++ b/charts/sophora-contentapi/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-contentapi description: Sophora Content API type: application -version: 1.0.2 +version: 1.1.0 annotations: artifacthub.io/changes: | - kind: added - description: "added Artifacthub changelog annotation" + description: "Added HTTPRoute support for Gateway API" appVersion: 6.0.0 sources: diff --git a/charts/sophora-image-access-service/Chart.yaml b/charts/sophora-image-access-service/Chart.yaml index 7904346a..a6ba8569 100644 --- a/charts/sophora-image-access-service/Chart.yaml +++ b/charts/sophora-image-access-service/Chart.yaml @@ -15,11 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.4.0 +version: 1.5.0 annotations: artifacthub.io/changes: | - kind: added - description: "added Artifacthub changelog annotation" + description: "Added HTTPRoute support for Gateway API" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sophora-image-ai/Chart.yaml b/charts/sophora-image-ai/Chart.yaml index b20f4a8a..0ad3be99 100644 --- a/charts/sophora-image-ai/Chart.yaml +++ b/charts/sophora-image-ai/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-image-ai description: Sophora Image AI type: application -version: 2.1.3 +version: 2.2.0 annotations: artifacthub.io/changes: | - kind: added - description: "allow configuration of resources" + description: "Added HTTPRoute support for Gateway API" appVersion: 5.1.0 sources: diff --git a/charts/sophora-importer/Chart.yaml b/charts/sophora-importer/Chart.yaml index 3c82e75f..52fddb6f 100644 --- a/charts/sophora-importer/Chart.yaml +++ b/charts/sophora-importer/Chart.yaml @@ -15,11 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.4.1 +version: 2.5.0 annotations: artifacthub.io/changes: | - - kind: fixed - description: "fix service Port of httproute" + - kind: changed + description: "Updated HTTPRoute configuration for consistency" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sophora-indexing-service/Chart.yaml b/charts/sophora-indexing-service/Chart.yaml index 746119d9..bc4ff067 100644 --- a/charts/sophora-indexing-service/Chart.yaml +++ b/charts/sophora-indexing-service/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-indexing-service description: Sophora Indexing Service (SISI) type: application -version: 1.5.0 +version: 1.6.0 annotations: artifacthub.io/changes: | - kind: added - description: "added extra volumes and extra volume mounts" + description: "Added HTTPRoute support for Gateway API" appVersion: '5.4.1' sources: diff --git a/charts/sophora-linkchecker/Chart.yaml b/charts/sophora-linkchecker/Chart.yaml index f8aa42bc..7ec543b3 100644 --- a/charts/sophora-linkchecker/Chart.yaml +++ b/charts/sophora-linkchecker/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-linkchecker description: Sophora Link Checker type: application -version: 0.1.4 +version: 0.2.0 annotations: artifacthub.io/changes: | - kind: added - description: "added Artifacthub changelog annotation" + description: "Added HTTPRoute support for Gateway API" appVersion: 6.0.0 sources: diff --git a/charts/sophora-media-finder/Chart.yaml b/charts/sophora-media-finder/Chart.yaml index 54f59f0a..cacd7b49 100644 --- a/charts/sophora-media-finder/Chart.yaml +++ b/charts/sophora-media-finder/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-media-finder description: A Helm chart for Sophora Media Finder type: application -version: 0.2.6 +version: 0.3.0 annotations: artifacthub.io/changes: | - - kind: changed - description: "make apiKey configuration optional" + - kind: added + description: "Added HTTPRoute support for Gateway API" appVersion: "5.x" sources: diff --git a/charts/sophora-metadata-supplier/Chart.yaml b/charts/sophora-metadata-supplier/Chart.yaml index fb28f51d..60966c53 100644 --- a/charts/sophora-metadata-supplier/Chart.yaml +++ b/charts/sophora-metadata-supplier/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-metadata-supplier description: Sophora Metadata Supplier (SMS) type: application -version: 1.3.6 +version: 1.4.0 annotations: artifacthub.io/changes: | - kind: added - description: "add extraDeploy as new value to allow extra resources to be deployed" + description: "Added HTTPRoute support for Gateway API" appVersion: '4.14.0' sources: diff --git a/charts/sophora-schema-docs/Chart.yaml b/charts/sophora-schema-docs/Chart.yaml index f98b4ff2..e5bee7dd 100644 --- a/charts/sophora-schema-docs/Chart.yaml +++ b/charts/sophora-schema-docs/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-schema-docs description: Sophora Schema Docs type: application -version: 2.1.4 +version: 2.2.0 annotations: artifacthub.io/changes: | - kind: added - description: "added Artifacthub changelog annotation" + description: "Added HTTPRoute support for Gateway API" appVersion: 5.0.0 sources: diff --git a/charts/sophora-seo-check/Chart.yaml b/charts/sophora-seo-check/Chart.yaml index cf2cb47a..f15e88a2 100644 --- a/charts/sophora-seo-check/Chart.yaml +++ b/charts/sophora-seo-check/Chart.yaml @@ -2,11 +2,11 @@ apiVersion: v2 name: sophora-seo-check description: Sophora SEO Check type: application -version: 1.0.3 +version: 1.1.0 annotations: artifacthub.io/changes: | - kind: added - description: "added Artifacthub changelog annotation" + description: "Added HTTPRoute support for Gateway API" appVersion: 4.12.0 sources: diff --git a/charts/sophora-server/Chart.yaml b/charts/sophora-server/Chart.yaml index f173678b..470834c6 100644 --- a/charts/sophora-server/Chart.yaml +++ b/charts/sophora-server/Chart.yaml @@ -15,13 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.1.2 +version: 3.2.0 annotations: artifacthub.io/changes: | - kind: "added" - description: "New derby configuration sophora.server.persistence.derby.derbyStoragePageCacheSize" - - kind: "added" - description: "New derby configuration sophora.server.persistence.derby.searchIndexCacheSize" + description: "Added HTTPRoute support for Gateway API" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sophora-ugc/Chart.yaml b/charts/sophora-ugc/Chart.yaml index ca60fd15..ff498bc8 100644 --- a/charts/sophora-ugc/Chart.yaml +++ b/charts/sophora-ugc/Chart.yaml @@ -15,11 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.0.15 +version: 2.1.0 annotations: artifacthub.io/changes: | - - kind: fixed - description: "removed oracle from readme and test-values" + - kind: added + description: "Added HTTPRoute support for Gateway API" artifacthub.io/links: | - name: Documentation for Sophora UGC url: https://subshell.com/docs/ugc/ diff --git a/charts/sophora-webclient/Chart.yaml b/charts/sophora-webclient/Chart.yaml index 65d3cec3..2687b4a1 100644 --- a/charts/sophora-webclient/Chart.yaml +++ b/charts/sophora-webclient/Chart.yaml @@ -6,11 +6,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.4.5 +version: 1.5.0 annotations: artifacthub.io/changes: | - kind: added - description: "allow to configure service annotations" + description: "Added HTTPRoute support for Gateway API" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sophora-youtube-connector/Chart.yaml b/charts/sophora-youtube-connector/Chart.yaml index a4febfc6..d5cf5c86 100644 --- a/charts/sophora-youtube-connector/Chart.yaml +++ b/charts/sophora-youtube-connector/Chart.yaml @@ -15,11 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.2.4 +version: 1.3.0 annotations: artifacthub.io/changes: | - - kind: changed - description: "bump alpine-toolkit image version to 0.2.0 to update curl" + - kind: added + description: "Added HTTPRoute support for Gateway API" artifacthub.io/links: | - name: Documentation for the AV Tool url: https://subshell.com/docs/avtool/ From 5b96abd96bd97c6b297135ace30083f15c91b777 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 10:52:36 +0100 Subject: [PATCH 03/26] update test-values.yamls with httproute values --- charts/sophora-admin-dashboard/test-values.yaml | 8 ++++++++ charts/sophora-ai/test-values.yaml | 8 ++++++++ charts/sophora-contentapi/test-values.yaml | 8 ++++++++ .../sophora-image-access-service/test-values.yaml | 15 +++++++++++++++ charts/sophora-image-ai/test-values.yaml | 8 ++++++++ charts/sophora-indexing-service/test-values.yaml | 8 ++++++++ charts/sophora-linkchecker/test-values.yaml | 8 ++++++++ charts/sophora-metadata-supplier/test-values.yaml | 8 ++++++++ charts/sophora-schema-docs/test-values.yaml | 8 ++++++++ charts/sophora-seo-check/test-values.yaml | 8 ++++++++ charts/sophora-server/test-values.yaml | 8 ++++++++ charts/sophora-ugc/test-values.yaml | 8 ++++++++ charts/sophora-webclient/test-values.yaml | 8 ++++++++ 13 files changed, 111 insertions(+) diff --git a/charts/sophora-admin-dashboard/test-values.yaml b/charts/sophora-admin-dashboard/test-values.yaml index 13ff7f72..356ddb6c 100644 --- a/charts/sophora-admin-dashboard/test-values.yaml +++ b/charts/sophora-admin-dashboard/test-values.yaml @@ -13,6 +13,14 @@ ingress: enabled: true ingressClassName: nginx +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "dashboard.test.example.com" + storageClassName: "ssd" sophora: diff --git a/charts/sophora-ai/test-values.yaml b/charts/sophora-ai/test-values.yaml index 1a22294e..19e42373 100644 --- a/charts/sophora-ai/test-values.yaml +++ b/charts/sophora-ai/test-values.yaml @@ -141,6 +141,14 @@ ingress: hosts: tls: [] +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "ai.test.example.com" + serviceAccount: create: true automount: true diff --git a/charts/sophora-contentapi/test-values.yaml b/charts/sophora-contentapi/test-values.yaml index 27cd6194..59e02a21 100644 --- a/charts/sophora-contentapi/test-values.yaml +++ b/charts/sophora-contentapi/test-values.yaml @@ -42,3 +42,11 @@ ingress: annotations: {} hosts: tls: [] + +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "contentapi.test.example.com" diff --git a/charts/sophora-image-access-service/test-values.yaml b/charts/sophora-image-access-service/test-values.yaml index b6c0f3da..6da4677d 100644 --- a/charts/sophora-image-access-service/test-values.yaml +++ b/charts/sophora-image-access-service/test-values.yaml @@ -46,5 +46,20 @@ extraIngress: hosts: tls: [] +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "image-access.test.example.com" + +extraHTTPRoute: + - parentRefs: + - name: test-gateway-2 + namespace: gateway-system + hostnames: + - "image-access-2.test.example.com" + extraDeploy: - apiVersion: subshell/v2 diff --git a/charts/sophora-image-ai/test-values.yaml b/charts/sophora-image-ai/test-values.yaml index 47313d39..0f8bf528 100644 --- a/charts/sophora-image-ai/test-values.yaml +++ b/charts/sophora-image-ai/test-values.yaml @@ -43,6 +43,14 @@ ingress: hosts: tls: [] +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "image-ai.test.example.com" + serviceAccount: create: true automount: true diff --git a/charts/sophora-indexing-service/test-values.yaml b/charts/sophora-indexing-service/test-values.yaml index 38a425b2..d787845e 100644 --- a/charts/sophora-indexing-service/test-values.yaml +++ b/charts/sophora-indexing-service/test-values.yaml @@ -48,6 +48,14 @@ ingress: hosts: tls: [] +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "indexing-service.test.example.com" + serviceMonitor: enabled: true path: /test/prometheus diff --git a/charts/sophora-linkchecker/test-values.yaml b/charts/sophora-linkchecker/test-values.yaml index 0fbb4d6c..c81aeb77 100644 --- a/charts/sophora-linkchecker/test-values.yaml +++ b/charts/sophora-linkchecker/test-values.yaml @@ -42,3 +42,11 @@ ingress: annotations: {} hosts: tls: [] + +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "linkchecker.test.example.com" diff --git a/charts/sophora-metadata-supplier/test-values.yaml b/charts/sophora-metadata-supplier/test-values.yaml index 8df7d510..b627e135 100644 --- a/charts/sophora-metadata-supplier/test-values.yaml +++ b/charts/sophora-metadata-supplier/test-values.yaml @@ -65,6 +65,14 @@ ingress: hosts: tls: [] +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "metadata-supplier.test.example.com" + serviceMonitor: enabled: true path: /test/prometheus diff --git a/charts/sophora-schema-docs/test-values.yaml b/charts/sophora-schema-docs/test-values.yaml index ce91dac4..afb2539d 100644 --- a/charts/sophora-schema-docs/test-values.yaml +++ b/charts/sophora-schema-docs/test-values.yaml @@ -42,3 +42,11 @@ ingress: annotations: {} hosts: tls: [] + +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "schema-docs.test.example.com" diff --git a/charts/sophora-seo-check/test-values.yaml b/charts/sophora-seo-check/test-values.yaml index e31c9151..31b391e4 100644 --- a/charts/sophora-seo-check/test-values.yaml +++ b/charts/sophora-seo-check/test-values.yaml @@ -44,6 +44,14 @@ ingress: hosts: tls: [] +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "seo-check.test.example.com" + extraDeploy: [] podAnnotations: {} diff --git a/charts/sophora-server/test-values.yaml b/charts/sophora-server/test-values.yaml index 9934bad5..c105ce50 100644 --- a/charts/sophora-server/test-values.yaml +++ b/charts/sophora-server/test-values.yaml @@ -127,6 +127,14 @@ ingress: hosts: - host: "sophora.domain.de" +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "sophora-server.test.example.com" + grpcIngress: ingressClassName: nginx annotations: diff --git a/charts/sophora-ugc/test-values.yaml b/charts/sophora-ugc/test-values.yaml index 087d275b..afa9001b 100644 --- a/charts/sophora-ugc/test-values.yaml +++ b/charts/sophora-ugc/test-values.yaml @@ -10,6 +10,14 @@ ingress: hosts: - host: "my-site.com" +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "ugc.test.example.com" + authentication: secret: server: diff --git a/charts/sophora-webclient/test-values.yaml b/charts/sophora-webclient/test-values.yaml index cf9f4b50..99310eb3 100644 --- a/charts/sophora-webclient/test-values.yaml +++ b/charts/sophora-webclient/test-values.yaml @@ -13,6 +13,14 @@ ingress: hosts: - host: "my-site.com" +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "webclient.test.example.com" + webclient: configuration: abc: test From 425a01230b7065dd8877fca9d6923cb17fbd2b6d Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 11:25:30 +0100 Subject: [PATCH 04/26] sophora-server: add grpc-httproute --- .../templates/grpc-httproute.yaml | 32 ++++++++++++++ charts/sophora-server/test-values.yaml | 25 +++++++---- charts/sophora-server/values.yaml | 42 +++++++++++++------ 3 files changed, 78 insertions(+), 21 deletions(-) create mode 100644 charts/sophora-server/templates/grpc-httproute.yaml diff --git a/charts/sophora-server/templates/grpc-httproute.yaml b/charts/sophora-server/templates/grpc-httproute.yaml new file mode 100644 index 00000000..1e47326f --- /dev/null +++ b/charts/sophora-server/templates/grpc-httproute.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.grpcHttproute.enabled .Values.sophora.grpcApi.enabled -}} + {{- $fullName := include "sophora-server.fullname" . -}} + {{- $routeName := printf "%s-grpc" ($fullName | trunc 58 | trimSuffix "-") }} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $routeName }} + labels: {{ include "sophora-server.topLevelLabels" . | nindent 4 }} + {{- with .Values.grpcHttproute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.grpcHttproute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.grpcHttproute.hostnames }} + hostnames: + {{- range .Values.grpcHttproute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ .Values.sophora.server.ports.grpc }} + matches: + - path: + type: {{ .Values.grpcHttproute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.grpcHttproute.pathValue | default "/sophora.srpc" }} +{{- end }} diff --git a/charts/sophora-server/test-values.yaml b/charts/sophora-server/test-values.yaml index c105ce50..a33f2524 100644 --- a/charts/sophora-server/test-values.yaml +++ b/charts/sophora-server/test-values.yaml @@ -127,15 +127,8 @@ ingress: hosts: - host: "sophora.domain.de" -httproute: - enabled: true - parentRefs: - - name: test-gateway - namespace: gateway-system - hostnames: - - "sophora-server.test.example.com" - grpcIngress: + enabled: true ingressClassName: nginx annotations: nginx.ingress.kubernetes.io/use-regex: "true" @@ -144,6 +137,22 @@ grpcIngress: - host: "sophora.domain.de" path: /sophora\.srpc.* +httproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "sophora-server.test.example.com" + +grpcHttproute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "sophora-server.test.example.com" + extraDeploy: - | apiVersion: keda.sh/v1alpha1 diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index c814d525..e80a691b 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -365,19 +365,6 @@ ingress: # hosts: # - chart-example.local -httproute: - enabled: false - # parentRefs: - # - name: my-gateway - # namespace: gateway-namespace - parentRefs: [] - # hostnames: - # - "server.example.com" - hostnames: [] - pathMatchType: PathPrefix - pathValue: / - annotations: {} - # This can be used to configure a different ingress for the SRPC service as it might require different settings. # The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC # The paths can be regex-matched since all SRPC-calls have the root-path sophora.srpc @@ -398,6 +385,35 @@ grpcIngress: # hosts: # - chart-example.local +httproute: + enabled: false + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace + parentRefs: [] + # hostnames: + # - "server.example.com" + hostnames: [] + pathMatchType: PathPrefix + pathValue: / + annotations: {} + +# This can be used to configure a different HttpRoute for the SRPC service as it might require different settings. +# The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC +# The paths can be regex-matched since all SRPC-calls have the root-path sophora.srpc +grpcHttproute: + enabled: false + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace + parentRefs: [] + # hostnames: + # - "server.example.com" + hostnames: [] + pathMatchType: PathPrefix + pathValue: /sophora.srpc + annotations: {} + service: annotations: {} headlessAnnotations: {} From a95073b6b2801304ec3439f9d709fd0b1eb54888 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 11:48:43 +0100 Subject: [PATCH 05/26] [sophora-webclient] use service.port of values for ingress and HttpRoute --- charts/sophora-webclient/templates/httproute.yaml | 2 +- charts/sophora-webclient/templates/ingress.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/sophora-webclient/templates/httproute.yaml b/charts/sophora-webclient/templates/httproute.yaml index 28cb0e1d..40f30161 100644 --- a/charts/sophora-webclient/templates/httproute.yaml +++ b/charts/sophora-webclient/templates/httproute.yaml @@ -22,7 +22,7 @@ spec: rules: - backendRefs: - name: {{ $fullName }} - port: 8080 + port: {{ .Values.service.port }} matches: - path: type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} diff --git a/charts/sophora-webclient/templates/ingress.yaml b/charts/sophora-webclient/templates/ingress.yaml index 5ea992c4..d29a01a2 100644 --- a/charts/sophora-webclient/templates/ingress.yaml +++ b/charts/sophora-webclient/templates/ingress.yaml @@ -33,6 +33,6 @@ spec: service: name: {{ $fullName }} port: - number: 8080 + number: {{ .Values.service.port }} {{- end }} {{- end }} \ No newline at end of file From 4cf5855ceed34e5296ca1f9d3b3f77b1b2b8c2cf Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 11:51:27 +0100 Subject: [PATCH 06/26] updated HTTPROUTE_CHANGES to reflect manual addition for grpcHttproute --- HTTPROUTE_CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HTTPROUTE_CHANGES.md b/HTTPROUTE_CHANGES.md index 6af62efe..86a3f8fa 100644 --- a/HTTPROUTE_CHANGES.md +++ b/HTTPROUTE_CHANGES.md @@ -60,7 +60,7 @@ httproute: 2. **sophora-importer**: Already had HTTPRoute support with a more advanced configuration including custom rules and filters. -3. **sophora-server**: Uses the server's HTTP port from `sophora.server.ports.http` configuration. +3. **sophora-server**: Supports additional HTTPRoute for gRPC serivce via `grpcHttproute`, similar to its `grpcIngress` support. ## Usage Example From b7343a61626ce9877252a6a743e4b59c8e6dbd34 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 11:54:54 +0100 Subject: [PATCH 07/26] rename values to `httpRoute` --- charts/o-neko-catnip/templates/httproute.yaml | 14 +++++++------- charts/o-neko-catnip/values.yaml | 14 +++++++------- charts/o-neko/templates/httproute.yaml | 14 +++++++------- charts/o-neko/values.yaml | 14 +++++++------- .../templates/httproute.yaml | 14 +++++++------- charts/sophora-admin-dashboard/test-values.yaml | 2 +- charts/sophora-admin-dashboard/values.yaml | 2 +- charts/sophora-ai/templates/httproute.yaml | 14 +++++++------- charts/sophora-ai/test-values.yaml | 2 +- charts/sophora-ai/values.yaml | 2 +- charts/sophora-contentapi/templates/httproute.yaml | 14 +++++++------- charts/sophora-contentapi/test-values.yaml | 2 +- charts/sophora-contentapi/values.yaml | 2 +- .../templates/httproute.yaml | 4 ++-- .../sophora-image-access-service/test-values.yaml | 2 +- charts/sophora-image-access-service/values.yaml | 2 +- charts/sophora-image-ai/templates/httproute.yaml | 14 +++++++------- charts/sophora-image-ai/test-values.yaml | 2 +- charts/sophora-image-ai/values.yaml | 2 +- .../templates/httproute.yaml | 14 +++++++------- charts/sophora-indexing-service/test-values.yaml | 2 +- charts/sophora-indexing-service/values.yaml | 2 +- .../sophora-linkchecker/templates/httproute.yaml | 14 +++++++------- charts/sophora-linkchecker/test-values.yaml | 2 +- charts/sophora-linkchecker/values.yaml | 2 +- .../sophora-media-finder/templates/httproute.yaml | 14 +++++++------- charts/sophora-media-finder/values.yaml | 2 +- .../templates/httproute.yaml | 14 +++++++------- charts/sophora-metadata-supplier/test-values.yaml | 2 +- charts/sophora-metadata-supplier/values.yaml | 2 +- .../sophora-schema-docs/templates/httproute.yaml | 14 +++++++------- charts/sophora-schema-docs/test-values.yaml | 2 +- charts/sophora-schema-docs/values.yaml | 2 +- charts/sophora-seo-check/templates/httproute.yaml | 14 +++++++------- charts/sophora-seo-check/test-values.yaml | 2 +- charts/sophora-seo-check/values.yaml | 2 +- charts/sophora-server/templates/httproute.yaml | 14 +++++++------- charts/sophora-server/test-values.yaml | 2 +- charts/sophora-server/values.yaml | 2 +- charts/sophora-ugc/templates/httproute.yaml | 14 +++++++------- charts/sophora-ugc/test-values.yaml | 2 +- charts/sophora-ugc/values.yaml | 2 +- charts/sophora-webclient/templates/httproute.yaml | 14 +++++++------- charts/sophora-webclient/test-values.yaml | 2 +- charts/sophora-webclient/values.yaml | 2 +- .../templates/httproute.yaml | 14 +++++++------- charts/sophora-youtube-connector/values.yaml | 2 +- 47 files changed, 156 insertions(+), 156 deletions(-) diff --git a/charts/o-neko-catnip/templates/httproute.yaml b/charts/o-neko-catnip/templates/httproute.yaml index 08381e19..842951b8 100644 --- a/charts/o-neko-catnip/templates/httproute.yaml +++ b/charts/o-neko-catnip/templates/httproute.yaml @@ -1,22 +1,22 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "o-neko-catnip.fullname" . -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: labels: {{- include "o-neko-catnip.labels" . | nindent 4 }} name: {{ $fullName }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} hostnames: - - {{ required "A hostname for the HTTPRoute must be provided in .Values.httproute.hostnames" . | quote }} + - {{ required "A hostname for the HTTPRoute must be provided in .Values.httpRoute.hostnames" . | quote }} {{- end }} rules: - backendRefs: @@ -24,6 +24,6 @@ spec: port: 8080 matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/o-neko-catnip/values.yaml b/charts/o-neko-catnip/values.yaml index 9c98b6d9..3744a944 100644 --- a/charts/o-neko-catnip/values.yaml +++ b/charts/o-neko-catnip/values.yaml @@ -119,25 +119,25 @@ ingress: defaultBackend: enabled: false -httproute: - ## @param httproute.enabled Whether to create an HTTPRoute resource (Gateway API) +httpRoute: + ## @param httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false - ## @param httproute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + ## @param httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to ## e.g. ## parentRefs: ## - name: my-gateway ## namespace: gateway-namespace parentRefs: [] - ## @param httproute.hostnames Array with hostnames used for the HTTPRoute + ## @param httpRoute.hostnames Array with hostnames used for the HTTPRoute ## e.g. ## hostnames: ## - "catnip.oneko.com" hostnames: [] - ## @param httproute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) + ## @param httpRoute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) pathMatchType: PathPrefix - ## @param httproute.pathValue Path value for the HTTPRoute + ## @param httpRoute.pathValue Path value for the HTTPRoute pathValue: / - ## @param httproute.annotations annotations for the HTTPRoute + ## @param httpRoute.annotations annotations for the HTTPRoute annotations: {} ## @section Metrics and Alerting diff --git a/charts/o-neko/templates/httproute.yaml b/charts/o-neko/templates/httproute.yaml index 3cf88732..861b0cd2 100644 --- a/charts/o-neko/templates/httproute.yaml +++ b/charts/o-neko/templates/httproute.yaml @@ -1,22 +1,22 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "o-neko.fullname" . -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: labels: {{- include "o-neko.labels" . | nindent 4 }} name: {{ $fullName }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} hostnames: - - {{ required "A hostname for the HTTPRoute must be provided in .Values.httproute.hostnames" . | quote }} + - {{ required "A hostname for the HTTPRoute must be provided in .Values.httpRoute.hostnames" . | quote }} {{- end }} rules: - backendRefs: @@ -24,6 +24,6 @@ spec: port: 8080 matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/o-neko/values.yaml b/charts/o-neko/values.yaml index e5a2b37d..eac4fd1d 100644 --- a/charts/o-neko/values.yaml +++ b/charts/o-neko/values.yaml @@ -148,25 +148,25 @@ ingress: ## @param ingress.annotations annotations for the ingress annotations: {} -httproute: - ## @param httproute.enabled Whether to create an HTTPRoute resource (Gateway API) +httpRoute: + ## @param httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false - ## @param httproute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + ## @param httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to ## e.g. ## parentRefs: ## - name: my-gateway ## namespace: gateway-namespace parentRefs: [] - ## @param httproute.hostnames Array with hostnames used for the HTTPRoute + ## @param httpRoute.hostnames Array with hostnames used for the HTTPRoute ## e.g. ## hostnames: ## - "oneko.my-company.com" hostnames: [] - ## @param httproute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) + ## @param httpRoute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) pathMatchType: PathPrefix - ## @param httproute.pathValue Path value for the HTTPRoute + ## @param httpRoute.pathValue Path value for the HTTPRoute pathValue: / - ## @param httproute.annotations annotations for the HTTPRoute + ## @param httpRoute.annotations annotations for the HTTPRoute annotations: {} ## @section Metrics diff --git a/charts/sophora-admin-dashboard/templates/httproute.yaml b/charts/sophora-admin-dashboard/templates/httproute.yaml index ceeeebc6..44135402 100644 --- a/charts/sophora-admin-dashboard/templates/httproute.yaml +++ b/charts/sophora-admin-dashboard/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-admin-dashboard.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-admin-dashboard.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-admin-dashboard/test-values.yaml b/charts/sophora-admin-dashboard/test-values.yaml index 356ddb6c..7890e641 100644 --- a/charts/sophora-admin-dashboard/test-values.yaml +++ b/charts/sophora-admin-dashboard/test-values.yaml @@ -13,7 +13,7 @@ ingress: enabled: true ingressClassName: nginx -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-admin-dashboard/values.yaml b/charts/sophora-admin-dashboard/values.yaml index 8ac0c37f..542536ad 100644 --- a/charts/sophora-admin-dashboard/values.yaml +++ b/charts/sophora-admin-dashboard/values.yaml @@ -208,7 +208,7 @@ ingress: # hosts: # - chart-example.local -httproute: +httpRoute: enabled: false # parentRefs: # - name: my-gateway diff --git a/charts/sophora-ai/templates/httproute.yaml b/charts/sophora-ai/templates/httproute.yaml index 210c2746..a77ad387 100644 --- a/charts/sophora-ai/templates/httproute.yaml +++ b/charts/sophora-ai/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-ai.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-ai.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-ai/test-values.yaml b/charts/sophora-ai/test-values.yaml index 19e42373..6e3a6310 100644 --- a/charts/sophora-ai/test-values.yaml +++ b/charts/sophora-ai/test-values.yaml @@ -141,7 +141,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-ai/values.yaml b/charts/sophora-ai/values.yaml index 9c815c36..25922e4a 100644 --- a/charts/sophora-ai/values.yaml +++ b/charts/sophora-ai/values.yaml @@ -216,7 +216,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-contentapi/templates/httproute.yaml b/charts/sophora-contentapi/templates/httproute.yaml index 93479e93..7283e7d0 100644 --- a/charts/sophora-contentapi/templates/httproute.yaml +++ b/charts/sophora-contentapi/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-contentapi.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-contentapi.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-contentapi/test-values.yaml b/charts/sophora-contentapi/test-values.yaml index 59e02a21..6c4c1667 100644 --- a/charts/sophora-contentapi/test-values.yaml +++ b/charts/sophora-contentapi/test-values.yaml @@ -43,7 +43,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-contentapi/values.yaml b/charts/sophora-contentapi/values.yaml index 4ba145e1..72524285 100644 --- a/charts/sophora-contentapi/values.yaml +++ b/charts/sophora-contentapi/values.yaml @@ -70,7 +70,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-image-access-service/templates/httproute.yaml b/charts/sophora-image-access-service/templates/httproute.yaml index a89d9114..91f15c2c 100644 --- a/charts/sophora-image-access-service/templates/httproute.yaml +++ b/charts/sophora-image-access-service/templates/httproute.yaml @@ -1,6 +1,6 @@ {{ $allHTTPRoutes := .Values.extraHTTPRoute -}} -{{ if .Values.httproute.enabled -}} - {{ $allHTTPRoutes = prepend $allHTTPRoutes .Values.httproute -}} +{{ if .Values.httpRoute.enabled -}} + {{ $allHTTPRoutes = prepend $allHTTPRoutes .Values.httpRoute -}} {{ end -}} {{ $fullName := include "access-service.fullname" $ -}} {{ $svcPort := $.Values.service.httpPort -}} diff --git a/charts/sophora-image-access-service/test-values.yaml b/charts/sophora-image-access-service/test-values.yaml index 6da4677d..f401fdd5 100644 --- a/charts/sophora-image-access-service/test-values.yaml +++ b/charts/sophora-image-access-service/test-values.yaml @@ -46,7 +46,7 @@ extraIngress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index 50cf5cda..d0d831ae 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -79,7 +79,7 @@ extraIngress: [] # hosts: # tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-image-ai/templates/httproute.yaml b/charts/sophora-image-ai/templates/httproute.yaml index bc008b20..91221e7c 100644 --- a/charts/sophora-image-ai/templates/httproute.yaml +++ b/charts/sophora-image-ai/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-image-ai.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-image-ai.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-image-ai/test-values.yaml b/charts/sophora-image-ai/test-values.yaml index 0f8bf528..b17e41ff 100644 --- a/charts/sophora-image-ai/test-values.yaml +++ b/charts/sophora-image-ai/test-values.yaml @@ -43,7 +43,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-image-ai/values.yaml b/charts/sophora-image-ai/values.yaml index 0daa8c95..75507a78 100644 --- a/charts/sophora-image-ai/values.yaml +++ b/charts/sophora-image-ai/values.yaml @@ -63,7 +63,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-indexing-service/templates/httproute.yaml b/charts/sophora-indexing-service/templates/httproute.yaml index e101bb98..fc307528 100644 --- a/charts/sophora-indexing-service/templates/httproute.yaml +++ b/charts/sophora-indexing-service/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-indexing-service.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-indexing-service.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-indexing-service/test-values.yaml b/charts/sophora-indexing-service/test-values.yaml index d787845e..1a45d07a 100644 --- a/charts/sophora-indexing-service/test-values.yaml +++ b/charts/sophora-indexing-service/test-values.yaml @@ -48,7 +48,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-indexing-service/values.yaml b/charts/sophora-indexing-service/values.yaml index 41cb60f9..1fc6a221 100644 --- a/charts/sophora-indexing-service/values.yaml +++ b/charts/sophora-indexing-service/values.yaml @@ -93,7 +93,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-linkchecker/templates/httproute.yaml b/charts/sophora-linkchecker/templates/httproute.yaml index 13c97b05..7dee259c 100644 --- a/charts/sophora-linkchecker/templates/httproute.yaml +++ b/charts/sophora-linkchecker/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-linkchecker.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-linkchecker.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-linkchecker/test-values.yaml b/charts/sophora-linkchecker/test-values.yaml index c81aeb77..1ef0848a 100644 --- a/charts/sophora-linkchecker/test-values.yaml +++ b/charts/sophora-linkchecker/test-values.yaml @@ -43,7 +43,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-linkchecker/values.yaml b/charts/sophora-linkchecker/values.yaml index 7ead8ef3..5173c340 100644 --- a/charts/sophora-linkchecker/values.yaml +++ b/charts/sophora-linkchecker/values.yaml @@ -70,7 +70,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-media-finder/templates/httproute.yaml b/charts/sophora-media-finder/templates/httproute.yaml index 2c90de00..01f425d0 100644 --- a/charts/sophora-media-finder/templates/httproute.yaml +++ b/charts/sophora-media-finder/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-media-finder.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-media-finder.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-media-finder/values.yaml b/charts/sophora-media-finder/values.yaml index bdf0790f..74285fcc 100644 --- a/charts/sophora-media-finder/values.yaml +++ b/charts/sophora-media-finder/values.yaml @@ -34,7 +34,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-metadata-supplier/templates/httproute.yaml b/charts/sophora-metadata-supplier/templates/httproute.yaml index a25e1334..22cb4d93 100644 --- a/charts/sophora-metadata-supplier/templates/httproute.yaml +++ b/charts/sophora-metadata-supplier/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-metadata-supplier.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-metadata-supplier.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-metadata-supplier/test-values.yaml b/charts/sophora-metadata-supplier/test-values.yaml index b627e135..0e1369aa 100644 --- a/charts/sophora-metadata-supplier/test-values.yaml +++ b/charts/sophora-metadata-supplier/test-values.yaml @@ -65,7 +65,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-metadata-supplier/values.yaml b/charts/sophora-metadata-supplier/values.yaml index 6722db15..180fe851 100644 --- a/charts/sophora-metadata-supplier/values.yaml +++ b/charts/sophora-metadata-supplier/values.yaml @@ -99,7 +99,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-schema-docs/templates/httproute.yaml b/charts/sophora-schema-docs/templates/httproute.yaml index 849dd9a2..99593888 100644 --- a/charts/sophora-schema-docs/templates/httproute.yaml +++ b/charts/sophora-schema-docs/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-schema-docs.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-schema-docs.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-schema-docs/test-values.yaml b/charts/sophora-schema-docs/test-values.yaml index afb2539d..62d4a805 100644 --- a/charts/sophora-schema-docs/test-values.yaml +++ b/charts/sophora-schema-docs/test-values.yaml @@ -43,7 +43,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-schema-docs/values.yaml b/charts/sophora-schema-docs/values.yaml index 0ebd8428..b3ea5a8b 100644 --- a/charts/sophora-schema-docs/values.yaml +++ b/charts/sophora-schema-docs/values.yaml @@ -103,7 +103,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-seo-check/templates/httproute.yaml b/charts/sophora-seo-check/templates/httproute.yaml index 92090496..1069e77d 100644 --- a/charts/sophora-seo-check/templates/httproute.yaml +++ b/charts/sophora-seo-check/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-seo-check.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-seo-check.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-seo-check/test-values.yaml b/charts/sophora-seo-check/test-values.yaml index 31b391e4..20e6c388 100644 --- a/charts/sophora-seo-check/test-values.yaml +++ b/charts/sophora-seo-check/test-values.yaml @@ -44,7 +44,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-seo-check/values.yaml b/charts/sophora-seo-check/values.yaml index 689c52be..d6317b64 100644 --- a/charts/sophora-seo-check/values.yaml +++ b/charts/sophora-seo-check/values.yaml @@ -54,7 +54,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-server/templates/httproute.yaml b/charts/sophora-server/templates/httproute.yaml index 27e43a35..44fa5fc4 100644 --- a/charts/sophora-server/templates/httproute.yaml +++ b/charts/sophora-server/templates/httproute.yaml @@ -1,22 +1,22 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-server.fullname" . -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ $fullName }} labels: {{ include "sophora-server.topLevelLabels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -26,6 +26,6 @@ spec: port: {{ .Values.sophora.server.ports.http }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-server/test-values.yaml b/charts/sophora-server/test-values.yaml index a33f2524..84af0845 100644 --- a/charts/sophora-server/test-values.yaml +++ b/charts/sophora-server/test-values.yaml @@ -137,7 +137,7 @@ grpcIngress: - host: "sophora.domain.de" path: /sophora\.srpc.* -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index e80a691b..4009dd3d 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -385,7 +385,7 @@ grpcIngress: # hosts: # - chart-example.local -httproute: +httpRoute: enabled: false # parentRefs: # - name: my-gateway diff --git a/charts/sophora-ugc/templates/httproute.yaml b/charts/sophora-ugc/templates/httproute.yaml index bfdbcf69..a5439bec 100644 --- a/charts/sophora-ugc/templates/httproute.yaml +++ b/charts/sophora-ugc/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-ugc.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-ugc.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-ugc/test-values.yaml b/charts/sophora-ugc/test-values.yaml index afa9001b..a8700686 100644 --- a/charts/sophora-ugc/test-values.yaml +++ b/charts/sophora-ugc/test-values.yaml @@ -10,7 +10,7 @@ ingress: hosts: - host: "my-site.com" -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-ugc/values.yaml b/charts/sophora-ugc/values.yaml index e8e878da..157c5cb2 100644 --- a/charts/sophora-ugc/values.yaml +++ b/charts/sophora-ugc/values.yaml @@ -24,7 +24,7 @@ ingress: hosts: annotations: {} -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-webclient/templates/httproute.yaml b/charts/sophora-webclient/templates/httproute.yaml index 40f30161..6686c39e 100644 --- a/charts/sophora-webclient/templates/httproute.yaml +++ b/charts/sophora-webclient/templates/httproute.yaml @@ -1,21 +1,21 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "webclient.fullname" . -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ $fullName }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -25,6 +25,6 @@ spec: port: {{ .Values.service.port }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-webclient/test-values.yaml b/charts/sophora-webclient/test-values.yaml index 99310eb3..b8097022 100644 --- a/charts/sophora-webclient/test-values.yaml +++ b/charts/sophora-webclient/test-values.yaml @@ -13,7 +13,7 @@ ingress: hosts: - host: "my-site.com" -httproute: +httpRoute: enabled: true parentRefs: - name: test-gateway diff --git a/charts/sophora-webclient/values.yaml b/charts/sophora-webclient/values.yaml index 0674dda0..cd3b4198 100644 --- a/charts/sophora-webclient/values.yaml +++ b/charts/sophora-webclient/values.yaml @@ -50,7 +50,7 @@ ingress: hosts: annotations: {} -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] diff --git a/charts/sophora-youtube-connector/templates/httproute.yaml b/charts/sophora-youtube-connector/templates/httproute.yaml index 78f8eca2..709f9e84 100644 --- a/charts/sophora-youtube-connector/templates/httproute.yaml +++ b/charts/sophora-youtube-connector/templates/httproute.yaml @@ -1,4 +1,4 @@ -{{- if .Values.httproute.enabled -}} +{{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-youtube-connector.fullname" . -}} {{- $svcPort := .Values.service.port -}} apiVersion: gateway.networking.k8s.io/v1 @@ -7,18 +7,18 @@ metadata: name: {{ $fullName }} labels: {{- include "sophora-youtube-connector.labels" . | nindent 4 }} - {{- with .Values.httproute.annotations }} + {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with .Values.httproute.parentRefs }} + {{- with .Values.httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if .Values.httproute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: - {{- range .Values.httproute.hostnames }} + {{- range .Values.httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -28,6 +28,6 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ .Values.httproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httproute.pathValue | default "/" }} + type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ .Values.httpRoute.pathValue | default "/" }} {{- end }} diff --git a/charts/sophora-youtube-connector/values.yaml b/charts/sophora-youtube-connector/values.yaml index e21d08ca..c78954d1 100644 --- a/charts/sophora-youtube-connector/values.yaml +++ b/charts/sophora-youtube-connector/values.yaml @@ -47,7 +47,7 @@ ingress: hosts: tls: [] -httproute: +httpRoute: enabled: false parentRefs: [] hostnames: [] From d025b7900dce6b7a45ffe0eb0e6eac1931200666 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 11:58:10 +0100 Subject: [PATCH 08/26] camel-case name for `extraHttpRoutes` in sophora-image-access-service --- .../templates/httproute.yaml | 16 ++++++++-------- .../test-values.yaml | 2 +- charts/sophora-image-access-service/values.yaml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/charts/sophora-image-access-service/templates/httproute.yaml b/charts/sophora-image-access-service/templates/httproute.yaml index 91f15c2c..5bd39371 100644 --- a/charts/sophora-image-access-service/templates/httproute.yaml +++ b/charts/sophora-image-access-service/templates/httproute.yaml @@ -1,28 +1,28 @@ -{{ $allHTTPRoutes := .Values.extraHTTPRoute -}} +{{ $allHTTPRoutes := .Values.extraHttpRoutes -}} {{ if .Values.httpRoute.enabled -}} {{ $allHTTPRoutes = prepend $allHTTPRoutes .Values.httpRoute -}} {{ end -}} {{ $fullName := include "access-service.fullname" $ -}} {{ $svcPort := $.Values.service.httpPort -}} -{{ range $index, $httproute := $allHTTPRoutes -}} +{{ range $index, $httpRoute := $allHTTPRoutes -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ $fullName }}{{ eq $index 0 | ternary "" (printf "-%d" $index) }} labels: {{- include "access-service.labels" $ | nindent 4 }} - {{- with $httproute.annotations }} + {{- with $httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: - {{- with $httproute.parentRefs }} + {{- with $httpRoute.parentRefs }} parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if $httproute.hostnames }} + {{- if $httpRoute.hostnames }} hostnames: - {{- range $httproute.hostnames }} + {{- range $httpRoute.hostnames }} - {{ . | quote }} {{- end }} {{- end }} @@ -32,7 +32,7 @@ spec: port: {{ $svcPort }} matches: - path: - type: {{ $httproute.pathMatchType | default "PathPrefix" }} - value: {{ $httproute.pathValue | default "/" }} + type: {{ $httpRoute.pathMatchType | default "PathPrefix" }} + value: {{ $httpRoute.pathValue | default "/" }} --- {{ end }} diff --git a/charts/sophora-image-access-service/test-values.yaml b/charts/sophora-image-access-service/test-values.yaml index f401fdd5..09a593b6 100644 --- a/charts/sophora-image-access-service/test-values.yaml +++ b/charts/sophora-image-access-service/test-values.yaml @@ -54,7 +54,7 @@ httpRoute: hostnames: - "image-access.test.example.com" -extraHTTPRoute: +extraHttpRoutes: - parentRefs: - name: test-gateway-2 namespace: gateway-system diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index d0d831ae..ad9516be 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -87,7 +87,7 @@ httpRoute: pathValue: / annotations: {} -extraHTTPRoute: [] +extraHttpRoutes: [] #- parentRefs: # - name: my-gateway # hostnames: From 30c30483da6e7ca0a1e86e4081be35a958b0634a Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 12:00:04 +0100 Subject: [PATCH 09/26] rename values to `httpRoute` in HTTPROUTE_CHANGES.md --- HTTPROUTE_CHANGES.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/HTTPROUTE_CHANGES.md b/HTTPROUTE_CHANGES.md index 86a3f8fa..d639c70d 100644 --- a/HTTPROUTE_CHANGES.md +++ b/HTTPROUTE_CHANGES.md @@ -32,7 +32,7 @@ The following 18 charts now support HTTPRoute (Gateway API) in addition to Ingre ### HTTPRoute Templates Each chart now includes a `templates/httproute.yaml` file that: -- Is conditionally created based on `httproute.enabled` value +- Is conditionally created based on `httpRoute.enabled` value - Uses the Gateway API v1 specification - Supports parentRefs for Gateway attachment - Supports hostname filtering @@ -42,10 +42,10 @@ Each chart now includes a `templates/httproute.yaml` file that: ### Values.yaml Configuration -Each chart's `values.yaml` file now includes an `httproute` section with the following configuration options: +Each chart's `values.yaml` file now includes an `httpRoute` section with the following configuration options: ```yaml -httproute: +httpRoute: enabled: false # Whether to create HTTPRoute (disabled by default) parentRefs: [] # Gateway references hostnames: [] # Hostnames for routing @@ -56,7 +56,7 @@ httproute: ### Special Cases -1. **sophora-image-access-service**: Supports multiple HTTPRoutes via `extraHTTPRoute` array, similar to its `extraIngress` support. +1. **sophora-image-access-service**: Supports multiple HTTPRoutes via `extraHttpRoutes` array, similar to its `extraIngress` support. 2. **sophora-importer**: Already had HTTPRoute support with a more advanced configuration including custom rules and filters. @@ -67,7 +67,7 @@ httproute: To enable HTTPRoute for a chart deployment: ```yaml -httproute: +httpRoute: enabled: true parentRefs: - name: my-gateway From 9f6109043277c0d0948d98007058c71a940a19fb Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 13:05:26 +0100 Subject: [PATCH 10/26] comment parameters like recommended by Helm: "begin with the name of the property" --- charts/o-neko-catnip/values.yaml | 124 +++++++++--------- charts/o-neko/values.yaml | 98 +++++++------- charts/sophora-admin-dashboard/values.yaml | 10 +- charts/sophora-ai/values.yaml | 13 ++ charts/sophora-cluster-common/values.yaml | 52 ++++---- charts/sophora-contentapi/values.yaml | 13 ++ .../sophora-image-access-service/values.yaml | 17 ++- charts/sophora-image-ai/values.yaml | 13 ++ charts/sophora-import-job/values.yaml | 22 ++-- charts/sophora-importer/values.yaml | 40 +++--- charts/sophora-indexing-service/values.yaml | 13 ++ charts/sophora-linkchecker/values.yaml | 13 ++ charts/sophora-media-finder/values.yaml | 13 ++ charts/sophora-metadata-supplier/values.yaml | 15 ++- charts/sophora-schema-docs/values.yaml | 13 ++ charts/sophora-seo-check/values.yaml | 13 ++ charts/sophora-server/values.yaml | 56 ++++---- charts/sophora-ugc/values.yaml | 14 +- charts/sophora-webclient/values.yaml | 13 ++ charts/sophora-youtube-connector/values.yaml | 13 ++ 20 files changed, 386 insertions(+), 192 deletions(-) diff --git a/charts/o-neko-catnip/values.yaml b/charts/o-neko-catnip/values.yaml index 3744a944..a1583eb5 100644 --- a/charts/o-neko-catnip/values.yaml +++ b/charts/o-neko-catnip/values.yaml @@ -1,20 +1,20 @@ ## @section Common parameters ## -## @param nameOverride String to partially override the name +# nameOverride String to partially override the name nameOverride: "" -## @param fullnameOverride String to fully override the release name +# fullnameOverride String to fully override the release name fullnameOverride: "" -## @param imagePullSecrets Docker registry secret names as an array +# imagePullSecrets Docker registry secret names as an array imagePullSecrets: [] -## @param hostAliases Host aliases available to the application +# hostAliases Host aliases available to the application hostAliases: -## @param resources.limits The resource limits for the container -## @param resources.requests The resource requests for the container +# resources.limits The resource limits for the container +# resources.requests The resource requests for the container resources: limits: {} requests: {} @@ -25,54 +25,54 @@ resources: oneko: - ## @param oneko.image.name O-Neko Catnip image repository - ## @param oneko.image.tag O-Neko Catnip image tag - ## @param oneko.image.imagePullPolicy Image Pull Policy + # oneko.image.name O-Neko Catnip image repository + # oneko.image.tag O-Neko Catnip image tag + # oneko.image.imagePullPolicy Image Pull Policy image: name: subshellgmbh/o-neko-catnip tag: 1.3.2 imagePullPolicy: IfNotPresent - ## @param oneko.api.baseUrl The base URL of the O-Neko installation, e.g. my.oneko.com - ## @param oneko.api.auth.secretName The name of the secret which contains the O-Neko credentials + # oneko.api.baseUrl The base URL of the O-Neko installation, e.g. my.oneko.com + # oneko.api.auth.secretName The name of the secret which contains the O-Neko credentials api: baseUrl: auth: secretName: - ## @param oneko.catnipUrl The base URL of the O-Neko Catnip installation, e.g. catnip.oneko.com + # oneko.catnipUrl The base URL of the O-Neko Catnip installation, e.g. catnip.oneko.com catnipUrl: - ## @param oneko.useSeparateMetricsPort Whether to host metrics on a different port + # oneko.useSeparateMetricsPort Whether to host metrics on a different port useSeparateMetricsPort: true ## @section Probes ## -## @param startupProbe.failureThreshold Failure threshold for startupProbe -## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe -## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe -## @param startupProbe.periodSeconds Period seconds for startupProbe +# startupProbe.failureThreshold Failure threshold for startupProbe +# startupProbe.initialDelaySeconds Initial delay seconds for startupProbe +# startupProbe.timeoutSeconds Timeout seconds for startupProbe +# startupProbe.periodSeconds Period seconds for startupProbe startupProbe: failureThreshold: 10 initialDelaySeconds: 0 timeoutSeconds: 1 periodSeconds: 2 -## @param readinessProbe.failureThreshold Failure threshold for readinessProbe -## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe -## @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe -## @param readinessProbe.periodSeconds Period seconds for readinessProbe +# readinessProbe.failureThreshold Failure threshold for readinessProbe +# readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe +# readinessProbe.timeoutSeconds Timeout seconds for readinessProbe +# readinessProbe.periodSeconds Period seconds for readinessProbe readinessProbe: failureThreshold: 3 initialDelaySeconds: 0 timeoutSeconds: 5 periodSeconds: 1 -## @param livenessProbe.failureThreshold Failure threshold for livenessProbe -## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe -## @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe -## @param livenessProbe.periodSeconds Period seconds for livenessProbe +# livenessProbe.failureThreshold Failure threshold for livenessProbe +# livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe +# livenessProbe.timeoutSeconds Timeout seconds for livenessProbe +# livenessProbe.periodSeconds Period seconds for livenessProbe livenessProbe: failureThreshold: 3 initialDelaySeconds: 0 @@ -83,76 +83,76 @@ livenessProbe: ## service: - ## @param service.annotations annotations for the service + # service.annotations annotations for the service annotations: {} - ## @param service.type Kubernetes service type + # service.type Kubernetes service type type: - ## @param service.sessionAffinity the service's sessionAffinity + # service.sessionAffinity the service's sessionAffinity sessionAffinity: None - ## @param service.sessionAffinityConfig additional sessionAffinity configuration + # service.sessionAffinityConfig additional sessionAffinity configuration sessionAffinityConfig: {} - ## @param service.loadBalancerIP A loadBalancerIP configuration + # service.loadBalancerIP A loadBalancerIP configuration loadBalancerIP: - ## @param service.clusterIP The service's clusterIP + # service.clusterIP The service's clusterIP clusterIP: ingress: - ## @param ingress.ingressClassName name of the ingressClass used for the ingress + # ingress.ingressClassName name of the ingressClass used for the ingress ingressClassName: - ## @param ingress.hosts Array with hostnames used for the ingress - ## e.g. - ## hosts: - ## - host: "catnip.oneko.com" + # ingress.hosts Array with hostnames used for the ingress + # e.g. + # hosts: + # - host: "catnip.oneko.com" hosts: - ## @param ingress.tls TLS configuration of the ingress as an array - ## e.g. - ## tls: - ## - hosts: - ## - "catnip.oneko.com" - ## secretName: catnip-tls + # ingress.tls TLS configuration of the ingress as an array + # e.g. + # tls: + # - hosts: + # - "catnip.oneko.com" + # secretName: catnip-tls tls: - ## @param ingress.annotations annotations for the ingress + # ingress.annotations annotations for the ingress annotations: {} - ## @param ingress.defaultBackend.enabled Whether the default backend should be enabled or not + # ingress.defaultBackend.enabled Whether the default backend should be enabled or not defaultBackend: enabled: false httpRoute: - ## @param httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false - ## @param httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to - ## e.g. - ## parentRefs: - ## - name: my-gateway - ## namespace: gateway-namespace + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] - ## @param httpRoute.hostnames Array with hostnames used for the HTTPRoute - ## e.g. - ## hostnames: - ## - "catnip.oneko.com" + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "catnip.oneko.com" hostnames: [] - ## @param httpRoute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix - ## @param httpRoute.pathValue Path value for the HTTPRoute + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / - ## @param httpRoute.annotations annotations for the HTTPRoute + # httpRoute.annotations annotations for the HTTPRoute annotations: {} ## @section Metrics and Alerting ## ## Specific for the use with the kube-prometheus-stack -## @param serviceMonitor.enabled Whether the serviceMonitor resource should be deployed -## @param serviceMonitor.interval Prometheus scrape interval +# serviceMonitor.enabled Whether the serviceMonitor resource should be deployed +# serviceMonitor.interval Prometheus scrape interval serviceMonitor: enabled: false interval: 10s -## @param prometheusRule.enabled Whether the prometheusRule resource should be deployed -## @param prometheusRule.defaultRulesEnabled Whether the default alerting rules should be enabled or not -## @param prometheusRule.rules Custom alerting rules which can be deployed +# prometheusRule.enabled Whether the prometheusRule resource should be deployed +# prometheusRule.defaultRulesEnabled Whether the default alerting rules should be enabled or not +# prometheusRule.rules Custom alerting rules which can be deployed prometheusRule: enabled: false defaultRulesEnabled: true diff --git a/charts/o-neko/values.yaml b/charts/o-neko/values.yaml index eac4fd1d..f984fff4 100644 --- a/charts/o-neko/values.yaml +++ b/charts/o-neko/values.yaml @@ -1,23 +1,23 @@ ## @section Common parameters ## -## @param nameOverride String to partially override the name +# nameOverride String to partially override the name nameOverride: "" -## @param fullnameOverride String to fully override the release name +# fullnameOverride String to fully override the release name fullnameOverride: "" -## @param imagePullSecrets Docker registry secret names as an array +# imagePullSecrets Docker registry secret names as an array imagePullSecrets: [] -## @param javaOptions String with Java VM Options passed to the application +# javaOptions String with Java VM Options passed to the application javaOptions: "-XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=80.0 -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem" -## @param hostAliases Host aliases available to the application +# hostAliases Host aliases available to the application hostAliases: -## @param resources.limits The resource limits for the container -## @param resources.requests The resource requests for the container +# resources.limits The resource limits for the container +# resources.requests The resource requests for the container resources: limits: {} requests: {} @@ -28,24 +28,24 @@ resources: oneko: - ## @param oneko.image.name O-Neko image repository - ## @param oneko.image.tag O-Neko image tag - ## @param oneko.image.imagePullPolicy Image Pull Policy + # oneko.image.name O-Neko image repository + # oneko.image.tag O-Neko image tag + # oneko.image.imagePullPolicy Image Pull Policy image: name: subshellgmbh/o-neko tag: 1.8.2 imagePullPolicy: IfNotPresent ## @extra oneko.env array of environment variables passed to the container - ## @param oneko.env[0].name default environment variable name for activation json logging - ## @param oneko.env[0].value name of the Spring profile used to activate json logging + # oneko.env[0].name default environment variable name for activation json logging + # oneko.env[0].value name of the Spring profile used to activate json logging env: - name: SPRING_PROFILES_ACTIVE value: "json-logs" ## Helm parameter configuration - ## @param oneko.helm.gcs.secret.name The secret name of the Google Service Account used, if using Helm GCS - ## @param oneko.helm.gcs.secret.serviceAccountField The field in the secret of the Google Service Account + # oneko.helm.gcs.secret.name The secret name of the Google Service Account used, if using Helm GCS + # oneko.helm.gcs.secret.serviceAccountField The field in the secret of the Google Service Account helm: gcs: secret: @@ -53,16 +53,16 @@ oneko: serviceAccountField: ## MongoDB connection parameters - ## @param oneko.mongodb.secret.name Name of the secret holding the MongoDB connection URI - ## @param oneko.mongodb.secret.uriField Name of the field in the secret containing the MongoDB URI + # oneko.mongodb.secret.name Name of the secret holding the MongoDB connection URI + # oneko.mongodb.secret.uriField Name of the field in the secret containing the MongoDB URI mongodb: secret: name: #required uriField: uri ## Secret containing the key for symmetrical encryption of sensitive data in the database - ## @param oneko.credentialsCoderKeySecret.name Name of the secret - ## @param oneko.credentialsCoderKeySecret.fieldName Name of the field in the secret + # oneko.credentialsCoderKeySecret.name Name of the secret + # oneko.credentialsCoderKeySecret.fieldName Name of the field in the secret credentialsCoderKeySecret: name: #required fieldName: key @@ -83,30 +83,30 @@ oneko: ## @section Probes ## -## @param startupProbe.failureThreshold Failure threshold for startupProbe -## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe -## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe -## @param startupProbe.periodSeconds Period seconds for startupProbe +# startupProbe.failureThreshold Failure threshold for startupProbe +# startupProbe.initialDelaySeconds Initial delay seconds for startupProbe +# startupProbe.timeoutSeconds Timeout seconds for startupProbe +# startupProbe.periodSeconds Period seconds for startupProbe startupProbe: failureThreshold: 10 initialDelaySeconds: 10 timeoutSeconds: 1 periodSeconds: 2 -## @param readinessProbe.failureThreshold Failure threshold for readinessProbe -## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe -## @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe -## @param readinessProbe.periodSeconds Period seconds for readinessProbe +# readinessProbe.failureThreshold Failure threshold for readinessProbe +# readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe +# readinessProbe.timeoutSeconds Timeout seconds for readinessProbe +# readinessProbe.periodSeconds Period seconds for readinessProbe readinessProbe: failureThreshold: 3 initialDelaySeconds: 5 timeoutSeconds: 5 periodSeconds: 5 -## @param livenessProbe.failureThreshold Failure threshold for livenessProbe -## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe -## @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe -## @param livenessProbe.periodSeconds Period seconds for livenessProbe +# livenessProbe.failureThreshold Failure threshold for livenessProbe +# livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe +# livenessProbe.timeoutSeconds Timeout seconds for livenessProbe +# livenessProbe.periodSeconds Period seconds for livenessProbe livenessProbe: failureThreshold: 3 initialDelaySeconds: 15 @@ -117,65 +117,65 @@ livenessProbe: ## service: - ## @param service.annotations annotations for the service + # service.annotations annotations for the service annotations: {} - ## @param service.type Kubernetes service type + # service.type Kubernetes service type type: - ## @param service.sessionAffinity the service's sessionAffinity + # service.sessionAffinity the service's sessionAffinity sessionAffinity: None - ## @param service.sessionAffinityConfig additional sessionAffinity configuration + # service.sessionAffinityConfig additional sessionAffinity configuration sessionAffinityConfig: {} - ## @param service.loadBalancerIP A loadBalancerIP configuration + # service.loadBalancerIP A loadBalancerIP configuration loadBalancerIP: - ## @param service.clusterIP The service's clusterIP + # service.clusterIP The service's clusterIP clusterIP: ingress: - ## @param ingress.ingressClassName name of the ingressClass used for the ingress + # ingress.ingressClassName name of the ingressClass used for the ingress ingressClassName: - ## @param ingress.hosts Array with hostnames used for the ingress + # ingress.hosts Array with hostnames used for the ingress ## e.g. ## hosts: ## - host: "oneko.my-company.com" hosts: - ## @param ingress.tls TLS configuration of the ingress as an array + # ingress.tls TLS configuration of the ingress as an array ## e.g. ## tls: ## - hosts: ## - "oneko.my-company.com" ## secretName: oneko-tls tls: - ## @param ingress.annotations annotations for the ingress + # ingress.annotations annotations for the ingress annotations: {} httpRoute: - ## @param httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false - ## @param httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to ## e.g. ## parentRefs: ## - name: my-gateway ## namespace: gateway-namespace parentRefs: [] - ## @param httpRoute.hostnames Array with hostnames used for the HTTPRoute + # httpRoute.hostnames Array with hostnames used for the HTTPRoute ## e.g. ## hostnames: ## - "oneko.my-company.com" hostnames: [] - ## @param httpRoute.pathMatchType Path match type for the HTTPRoute (PathPrefix, Exact, or RegularExpression) + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix - ## @param httpRoute.pathValue Path value for the HTTPRoute + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / - ## @param httpRoute.annotations annotations for the HTTPRoute + # httpRoute.annotations annotations for the HTTPRoute annotations: {} ## @section Metrics ## ## Specific for the use with the kube-prometheus-stack -## @param serviceMonitor.enabled Whether the serviceMonitor resource should be deployed -## @param serviceMonitor.interval Prometheus scrape interval -## @param serviceMonitor.path HTTP path prometheus should use to scrape the application's metrics +# serviceMonitor.enabled Whether the serviceMonitor resource should be deployed +# serviceMonitor.interval Prometheus scrape interval +# serviceMonitor.path HTTP path prometheus should use to scrape the application's metrics serviceMonitor: enabled: false interval: 10s diff --git a/charts/sophora-admin-dashboard/values.yaml b/charts/sophora-admin-dashboard/values.yaml index 542536ad..3a458e38 100644 --- a/charts/sophora-admin-dashboard/values.yaml +++ b/charts/sophora-admin-dashboard/values.yaml @@ -209,16 +209,24 @@ ingress: # - chart-example.local httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. # parentRefs: # - name: my-gateway # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. # hostnames: - # - "dashboard.example.com" + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} resources: diff --git a/charts/sophora-ai/values.yaml b/charts/sophora-ai/values.yaml index 25922e4a..0a0962bd 100644 --- a/charts/sophora-ai/values.yaml +++ b/charts/sophora-ai/values.yaml @@ -217,11 +217,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraDeploy: [] diff --git a/charts/sophora-cluster-common/values.yaml b/charts/sophora-cluster-common/values.yaml index 64cb3b0d..f9b48952 100644 --- a/charts/sophora-cluster-common/values.yaml +++ b/charts/sophora-cluster-common/values.yaml @@ -1,10 +1,10 @@ ## @section Common parameters ## -## @param nameOverride String to partially override the name +# nameOverride String to partially override the name nameOverride: "" -## @param fullnameOverride String to fully override the release name +# fullnameOverride String to fully override the release name fullnameOverride: "" ## @section Cluster Server Loadbalancer @@ -12,22 +12,22 @@ fullnameOverride: "" ## clusterServerLb: - ## @param clusterServerLb.enabled whether the service and ingress should be deployed or not + # clusterServerLb.enabled whether the service and ingress should be deployed or not enabled: false - ## @param clusterServerLb.name names of the resources + # clusterServerLb.name names of the resources name: cluster-server-lb ingress: - ## @param clusterServerLb.ingress.enabled whether the ingress should be enabled + # clusterServerLb.ingress.enabled whether the ingress should be enabled enabled: true - ## @param clusterServerLb.ingress.ingressClassName name of the ingressClass used for the ingress + # clusterServerLb.ingress.ingressClassName name of the ingressClass used for the ingress ingressClassName: "" - ## @param clusterServerLb.ingress.annotations annotations for the ingress + # clusterServerLb.ingress.annotations annotations for the ingress annotations: {} - ## @param clusterServerLb.ingress.hosts array with hostnames used for the ingress - ## e.g. - ## hosts: - ## - host: "cms.mysophora.com" + # clusterServerLb.ingress.hosts array with hostnames used for the ingress + # e.g. + # hosts: + # - host: "cms.mysophora.com" hosts: [] # - host: "" # path: / @@ -53,33 +53,33 @@ clusterServerLb: # - chart-example.local service: - ## @param clusterServerLb.service.type Kubernetes service type + # clusterServerLb.service.type Kubernetes service type type: ClusterIP selectorLabels: - ## @param clusterServerLb.service.selectorLabels.sophora.cloud/app labels used to select the primary Sophora server + # clusterServerLb.service.selectorLabels.sophora.cloud/app labels used to select the primary Sophora server sophora.cloud/app: cluster-server - ## @param clusterServerLb.service.selectorLabels.server.sophora.cloud/server-mode labels used to select the primary Sophora server + # clusterServerLb.service.selectorLabels.server.sophora.cloud/server-mode labels used to select the primary Sophora server server.sophora.cloud/server-mode: primary - ## @param clusterServerLb.service.httpPort the Sophora server's http port + # clusterServerLb.service.httpPort the Sophora server's http port httpPort: 1196 - ## @param clusterServerLb.service.grpcPort the Sophora server's grpc port + # clusterServerLb.service.grpcPort the Sophora server's grpc port grpcPort: 2026 - ## @param clusterServerLb.service.jmsPort the Sophora server's jms port + # clusterServerLb.service.jmsPort the Sophora server's jms port jmsPort: 1197 - ## @param clusterServerLb.service.publishNotReadyAddresses whether the service should publish not ready addresses + # clusterServerLb.service.publishNotReadyAddresses whether the service should publish not ready addresses publishNotReadyAddresses: true ## @section Cluster Server Pod Disruption Budget ## Configuration of the PodDisruptionBudget for the Sophora Cluster Servers (primary and replicas) ## podDisruptionBudget: - ## @param podDisruptionBudget.enabled whether the PDB should be installed or not + # podDisruptionBudget.enabled whether the PDB should be installed or not enabled: false - ## @param podDisruptionBudget.name name of the PDB + # podDisruptionBudget.name name of the PDB name: sophora-cluster-server - ## @param podDisruptionBudget.minAvailable minimum available replicas + # podDisruptionBudget.minAvailable minimum available replicas minAvailable: 2 - ## @param podDisruptionBudget.matchLabels.sophora.cloud/app selector label for the cluster servers + # podDisruptionBudget.matchLabels.sophora.cloud/app selector label for the cluster servers matchLabels: sophora.cloud/app: cluster-server @@ -87,14 +87,14 @@ podDisruptionBudget: ## Configuration of the alerting rules ## prometheusRules: - ## @param prometheusRules.enabled Whether the alerts should be installed + # prometheusRules.enabled Whether the alerts should be installed enabled: false - ## @param prometheusRules.defaultRulesEnabled Whether the default rules should be installed + # prometheusRules.defaultRulesEnabled Whether the default rules should be installed defaultRulesEnabled: true - ## @param prometheusRules.rules allows to add custom rules + # prometheusRules.rules allows to add custom rules rules: [] ## @section Extra Deploy ## -## @param extraDeploy Allows to specify custom resources that should be deployed +# extraDeploy Allows to specify custom resources that should be deployed extraDeploy: [] \ No newline at end of file diff --git a/charts/sophora-contentapi/values.yaml b/charts/sophora-contentapi/values.yaml index 72524285..1517c38a 100644 --- a/charts/sophora-contentapi/values.yaml +++ b/charts/sophora-contentapi/values.yaml @@ -71,11 +71,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraDeploy: [] diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index ad9516be..60725f6f 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -80,11 +80,24 @@ extraIngress: [] # tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraHttpRoutes: [] @@ -126,9 +139,9 @@ livenessProbe: timeoutSeconds: 3 periodSeconds: 60 -## @section Extra Deploy +# @section Extra Deploy ## -## @param extraDeploy Allows to specify custom resources that should be deployed +# extraDeploy Allows to specify custom resources that should be deployed extraDeploy: [] autoscaling: diff --git a/charts/sophora-image-ai/values.yaml b/charts/sophora-image-ai/values.yaml index 75507a78..d827b598 100644 --- a/charts/sophora-image-ai/values.yaml +++ b/charts/sophora-image-ai/values.yaml @@ -64,11 +64,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraDeploy: [] diff --git a/charts/sophora-import-job/values.yaml b/charts/sophora-import-job/values.yaml index 5a39321d..16bcebae 100644 --- a/charts/sophora-import-job/values.yaml +++ b/charts/sophora-import-job/values.yaml @@ -157,42 +157,42 @@ prometheusRule: summary: 'The import job ({{ include "sophora-import-job.fullname" . }}) did not complete successfully.' runbook_url: 'https://github.com/subshell/helm-charts/charts/sophora-import-job/alerting-runbook.md' -## @param extraDeploy Extra objects to deploy (value evaluated as a template) +# extraDeploy Extra objects to deploy (value evaluated as a template) ## extraDeploy: [] extraVolumes: [] extraVolumeMounts: [] job: - ## @param job.ttlSecondsAfterFinished k8s job config, defaults to 7 days in seconds + # job.ttlSecondsAfterFinished k8s job config, defaults to 7 days in seconds ## ttlSecondsAfterFinished: 604800 - ## @param job.backoffLimit k8s job config + # job.backoffLimit k8s job config ## backoffLimit: 1 - ## @param job.parallelism k8s job config + # job.parallelism k8s job config ## parallelism: 1 - ## @param job.activeDeadlineSeconds k8s job config, default of 3 hours in seconds + # job.activeDeadlineSeconds k8s job config, default of 3 hours in seconds ## activeDeadlineSeconds: 10800 cron: - ## @param job.cron.expression Cron expression, defaults to every 3rd hour on Sunday + # job.cron.expression Cron expression, defaults to every 3rd hour on Sunday ## expression: "0 */3 * * 0" - ## @param job.cron.suspend Suspends the cron job. Defaults to true + # job.cron.suspend Suspends the cron job. Defaults to true ## suspend: true - ## @param job.postStart Sets the command executed when the container is started Defaults to [] + # job.postStart Sets the command executed when the container is started Defaults to [] ## postStartCommand: [] - ## @param job.preStop Sets the command executed when the container is stopped. Defaults to [] + # job.preStop Sets the command executed when the container is stopped. Defaults to [] ## preStopCommand: [] - ## @param job.beforeScript Appends code to be executed before wait-for-empty-dir.sh. Defaults to "" + # job.beforeScript Appends code to be executed before wait-for-empty-dir.sh. Defaults to "" ## beforeScript: "" - ## @param job.afterScript Appends code to be executed after wait-for-empty-dir.sh. Defaults to "" + # job.afterScript Appends code to be executed after wait-for-empty-dir.sh. Defaults to "" ## afterScript: "" diff --git a/charts/sophora-importer/values.yaml b/charts/sophora-importer/values.yaml index d96324fa..0a575c54 100644 --- a/charts/sophora-importer/values.yaml +++ b/charts/sophora-importer/values.yaml @@ -19,7 +19,7 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" -## @param extraDeploy Extra objects to deploy (value evaluated as a template) +# extraDeploy Extra objects to deploy (value evaluated as a template) ## extraDeploy: [] @@ -135,21 +135,31 @@ additionalVolumeMounts: importPvcSpec: httpRoute: - # HTTPRoute enabled. + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false - # HTTPRoute annotations. - annotations: {} - # Which Gateways this Route is attached to. + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] - #- name: gateway - #sectionName: http - # namespace: default - # Hostnames matching HTTP header. + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] - #- chart-example.local - # List of rules and filters applied. + # httpRoute.rules List of rules and filters applied. + # e.g. + # rules: + # - matches: + # - path: + # type: PathPrefix + # value: /headers + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # remove: + # - X-my-header rules: [] - #- matches: - #- path: - #type: PathPrefix - #value: /headers \ No newline at end of file + # httpRoute.annotations annotations for the HTTPRoute + annotations: {} diff --git a/charts/sophora-indexing-service/values.yaml b/charts/sophora-indexing-service/values.yaml index 1fc6a221..f0bc8c58 100644 --- a/charts/sophora-indexing-service/values.yaml +++ b/charts/sophora-indexing-service/values.yaml @@ -94,11 +94,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} resources: diff --git a/charts/sophora-linkchecker/values.yaml b/charts/sophora-linkchecker/values.yaml index 5173c340..15a06bb8 100644 --- a/charts/sophora-linkchecker/values.yaml +++ b/charts/sophora-linkchecker/values.yaml @@ -71,11 +71,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraDeploy: [] diff --git a/charts/sophora-media-finder/values.yaml b/charts/sophora-media-finder/values.yaml index 74285fcc..745717c2 100644 --- a/charts/sophora-media-finder/values.yaml +++ b/charts/sophora-media-finder/values.yaml @@ -35,11 +35,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} startupProbe: diff --git a/charts/sophora-metadata-supplier/values.yaml b/charts/sophora-metadata-supplier/values.yaml index 180fe851..eb1128cc 100644 --- a/charts/sophora-metadata-supplier/values.yaml +++ b/charts/sophora-metadata-supplier/values.yaml @@ -13,7 +13,7 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" -## @param extraDeploy Extra objects to deploy (value evaluated as a template) +# extraDeploy Extra objects to deploy (value evaluated as a template) ## extraDeploy: [] @@ -100,11 +100,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} prometheusRule: diff --git a/charts/sophora-schema-docs/values.yaml b/charts/sophora-schema-docs/values.yaml index b3ea5a8b..af2eedb1 100644 --- a/charts/sophora-schema-docs/values.yaml +++ b/charts/sophora-schema-docs/values.yaml @@ -104,11 +104,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraDeploy: [] diff --git a/charts/sophora-seo-check/values.yaml b/charts/sophora-seo-check/values.yaml index d6317b64..54d2c249 100644 --- a/charts/sophora-seo-check/values.yaml +++ b/charts/sophora-seo-check/values.yaml @@ -55,11 +55,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} extraDeploy: [] diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index 4009dd3d..96e53cae 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -1,4 +1,4 @@ -## @param replicaCount number of replicas. Cluster servers only support values of 0 or 1. +# replicaCount number of replicas. Cluster servers only support values of 0 or 1. replicaCount: 1 nameOverride: "" @@ -201,41 +201,41 @@ sophora: accessModes: ["ReadWriteOnce"] dataDirAccessModes: ["ReadWriteOnce"] persistence: - ## @param sophora.server.persistence.repositoryType string that identifies the repository persistence technology (localdb, mysql, postgres, or none) + # sophora.server.persistence.repositoryType string that identifies the repository persistence technology (localdb, mysql, postgres, or none) repositoryType: localdb - ## @param sophora.server.persistence.archiveType string that identifies the archive persistence technology (localdb, mysql, or none) + # sophora.server.persistence.archiveType string that identifies the archive persistence technology (localdb, mysql, or none) archiveType: localdb derby: - ## @param sophora.server.persistence.derby.driver string that specifies the java derby driver. Defaults to "org.apache.derby.jdbc.EmbeddedDriver". - ## For Sophora versions newer than 5.4 use "org.apache.derby.iapi.jdbc.AutoloadedDriver". + # sophora.server.persistence.derby.driver string that specifies the java derby driver. Defaults to "org.apache.derby.jdbc.EmbeddedDriver". + # For Sophora versions newer than 5.4 use "org.apache.derby.iapi.jdbc.AutoloadedDriver". driver: "org.apache.derby.jdbc.EmbeddedDriver" - ## @param sophora.server.persistence.derby.searchIndexCacheSize id resolver cache size. + # sophora.server.persistence.derby.searchIndexCacheSize id resolver cache size. searchIndexCacheSize: 10000 - ## @param sophora.server.persistence.derby.derbyStoragePageCacheSize Defines the size, in number of pages, of the database's data page cache + # sophora.server.persistence.derby.derbyStoragePageCacheSize Defines the size, in number of pages, of the database's data page cache # (data pages kept in memory). The actual amount of memory the page cache derbyStoragePageCacheSize: 1024 mysql: - ## @param sophora.server.persistence.mysql.repositories Array of server main repository connection configurations via secrets. - ## e.g. - ## - secretName: + # sophora.server.persistence.mysql.repositories Array of server main repository connection configurations via secrets. + # e.g. + # - secretName: # hostnameKey: # usernameKey: # passwordKey: repositories: [] - ## @param sophora.server.persistence.mysql.archives Array of server archive connection configurations via secrets. - ## e.g. - ## - secretName: - ## hostnameKey: - ## usernameKey: - ## passwordKey: + # sophora.server.persistence.mysql.archives Array of server archive connection configurations via secrets. + # e.g. + # - secretName: + # hostnameKey: + # usernameKey: + # passwordKey: archives: [] - ## @param sophora.server.persistence.postgres postgres configuration. Required for Sophora Server >5.0.0. + # sophora.server.persistence.postgres postgres configuration. Required for Sophora Server >5.0.0. postgres: - ## @param sophora.server.persistence.postgres.enabled Must be true for Sophora Server >6.0.0. + # sophora.server.persistence.postgres.enabled Must be true for Sophora Server >6.0.0. enabled: false - ## @param sophora.server.persistence.postgres.versionStoreEnabled is deprecated. Use enabled instead. + # sophora.server.persistence.postgres.versionStoreEnabled is deprecated. Use enabled instead. versionStoreEnabled: false hostname: port: "5432" @@ -249,7 +249,7 @@ sophora: liveWorkspaceDB: "repository" jcrVersionsDB: "repository" - ## @param sophora.server.persistence.multiPostgres Allows any statefulset pod to connect a uniquely configured postgres. + # sophora.server.persistence.multiPostgres Allows any statefulset pod to connect a uniquely configured postgres. multiPostgres: enabled: false byPodIndex: @@ -386,16 +386,24 @@ grpcIngress: # - chart-example.local httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. # parentRefs: # - name: my-gateway # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. # hostnames: - # - "server.example.com" + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} # This can be used to configure a different HttpRoute for the SRPC service as it might require different settings. @@ -452,12 +460,12 @@ resources: # This PDB should only be used for staging server setups podDisruptionBudget: - ## @param enabled Whether the pod disruption budget resource should be deployed + # enabled Whether the pod disruption budget resource should be deployed ## enabled: false - ## @param podDisruptionBudget.minAvailable Minimum number of pods that must still be available after the eviction + # podDisruptionBudget.minAvailable Minimum number of pods that must still be available after the eviction ## minAvailable: 1 - ## @param podDisruptionBudget.maxUnavailable Max number of pods that can be unavailable after the eviction + # podDisruptionBudget.maxUnavailable Max number of pods that can be unavailable after the eviction ## maxUnavailable: "" diff --git a/charts/sophora-ugc/values.yaml b/charts/sophora-ugc/values.yaml index 157c5cb2..0e983a35 100644 --- a/charts/sophora-ugc/values.yaml +++ b/charts/sophora-ugc/values.yaml @@ -25,14 +25,26 @@ ingress: annotations: {} httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} - authentication: secret: server: diff --git a/charts/sophora-webclient/values.yaml b/charts/sophora-webclient/values.yaml index cd3b4198..8627b090 100644 --- a/charts/sophora-webclient/values.yaml +++ b/charts/sophora-webclient/values.yaml @@ -51,11 +51,24 @@ ingress: annotations: {} httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} service: diff --git a/charts/sophora-youtube-connector/values.yaml b/charts/sophora-youtube-connector/values.yaml index c78954d1..703ab2ab 100644 --- a/charts/sophora-youtube-connector/values.yaml +++ b/charts/sophora-youtube-connector/values.yaml @@ -48,11 +48,24 @@ ingress: tls: [] httpRoute: + # httpRoute.enabled Whether to create an HTTPRoute resource (Gateway API) enabled: false + # httpRoute.parentRefs References to the Gateway resources that the HTTPRoute should attach to + # e.g. + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace parentRefs: [] + # httpRoute.hostnames Array with hostnames used for the HTTPRoute + # e.g. + # hostnames: + # - "oneko.my-company.com" hostnames: [] + # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix + # httpRoute.pathValue Value of the HTTP request path to match against. pathValue: / + # httpRoute.annotations annotations for the HTTPRoute annotations: {} serviceAccount: From 07b773d166920e7849540ce8fc1f89adef18f827 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 13:08:14 +0100 Subject: [PATCH 11/26] document comment style in values.yaml --- charts/decisions/0002-values-documentation.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 charts/decisions/0002-values-documentation.md diff --git a/charts/decisions/0002-values-documentation.md b/charts/decisions/0002-values-documentation.md new file mode 100644 index 00000000..26c190db --- /dev/null +++ b/charts/decisions/0002-values-documentation.md @@ -0,0 +1,48 @@ +# Documenting values with comments in YAML + +| | | +|-----------|-------------------------------------------------------------| +| status | proposed | +| date | 2026-02-13 | +| deciders | Daniel Raap (subshell) | +| consulted | - | +| informed | - | +| | | + +## Context and Problem Statement + +The purpose and format of a property in the charts values.yaml must be communicated to the chart user. Just the key in the values is often not enough to describe its purpose and usage. + +## Considered Options + +* Write an extensive ReadMe file that desribes all aspects of the values.yaml. +* Add comments directly inside the values.yaml file. + +## Decision Outcome + +Chosen option: "Add comments directly" in most cases. When detailed explanation is needed a paragraph in a ReadMe.md can be added. + +We follow the [documentation recommendation by Helm](https://helm.sh/docs/chart_best_practices/values/#document-valuesyaml) to start each comment with the property name. + +> Every defined property in `values.yaml` should be documented. The documentation string should begin with the name of the property that it describes, and then give at least a one-sentence description. + +> Beginning each comment with the name of the parameter it documents makes it easy to grep out documentation, and will enable documentation tools to reliably correlate doc strings with the parameters they describe. + +### Pros and Cons of Comments + +Pro: +- It is easy to write a comment directly beside the YAML structure. +- A comment directly explains the YAML key and value. +- can be processed by tools parsing the values.yaml file. + +Cons: +- The documentation is only visible when viewing the raw values.yaml file + +## Example + +```yaml +# serverHost is the host name for the webserver +serverHost: example +# serverPort is the HTTP listener port for the webserver +serverPort: 9191 +``` From b5c0d2cae2f3196f8a452d48a0bb0180a0b65304 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 15:55:26 +0100 Subject: [PATCH 12/26] move decisions/0002 to toplevel folder --- {charts/decisions => decisions}/0002-values-documentation.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {charts/decisions => decisions}/0002-values-documentation.md (100%) diff --git a/charts/decisions/0002-values-documentation.md b/decisions/0002-values-documentation.md similarity index 100% rename from charts/decisions/0002-values-documentation.md rename to decisions/0002-values-documentation.md From 288f764e5f5a388db0c05031ff035ab7462c47cb Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 15:58:32 +0100 Subject: [PATCH 13/26] use hostname "my-service.example.com" for example in comments --- charts/o-neko-catnip/values.yaml | 2 +- charts/o-neko/values.yaml | 2 +- charts/sophora-admin-dashboard/values.yaml | 2 +- charts/sophora-ai/values.yaml | 2 +- charts/sophora-contentapi/values.yaml | 2 +- charts/sophora-image-access-service/values.yaml | 2 +- charts/sophora-image-ai/values.yaml | 2 +- charts/sophora-importer/values.yaml | 2 +- charts/sophora-indexing-service/values.yaml | 2 +- charts/sophora-linkchecker/values.yaml | 2 +- charts/sophora-media-finder/values.yaml | 2 +- charts/sophora-metadata-supplier/values.yaml | 2 +- charts/sophora-schema-docs/values.yaml | 2 +- charts/sophora-seo-check/values.yaml | 2 +- charts/sophora-server/values.yaml | 2 +- charts/sophora-ugc/values.yaml | 2 +- charts/sophora-webclient/values.yaml | 2 +- charts/sophora-youtube-connector/values.yaml | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/charts/o-neko-catnip/values.yaml b/charts/o-neko-catnip/values.yaml index a1583eb5..30e30139 100644 --- a/charts/o-neko-catnip/values.yaml +++ b/charts/o-neko-catnip/values.yaml @@ -131,7 +131,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "catnip.oneko.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/o-neko/values.yaml b/charts/o-neko/values.yaml index f984fff4..0a684818 100644 --- a/charts/o-neko/values.yaml +++ b/charts/o-neko/values.yaml @@ -160,7 +160,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute ## e.g. ## hostnames: - ## - "oneko.my-company.com" + ## - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-admin-dashboard/values.yaml b/charts/sophora-admin-dashboard/values.yaml index 3a458e38..e5348df4 100644 --- a/charts/sophora-admin-dashboard/values.yaml +++ b/charts/sophora-admin-dashboard/values.yaml @@ -220,7 +220,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-ai/values.yaml b/charts/sophora-ai/values.yaml index 0a0962bd..8f951ae1 100644 --- a/charts/sophora-ai/values.yaml +++ b/charts/sophora-ai/values.yaml @@ -228,7 +228,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-contentapi/values.yaml b/charts/sophora-contentapi/values.yaml index 1517c38a..2a87e139 100644 --- a/charts/sophora-contentapi/values.yaml +++ b/charts/sophora-contentapi/values.yaml @@ -82,7 +82,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index 60725f6f..a94a3e1b 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -91,7 +91,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-image-ai/values.yaml b/charts/sophora-image-ai/values.yaml index d827b598..cc9dbf38 100644 --- a/charts/sophora-image-ai/values.yaml +++ b/charts/sophora-image-ai/values.yaml @@ -75,7 +75,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-importer/values.yaml b/charts/sophora-importer/values.yaml index 0a575c54..5810b24d 100644 --- a/charts/sophora-importer/values.yaml +++ b/charts/sophora-importer/values.yaml @@ -146,7 +146,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.rules List of rules and filters applied. # e.g. diff --git a/charts/sophora-indexing-service/values.yaml b/charts/sophora-indexing-service/values.yaml index f0bc8c58..7da3ace2 100644 --- a/charts/sophora-indexing-service/values.yaml +++ b/charts/sophora-indexing-service/values.yaml @@ -105,7 +105,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-linkchecker/values.yaml b/charts/sophora-linkchecker/values.yaml index 15a06bb8..b3484335 100644 --- a/charts/sophora-linkchecker/values.yaml +++ b/charts/sophora-linkchecker/values.yaml @@ -82,7 +82,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-media-finder/values.yaml b/charts/sophora-media-finder/values.yaml index 745717c2..05b98bec 100644 --- a/charts/sophora-media-finder/values.yaml +++ b/charts/sophora-media-finder/values.yaml @@ -46,7 +46,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-metadata-supplier/values.yaml b/charts/sophora-metadata-supplier/values.yaml index eb1128cc..dfc22444 100644 --- a/charts/sophora-metadata-supplier/values.yaml +++ b/charts/sophora-metadata-supplier/values.yaml @@ -111,7 +111,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-schema-docs/values.yaml b/charts/sophora-schema-docs/values.yaml index af2eedb1..b23fbf32 100644 --- a/charts/sophora-schema-docs/values.yaml +++ b/charts/sophora-schema-docs/values.yaml @@ -115,7 +115,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-seo-check/values.yaml b/charts/sophora-seo-check/values.yaml index 54d2c249..af3a6908 100644 --- a/charts/sophora-seo-check/values.yaml +++ b/charts/sophora-seo-check/values.yaml @@ -66,7 +66,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index 96e53cae..10dd5061 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -397,7 +397,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-ugc/values.yaml b/charts/sophora-ugc/values.yaml index 0e983a35..4e51bba8 100644 --- a/charts/sophora-ugc/values.yaml +++ b/charts/sophora-ugc/values.yaml @@ -36,7 +36,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-webclient/values.yaml b/charts/sophora-webclient/values.yaml index 8627b090..4d85ea62 100644 --- a/charts/sophora-webclient/values.yaml +++ b/charts/sophora-webclient/values.yaml @@ -62,7 +62,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix diff --git a/charts/sophora-youtube-connector/values.yaml b/charts/sophora-youtube-connector/values.yaml index 703ab2ab..24f451f8 100644 --- a/charts/sophora-youtube-connector/values.yaml +++ b/charts/sophora-youtube-connector/values.yaml @@ -59,7 +59,7 @@ httpRoute: # httpRoute.hostnames Array with hostnames used for the HTTPRoute # e.g. # hostnames: - # - "oneko.my-company.com" + # - "my-service.example.com" hostnames: [] # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) pathMatchType: PathPrefix From 5d1e8a8f1d5043785b7f39932b4ba4aef7ee0096 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 17:14:10 +0100 Subject: [PATCH 14/26] make configuration more flexible with `matches` and `filters` blocks replacing pathMatchType and pathValue --- charts/o-neko-catnip/templates/httproute.yaml | 10 +++-- charts/o-neko-catnip/values.yaml | 20 ++++++++-- charts/o-neko/templates/httproute.yaml | 10 +++-- charts/o-neko/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-admin-dashboard/values.yaml | 20 ++++++++-- charts/sophora-ai/templates/httproute.yaml | 10 +++-- charts/sophora-ai/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-contentapi/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 13 ++++--- .../sophora-image-access-service/values.yaml | 20 ++++++++-- .../sophora-image-ai/templates/httproute.yaml | 10 +++-- charts/sophora-image-ai/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-indexing-service/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-linkchecker/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-media-finder/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-metadata-supplier/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-schema-docs/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-seo-check/values.yaml | 20 ++++++++-- .../templates/grpc-httproute.yaml | 10 +++-- .../sophora-server/templates/httproute.yaml | 10 +++-- charts/sophora-server/values.yaml | 38 ++++++++++++++++--- charts/sophora-ugc/templates/httproute.yaml | 10 +++-- charts/sophora-ugc/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-webclient/values.yaml | 20 ++++++++-- .../templates/httproute.yaml | 10 +++-- charts/sophora-youtube-connector/values.yaml | 20 ++++++++-- 35 files changed, 415 insertions(+), 126 deletions(-) diff --git a/charts/o-neko-catnip/templates/httproute.yaml b/charts/o-neko-catnip/templates/httproute.yaml index 842951b8..38fb66e8 100644 --- a/charts/o-neko-catnip/templates/httproute.yaml +++ b/charts/o-neko-catnip/templates/httproute.yaml @@ -22,8 +22,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: 8080 + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/o-neko-catnip/values.yaml b/charts/o-neko-catnip/values.yaml index 30e30139..282e7730 100644 --- a/charts/o-neko-catnip/values.yaml +++ b/charts/o-neko-catnip/values.yaml @@ -133,10 +133,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/o-neko/templates/httproute.yaml b/charts/o-neko/templates/httproute.yaml index 861b0cd2..97ea585b 100644 --- a/charts/o-neko/templates/httproute.yaml +++ b/charts/o-neko/templates/httproute.yaml @@ -22,8 +22,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: 8080 + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/o-neko/values.yaml b/charts/o-neko/values.yaml index 0a684818..d2f81974 100644 --- a/charts/o-neko/values.yaml +++ b/charts/o-neko/values.yaml @@ -162,10 +162,22 @@ httpRoute: ## hostnames: ## - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-admin-dashboard/templates/httproute.yaml b/charts/sophora-admin-dashboard/templates/httproute.yaml index 44135402..9f6b1aa5 100644 --- a/charts/sophora-admin-dashboard/templates/httproute.yaml +++ b/charts/sophora-admin-dashboard/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-admin-dashboard/values.yaml b/charts/sophora-admin-dashboard/values.yaml index e5348df4..9e84dd81 100644 --- a/charts/sophora-admin-dashboard/values.yaml +++ b/charts/sophora-admin-dashboard/values.yaml @@ -222,10 +222,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-ai/templates/httproute.yaml b/charts/sophora-ai/templates/httproute.yaml index a77ad387..499acc76 100644 --- a/charts/sophora-ai/templates/httproute.yaml +++ b/charts/sophora-ai/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-ai/values.yaml b/charts/sophora-ai/values.yaml index 8f951ae1..38bbf48d 100644 --- a/charts/sophora-ai/values.yaml +++ b/charts/sophora-ai/values.yaml @@ -230,10 +230,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-contentapi/templates/httproute.yaml b/charts/sophora-contentapi/templates/httproute.yaml index 7283e7d0..56e0efbc 100644 --- a/charts/sophora-contentapi/templates/httproute.yaml +++ b/charts/sophora-contentapi/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-contentapi/values.yaml b/charts/sophora-contentapi/values.yaml index 2a87e139..a36fe0af 100644 --- a/charts/sophora-contentapi/values.yaml +++ b/charts/sophora-contentapi/values.yaml @@ -84,10 +84,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-image-access-service/templates/httproute.yaml b/charts/sophora-image-access-service/templates/httproute.yaml index 5bd39371..446287f1 100644 --- a/charts/sophora-image-access-service/templates/httproute.yaml +++ b/charts/sophora-image-access-service/templates/httproute.yaml @@ -30,9 +30,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ $httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ $httpRoute.pathValue | default "/" }} ---- -{{ end }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index a94a3e1b..fb613083 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -93,10 +93,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-image-ai/templates/httproute.yaml b/charts/sophora-image-ai/templates/httproute.yaml index 91221e7c..d0716f24 100644 --- a/charts/sophora-image-ai/templates/httproute.yaml +++ b/charts/sophora-image-ai/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-image-ai/values.yaml b/charts/sophora-image-ai/values.yaml index cc9dbf38..a47c3900 100644 --- a/charts/sophora-image-ai/values.yaml +++ b/charts/sophora-image-ai/values.yaml @@ -77,10 +77,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-indexing-service/templates/httproute.yaml b/charts/sophora-indexing-service/templates/httproute.yaml index fc307528..3608ff89 100644 --- a/charts/sophora-indexing-service/templates/httproute.yaml +++ b/charts/sophora-indexing-service/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-indexing-service/values.yaml b/charts/sophora-indexing-service/values.yaml index 7da3ace2..1c523275 100644 --- a/charts/sophora-indexing-service/values.yaml +++ b/charts/sophora-indexing-service/values.yaml @@ -107,10 +107,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-linkchecker/templates/httproute.yaml b/charts/sophora-linkchecker/templates/httproute.yaml index 7dee259c..9a7c459e 100644 --- a/charts/sophora-linkchecker/templates/httproute.yaml +++ b/charts/sophora-linkchecker/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-linkchecker/values.yaml b/charts/sophora-linkchecker/values.yaml index b3484335..88fa796b 100644 --- a/charts/sophora-linkchecker/values.yaml +++ b/charts/sophora-linkchecker/values.yaml @@ -84,10 +84,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-media-finder/templates/httproute.yaml b/charts/sophora-media-finder/templates/httproute.yaml index 01f425d0..370f6b06 100644 --- a/charts/sophora-media-finder/templates/httproute.yaml +++ b/charts/sophora-media-finder/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-media-finder/values.yaml b/charts/sophora-media-finder/values.yaml index 05b98bec..d78003ee 100644 --- a/charts/sophora-media-finder/values.yaml +++ b/charts/sophora-media-finder/values.yaml @@ -48,10 +48,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-metadata-supplier/templates/httproute.yaml b/charts/sophora-metadata-supplier/templates/httproute.yaml index 22cb4d93..2641c0bc 100644 --- a/charts/sophora-metadata-supplier/templates/httproute.yaml +++ b/charts/sophora-metadata-supplier/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-metadata-supplier/values.yaml b/charts/sophora-metadata-supplier/values.yaml index dfc22444..f0284b0b 100644 --- a/charts/sophora-metadata-supplier/values.yaml +++ b/charts/sophora-metadata-supplier/values.yaml @@ -113,10 +113,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-schema-docs/templates/httproute.yaml b/charts/sophora-schema-docs/templates/httproute.yaml index 99593888..5b7c23c0 100644 --- a/charts/sophora-schema-docs/templates/httproute.yaml +++ b/charts/sophora-schema-docs/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-schema-docs/values.yaml b/charts/sophora-schema-docs/values.yaml index b23fbf32..008112ef 100644 --- a/charts/sophora-schema-docs/values.yaml +++ b/charts/sophora-schema-docs/values.yaml @@ -117,10 +117,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-seo-check/templates/httproute.yaml b/charts/sophora-seo-check/templates/httproute.yaml index 1069e77d..2a3e3f32 100644 --- a/charts/sophora-seo-check/templates/httproute.yaml +++ b/charts/sophora-seo-check/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-seo-check/values.yaml b/charts/sophora-seo-check/values.yaml index af3a6908..46cac0b1 100644 --- a/charts/sophora-seo-check/values.yaml +++ b/charts/sophora-seo-check/values.yaml @@ -68,10 +68,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-server/templates/grpc-httproute.yaml b/charts/sophora-server/templates/grpc-httproute.yaml index 1e47326f..8ac554e4 100644 --- a/charts/sophora-server/templates/grpc-httproute.yaml +++ b/charts/sophora-server/templates/grpc-httproute.yaml @@ -25,8 +25,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ .Values.sophora.server.ports.grpc }} + {{- with .Values.grpcHttproute.matches }} matches: - - path: - type: {{ .Values.grpcHttproute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.grpcHttproute.pathValue | default "/sophora.srpc" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.grpcHttproute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-server/templates/httproute.yaml b/charts/sophora-server/templates/httproute.yaml index 44fa5fc4..3d922fb3 100644 --- a/charts/sophora-server/templates/httproute.yaml +++ b/charts/sophora-server/templates/httproute.yaml @@ -24,8 +24,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ .Values.sophora.server.ports.http }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index 10dd5061..32056276 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -399,10 +399,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # httpRoute.matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: / + matches: [] + # httpRoute.filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} @@ -418,8 +430,22 @@ grpcHttproute: # hostnames: # - "server.example.com" hostnames: [] - pathMatchType: PathPrefix - pathValue: /sophora.srpc + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] annotations: {} service: diff --git a/charts/sophora-ugc/templates/httproute.yaml b/charts/sophora-ugc/templates/httproute.yaml index a5439bec..ea7e423e 100644 --- a/charts/sophora-ugc/templates/httproute.yaml +++ b/charts/sophora-ugc/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-ugc/values.yaml b/charts/sophora-ugc/values.yaml index 4e51bba8..dc948859 100644 --- a/charts/sophora-ugc/values.yaml +++ b/charts/sophora-ugc/values.yaml @@ -38,10 +38,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-webclient/templates/httproute.yaml b/charts/sophora-webclient/templates/httproute.yaml index 6686c39e..1dc19136 100644 --- a/charts/sophora-webclient/templates/httproute.yaml +++ b/charts/sophora-webclient/templates/httproute.yaml @@ -23,8 +23,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ .Values.service.port }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-webclient/values.yaml b/charts/sophora-webclient/values.yaml index 4d85ea62..cb800fd8 100644 --- a/charts/sophora-webclient/values.yaml +++ b/charts/sophora-webclient/values.yaml @@ -64,10 +64,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} diff --git a/charts/sophora-youtube-connector/templates/httproute.yaml b/charts/sophora-youtube-connector/templates/httproute.yaml index 709f9e84..33832681 100644 --- a/charts/sophora-youtube-connector/templates/httproute.yaml +++ b/charts/sophora-youtube-connector/templates/httproute.yaml @@ -26,8 +26,12 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} + {{- with .Values.httpRoute.matches }} matches: - - path: - type: {{ .Values.httpRoute.pathMatchType | default "PathPrefix" }} - value: {{ .Values.httpRoute.pathValue | default "/" }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.httpRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-youtube-connector/values.yaml b/charts/sophora-youtube-connector/values.yaml index 24f451f8..9ab7475b 100644 --- a/charts/sophora-youtube-connector/values.yaml +++ b/charts/sophora-youtube-connector/values.yaml @@ -61,10 +61,22 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.pathMatchType Type specifies how to match against the HTTP request path. (PathPrefix, Exact or RegularExpression) - pathMatchType: PathPrefix - # httpRoute.pathValue Value of the HTTP request path to match against. - pathValue: / + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} From 2be4c9e87fc1a679bc9a0142007e2c9a105ad5f8 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 17:39:13 +0100 Subject: [PATCH 15/26] merged sophora-importer httpRoute.rules with new settings for matches and filters --- charts/sophora-importer/CHANGELOG.md | 8 ++++++ charts/sophora-importer/Chart.yaml | 2 +- .../sophora-importer/templates/httproute.yaml | 27 ++++++++++++------- charts/sophora-importer/test-values.yaml | 14 ++++++---- charts/sophora-importer/values.yaml | 18 ++++++++++++- 5 files changed, 52 insertions(+), 17 deletions(-) diff --git a/charts/sophora-importer/CHANGELOG.md b/charts/sophora-importer/CHANGELOG.md index 09f42e15..3fe35a47 100644 --- a/charts/sophora-importer/CHANGELOG.md +++ b/charts/sophora-importer/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.5.0 + +- Updated HTTPRoute configuration for consistency with `httpRoute.matches` and `httpRoute.filters`. Deprecated `httpRoute.rules` in favor of new properties. Breaking: only first rule of `httpRoute.rules` is used! + +## 2.4.0 + +- added optional HTTPRoute for Gateway API + ## 2.3.0 - enable custom pod labels diff --git a/charts/sophora-importer/Chart.yaml b/charts/sophora-importer/Chart.yaml index 52fddb6f..9f771c62 100644 --- a/charts/sophora-importer/Chart.yaml +++ b/charts/sophora-importer/Chart.yaml @@ -19,7 +19,7 @@ version: 2.5.0 annotations: artifacthub.io/changes: | - kind: changed - description: "Updated HTTPRoute configuration for consistency" + description: "Updated HTTPRoute configuration for consistency with httpRoute.matches and httpRoute.filters. Deprecated httpRoute.rules in favor of httpRoute.matches, Breaking: only first rule of httpRoute.rules is used!" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/sophora-importer/templates/httproute.yaml b/charts/sophora-importer/templates/httproute.yaml index f90ae1a5..19af18bd 100644 --- a/charts/sophora-importer/templates/httproute.yaml +++ b/charts/sophora-importer/templates/httproute.yaml @@ -1,6 +1,14 @@ {{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-importer.fullname" . -}} {{- $svcPort := .Values.service.httpPort -}} +{{- $rules := list (dict) -}} +{{/* backward compatible to version 2.4.x */}} +{{- $firstRule := dict -}} +{{- if .Values.httpRoute.rules -}} + {{- $firstRule = first .Values.httpRoute.rules -}} +{{- else if or .Values.httpRoute.matches .Values.httpRoute.filters -}} + {{- $firstRule = dict "matches" .Values.httpRoute.matches "filters" .Values.httpRoute.filters -}} +{{- end -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: @@ -21,16 +29,15 @@ spec: {{- toYaml . | nindent 4 }} {{- end }} rules: - {{- range .Values.httpRoute.rules }} - - matches: - {{- toYaml .matches | nindent 8 }} - {{- with .filters }} - filters: - {{- toYaml . | nindent 8 }} - {{- end }} - backendRefs: + - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} - weight: 1 - {{- end }} + {{- with $firstRule.matches }} + matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with $firstRule.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} diff --git a/charts/sophora-importer/test-values.yaml b/charts/sophora-importer/test-values.yaml index 62b125a3..c7525646 100644 --- a/charts/sophora-importer/test-values.yaml +++ b/charts/sophora-importer/test-values.yaml @@ -140,9 +140,13 @@ httpRoute: # Hostnames matching HTTP header. hostnames: - chart-example.local + matches: + - path: + type: PathPrefix + value: /headers # List of rules and filters applied. - rules: - - matches: - - path: - type: PathPrefix - value: /headers \ No newline at end of file + #rules: + # - matches: + # - path: + # type: PathPrefix + # value: /headers \ No newline at end of file diff --git a/charts/sophora-importer/values.yaml b/charts/sophora-importer/values.yaml index 5810b24d..a2507be1 100644 --- a/charts/sophora-importer/values.yaml +++ b/charts/sophora-importer/values.yaml @@ -148,7 +148,23 @@ httpRoute: # hostnames: # - "my-service.example.com" hostnames: [] - # httpRoute.rules List of rules and filters applied. + # matches Optional array of HTTPRouteMatch objects for matching HTTP requests + # e.g. + # matches: + # - path: + # type: PathPrefix + # value: /sophora.srpc + matches: [] + # filters Optional array of HTTPRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] + # httpRoute.rules !DEPRECATED use matches and filters instead! This will override matches/filters. List of rules and filters applied. # e.g. # rules: # - matches: From 8df2fdd59f7d5eadcb53d3955794269b2b85ecd9 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 18:01:30 +0100 Subject: [PATCH 16/26] Apply suggestions from code review of Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- HTTPROUTE_CHANGES.md | 2 +- charts/o-neko-catnip/templates/httproute.yaml | 4 +++- charts/o-neko/templates/httproute.yaml | 4 +++- charts/sophora-image-access-service/templates/httproute.yaml | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HTTPROUTE_CHANGES.md b/HTTPROUTE_CHANGES.md index d639c70d..055c37ac 100644 --- a/HTTPROUTE_CHANGES.md +++ b/HTTPROUTE_CHANGES.md @@ -60,7 +60,7 @@ httpRoute: 2. **sophora-importer**: Already had HTTPRoute support with a more advanced configuration including custom rules and filters. -3. **sophora-server**: Supports additional HTTPRoute for gRPC serivce via `grpcHttproute`, similar to its `grpcIngress` support. +3. **sophora-server**: Supports additional HTTPRoute for gRPC service via `grpcHttproute`, similar to its `grpcIngress` support. ## Usage Example diff --git a/charts/o-neko-catnip/templates/httproute.yaml b/charts/o-neko-catnip/templates/httproute.yaml index 38fb66e8..56da5449 100644 --- a/charts/o-neko-catnip/templates/httproute.yaml +++ b/charts/o-neko-catnip/templates/httproute.yaml @@ -14,10 +14,12 @@ spec: parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- range .Values.httpRoute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: + {{- range .Values.httpRoute.hostnames }} - {{ required "A hostname for the HTTPRoute must be provided in .Values.httpRoute.hostnames" . | quote }} {{- end }} + {{- end }} rules: - backendRefs: - name: {{ $fullName }} diff --git a/charts/o-neko/templates/httproute.yaml b/charts/o-neko/templates/httproute.yaml index 97ea585b..bbd7ad89 100644 --- a/charts/o-neko/templates/httproute.yaml +++ b/charts/o-neko/templates/httproute.yaml @@ -14,10 +14,12 @@ spec: parentRefs: {{- toYaml . | nindent 4 }} {{- end }} - {{- range .Values.httpRoute.hostnames }} + {{- if .Values.httpRoute.hostnames }} hostnames: + {{- range .Values.httpRoute.hostnames }} - {{ required "A hostname for the HTTPRoute must be provided in .Values.httpRoute.hostnames" . | quote }} {{- end }} + {{- end }} rules: - backendRefs: - name: {{ $fullName }} diff --git a/charts/sophora-image-access-service/templates/httproute.yaml b/charts/sophora-image-access-service/templates/httproute.yaml index 446287f1..ab3e8b30 100644 --- a/charts/sophora-image-access-service/templates/httproute.yaml +++ b/charts/sophora-image-access-service/templates/httproute.yaml @@ -30,11 +30,11 @@ spec: - backendRefs: - name: {{ $fullName }} port: {{ $svcPort }} - {{- with .Values.httpRoute.matches }} + {{- with $httpRoute.matches }} matches: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.httpRoute.filters }} + {{- with $httpRoute.filters }} filters: {{- toYaml . | nindent 8 }} {{- end }} From 5db495ec833615a855cc7c47a425c6e161c8d3e0 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 18:02:29 +0100 Subject: [PATCH 17/26] fix typo --- decisions/0002-values-documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decisions/0002-values-documentation.md b/decisions/0002-values-documentation.md index 26c190db..c4ff8bf2 100644 --- a/decisions/0002-values-documentation.md +++ b/decisions/0002-values-documentation.md @@ -15,7 +15,7 @@ The purpose and format of a property in the charts values.yaml must be communica ## Considered Options -* Write an extensive ReadMe file that desribes all aspects of the values.yaml. +* Write an extensive ReadMe file that describes all aspects of the values.yaml. * Add comments directly inside the values.yaml file. ## Decision Outcome From 33818366785981b62641e66b741a2623a6745b21 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 18:09:52 +0100 Subject: [PATCH 18/26] less example for httpRoute.rules in sophora-importer chart --- charts/sophora-importer/values.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/charts/sophora-importer/values.yaml b/charts/sophora-importer/values.yaml index a2507be1..288690f7 100644 --- a/charts/sophora-importer/values.yaml +++ b/charts/sophora-importer/values.yaml @@ -171,11 +171,6 @@ httpRoute: # - path: # type: PathPrefix # value: /headers - # filters: - # - type: RequestHeaderModifier - # requestHeaderModifier: - # remove: - # - X-my-header rules: [] # httpRoute.annotations annotations for the HTTPRoute annotations: {} From bf40aff1a0d26f478d86111da46d886fde154d4b Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 18:56:33 +0100 Subject: [PATCH 19/26] also provide a GRPCRoute in sophora-server --- .../sophora-server/templates/grpcRoute.yaml | 35 +++++++++++++++++++ charts/sophora-server/test-values.yaml | 14 ++++++++ charts/sophora-server/values.yaml | 32 ++++++++++++++++- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 charts/sophora-server/templates/grpcRoute.yaml diff --git a/charts/sophora-server/templates/grpcRoute.yaml b/charts/sophora-server/templates/grpcRoute.yaml new file mode 100644 index 00000000..63a999b1 --- /dev/null +++ b/charts/sophora-server/templates/grpcRoute.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.grpcRoute.enabled .Values.sophora.grpcApi.enabled -}} + {{- $fullName := include "sophora-server.fullname" . -}} +apiVersion: gateway.networking.k8s.io/v1 +kind: GRPCRoute +metadata: + name: {{ $fullName }} + labels: {{ include "sophora-server.topLevelLabels" . | nindent 4 }} + {{- with .Values.grpcRoute.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.grpcRoute.parentRefs }} + parentRefs: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- if .Values.grpcRoute.hostnames }} + hostnames: + {{- range .Values.grpcRoute.hostnames }} + - {{ . | quote }} + {{- end }} + {{- end }} + rules: + - backendRefs: + - name: {{ $fullName }} + port: {{ .Values.sophora.server.ports.grpc }} + {{- with .Values.grpcRoute.matches }} + matches: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.grpcRoute.filters }} + filters: + {{- toYaml . | nindent 8 }} + {{- end }} +{{- end }} diff --git a/charts/sophora-server/test-values.yaml b/charts/sophora-server/test-values.yaml index 84af0845..86884efc 100644 --- a/charts/sophora-server/test-values.yaml +++ b/charts/sophora-server/test-values.yaml @@ -153,6 +153,20 @@ grpcHttproute: hostnames: - "sophora-server.test.example.com" +grpcRoute: + enabled: true + parentRefs: + - name: test-gateway + namespace: gateway-system + hostnames: + - "sophora-server-api.test.example.com" + matches: + - method: + type: RegularExpression + service : sophora\.srpc.* + annotations: + example.com/test: some value + extraDeploy: - | apiVersion: keda.sh/v1alpha1 diff --git a/charts/sophora-server/values.yaml b/charts/sophora-server/values.yaml index 32056276..400aa515 100644 --- a/charts/sophora-server/values.yaml +++ b/charts/sophora-server/values.yaml @@ -418,7 +418,7 @@ httpRoute: # httpRoute.annotations annotations for the HTTPRoute annotations: {} -# This can be used to configure a different HttpRoute for the SRPC service as it might require different settings. +# This can be used to configure a different HttpRoute for the SRPC service as it might require different settings. Can be used with the same hostname as httpRoute, see https://gateway-api.sigs.k8s.io/api-types/grpcroute/#cross-serving. # The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC # The paths can be regex-matched since all SRPC-calls have the root-path sophora.srpc grpcHttproute: @@ -448,6 +448,36 @@ grpcHttproute: filters: [] annotations: {} +# This can be used to configure a GRPCRoute for the SRPC service. This must use another hostname than `httpRoute`. For the same hostname use `grpcHttproute`. +# The SRPC-communication relies on gRPC as communication protocol and e.g. nginx needs to be explicitly informed that the backend protocol is gRPC +# The service can be matched since all SRPC-calls have the sophora.srpc package +grpcRoute: + enabled: false + # parentRefs: + # - name: my-gateway + # namespace: gateway-namespace + parentRefs: [] + # hostnames: + # - "server.example.com" + hostnames: [] + # matches Optional array of GRPCRouteMatch objects for matching gRPC requests + # e.g. + # matches: + # - method: + # type: RegularExpression + # service : sophora\.srpc.* + matches: [] + # filters Optional array of GRPCRouteFilter objects for modifying requests/responses + # e.g. + # filters: + # - type: RequestHeaderModifier + # requestHeaderModifier: + # set: + # - name: X-Custom-Header + # value: custom-value + filters: [] + annotations: {} + service: annotations: {} headlessAnnotations: {} From 4958c098b1056bae63ab06b437cb0e49a56213f8 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Fri, 13 Feb 2026 19:04:06 +0100 Subject: [PATCH 20/26] document new httpRoute properties of sophora-server charts --- charts/sophora-server/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/charts/sophora-server/README.md b/charts/sophora-server/README.md index 7eed9040..32ed98f3 100644 --- a/charts/sophora-server/README.md +++ b/charts/sophora-server/README.md @@ -56,12 +56,11 @@ See also: [Postgres Native Sidecar](#postgres-native-sidecar-k8s-129) ## Sophora RPC (Sophora v6+) Sophora 6 introduces a completely new API for client-server communication called Sophora RPC (short srpc). Srpc is based on gRPC which in return is essentially HTTP/2 but requires specific non-default settings in most HTTP proxies, including Ingress Controllers. -To deal with this, the chart now supports deploying a second Ingress for the gRPC API, which can be configured differently from the main Ingress. +To deal with this, the chart now supports deploying a second Ingress or HTTPRoute for the gRPC API, which can be configured differently from the main Ingress/HTTPRoute. This is not enabled by default. -To enable it, set `grpcIngress.enabled` to `true` and configure it as needed. -The example configuration contains the required -settings for the Nginx Ingress Controller (all paths starting with `/sophora.srpc.` need to be forwarded as gRPC traffic). +To enable it, set `grpcIngress.enabled`, `grpcRoute.enabled` or `grpcHttproute` to `true` and configure it as needed. +The example configuration contains the required settings for the Nginx Ingress Controller (all paths starting with `/sophora.srpc.` need to be forwarded as gRPC traffic). Use `grpcHttproute` instead of `grpcRoute` if the same hostname is used as for the `httpRoute` (see [Cross Serving](https://gateway-api.sigs.k8s.io/api-types/grpcroute/#cross-serving)). ## Tips for productive installations @@ -216,6 +215,10 @@ sophora.persistence.postgres.port=5432 ## Notable Changes +### 3.2.0 + +* Added HTTPRoute support for Gateway API. This adds the properties `httpRoute`, `grpcHttproute` and `grpcRoute` to the values. These are similar to the `ingress` and `grpcIngress` options. + ### 3.0.0 * Added the option do disable JCR support. Set `sophora.server.persistence.repositoryType` to `none`, if you use Sophora 6.1.0 or later and completed the postgres migration. From fb685a7fb28504e3b1d746eb2fbc0649d943fa40 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Tue, 17 Feb 2026 09:31:10 +0100 Subject: [PATCH 21/26] replaced remaining 'pathMatchType', extended test-values for sophora-image-access-service --- HTTPROUTE_CHANGES.md | 4 ++-- .../templates/httproute.yaml | 1 + .../sophora-image-access-service/test-values.yaml | 14 ++++++++++++++ charts/sophora-image-access-service/values.yaml | 4 ++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/HTTPROUTE_CHANGES.md b/HTTPROUTE_CHANGES.md index 055c37ac..a275a479 100644 --- a/HTTPROUTE_CHANGES.md +++ b/HTTPROUTE_CHANGES.md @@ -49,8 +49,8 @@ httpRoute: enabled: false # Whether to create HTTPRoute (disabled by default) parentRefs: [] # Gateway references hostnames: [] # Hostnames for routing - pathMatchType: PathPrefix # Path match type (PathPrefix, Exact, RegularExpression) - pathValue: / # Path value for matching + matches: [] # array of HTTPRouteMatch objects for matching HTTP requests + filters: [] # array of HTTPRouteFilter objects for modifying requests/responses annotations: {} # Additional annotations ``` diff --git a/charts/sophora-image-access-service/templates/httproute.yaml b/charts/sophora-image-access-service/templates/httproute.yaml index ab3e8b30..969beea5 100644 --- a/charts/sophora-image-access-service/templates/httproute.yaml +++ b/charts/sophora-image-access-service/templates/httproute.yaml @@ -38,4 +38,5 @@ spec: filters: {{- toYaml . | nindent 8 }} {{- end }} +--- {{- end }} diff --git a/charts/sophora-image-access-service/test-values.yaml b/charts/sophora-image-access-service/test-values.yaml index 09a593b6..90709d6b 100644 --- a/charts/sophora-image-access-service/test-values.yaml +++ b/charts/sophora-image-access-service/test-values.yaml @@ -37,6 +37,8 @@ ingress: annotations: foo: bar hosts: + - host: test.example.com + path: / tls: [] extraIngress: @@ -53,6 +55,8 @@ httpRoute: namespace: gateway-system hostnames: - "image-access.test.example.com" + annotations: + test: httpRoute extraHttpRoutes: - parentRefs: @@ -60,6 +64,16 @@ extraHttpRoutes: namespace: gateway-system hostnames: - "image-access-2.test.example.com" + matches: + - path: + type: PathPrefix + value: /images extraDeploy: - apiVersion: subshell/v2 + kind: TestData + meta: + name: an extra resource + spec: + data: foo + diff --git a/charts/sophora-image-access-service/values.yaml b/charts/sophora-image-access-service/values.yaml index fb613083..88623e73 100644 --- a/charts/sophora-image-access-service/values.yaml +++ b/charts/sophora-image-access-service/values.yaml @@ -117,8 +117,8 @@ extraHttpRoutes: [] # - name: my-gateway # hostnames: # - example.com - # pathMatchType: PathPrefix - # pathValue: / + # matches: [] + # filters: [] # annotations: {} serviceAccount: From 23825da85d4fcc0e2e64294859e5e96fa4bd487d Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Tue, 17 Feb 2026 09:53:48 +0100 Subject: [PATCH 22/26] generated helm unittests for sophora-contentapi --- charts/sophora-contentapi/tests/README.md | 128 +++++++ .../tests/configmap_test.yaml | 86 +++++ .../tests/deployment_test.yaml | 313 ++++++++++++++++++ .../tests/extra-list_test.yaml | 60 ++++ .../tests/httproute_test.yaml | 223 +++++++++++++ .../tests/ingress_test.yaml | 196 +++++++++++ .../tests/service_test.yaml | 107 ++++++ .../tests/values/configmap-complex.yaml | 19 ++ .../tests/values/extradeploy-multiple.yaml | 18 + .../tests/values/extradeploy-single.yaml | 7 + .../tests/values/httproute-custom.yaml | 21 ++ .../tests/values/ingress-custom.yaml | 16 + .../tests/values/service-custom.yaml | 7 + 13 files changed, 1201 insertions(+) create mode 100644 charts/sophora-contentapi/tests/README.md create mode 100644 charts/sophora-contentapi/tests/configmap_test.yaml create mode 100644 charts/sophora-contentapi/tests/deployment_test.yaml create mode 100644 charts/sophora-contentapi/tests/extra-list_test.yaml create mode 100644 charts/sophora-contentapi/tests/httproute_test.yaml create mode 100644 charts/sophora-contentapi/tests/ingress_test.yaml create mode 100644 charts/sophora-contentapi/tests/service_test.yaml create mode 100644 charts/sophora-contentapi/tests/values/configmap-complex.yaml create mode 100644 charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml create mode 100644 charts/sophora-contentapi/tests/values/extradeploy-single.yaml create mode 100644 charts/sophora-contentapi/tests/values/httproute-custom.yaml create mode 100644 charts/sophora-contentapi/tests/values/ingress-custom.yaml create mode 100644 charts/sophora-contentapi/tests/values/service-custom.yaml diff --git a/charts/sophora-contentapi/tests/README.md b/charts/sophora-contentapi/tests/README.md new file mode 100644 index 00000000..cf3a470d --- /dev/null +++ b/charts/sophora-contentapi/tests/README.md @@ -0,0 +1,128 @@ +# Sophora Content API Helm Chart Tests + +This directory contains comprehensive unit tests for the sophora-contentapi Helm chart using [helm-unittest](https://github.com/helm-unittest/helm-unittest). + +## Test Files + +- **deployment_test.yaml** - Tests for the Deployment resource including: + - Default values and overrides + - Image configuration + - Java options + - Authentication secrets + - Environment variables + - Probes (startup, readiness, liveness) + - Resource limits and requests + - Pod annotations + - Volume mounts + +- **configmap_test.yaml** - Tests for the ConfigMap resource including: + - Name overrides + - Sophora configuration rendering + - Required configuration validation + - Complex configuration scenarios + +- **service_test.yaml** - Tests for the Service resource including: + - Default service configuration + - Custom service types and ports + - Service annotations + - Selector labels + +- **ingress_test.yaml** - Tests for the Ingress resource including: + - Enabling/disabling ingress + - IngressClassName configuration + - Annotations + - Single and multiple hosts + - TLS configuration + - Path types + +- **httproute_test.yaml** - Tests for the HTTPRoute (Gateway API) resource including: + - Enabling/disabling HTTPRoute + - Parent gateway references + - Hostnames configuration + - Matches and filters + - Annotations + +- **extra-list_test.yaml** - Tests for extraDeploy resources including: + - Rendering custom Kubernetes resources + - Multiple resource types + +## Running Tests + +### Prerequisites + +Install helm-unittest plugin: + +```bash +helm plugin install https://github.com/helm-unittest/helm-unittest +``` + +### Run All Tests + +From the chart root directory: + +```bash +helm unittest . +``` + +### Run Specific Test File + +```bash +helm unittest -f tests/deployment_test.yaml . +``` + +### Run with Verbose Output + +```bash +helm unittest -v . +``` + +### Run with Colored Output + +```bash +helm unittest --color . +``` + +## Test Coverage + +The tests cover all properties defined in values.yaml: + +- ✅ nameOverride / fullnameOverride +- ✅ image.repository / image.tag / image.pullPolicy +- ✅ imagePullSecrets +- ✅ javaOptions +- ✅ sophora.authentication.secret.* +- ✅ sophora.configuration.* +- ✅ startupProbe.* +- ✅ readinessProbe.* +- ✅ livenessProbe.* +- ✅ resources.* +- ✅ contentapi.extraEnv +- ✅ service.* +- ✅ ingress.* +- ✅ httpRoute.* +- ✅ extraDeploy +- ✅ podAnnotations + +## Test Values Files + +The `values/` directory contains test-specific values files used in tests: + +- **service-custom.yaml** - Custom service configuration +- **configmap-complex.yaml** - Complex Sophora configuration +- **ingress-custom.yaml** - Custom ingress configuration +- **httproute-custom.yaml** - Custom HTTPRoute configuration +- **extradeploy-single.yaml** - Single extra resource +- **extradeploy-multiple.yaml** - Multiple extra resources + +## Adding New Tests + +When adding new properties to values.yaml: + +1. Add test cases to the appropriate test file +2. Create new test value files if needed in `values/` directory +3. Update this README with the new test coverage +4. Run tests to ensure they pass + +## Continuous Integration + +These tests should be run as part of the CI/CD pipeline before releasing new chart versions. diff --git a/charts/sophora-contentapi/tests/configmap_test.yaml b/charts/sophora-contentapi/tests/configmap_test.yaml new file mode 100644 index 00000000..b56b4e8c --- /dev/null +++ b/charts/sophora-contentapi/tests/configmap_test.yaml @@ -0,0 +1,86 @@ +suite: test configmap +templates: + - configmap.yaml +tests: + - it: should create configmap with default name + set: + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: ConfigMap + - equal: + path: metadata.name + value: RELEASE-NAME-sophora-contentapi + - matchRegex: + path: metadata.labels["helm.sh/chart"] + pattern: ^sophora-contentapi- + + - it: should use custom fullnameOverride + set: + fullnameOverride: my-contentapi + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: metadata.name + value: my-contentapi + + - it: should contain application.yaml with sophora configuration + set: + sophora.configuration.sophora.client.server-connection.urls[0]: http://server:1196 + sophora.configuration.sophora.client.server-connection.urls[1]: http://server2:1196 + sophora.configuration.contentapi.somekey: somevalue + asserts: + - exists: + path: data["application.yaml"] + - matchRegex: + path: data["application.yaml"] + pattern: "sophora:" + - matchRegex: + path: data["application.yaml"] + pattern: "http://server:1196" + - matchRegex: + path: data["application.yaml"] + pattern: "http://server2:1196" + - matchRegex: + path: data["application.yaml"] + pattern: "contentapi:" + - matchRegex: + path: data["application.yaml"] + pattern: "somekey: somevalue" + + - it: should fail without sophora configuration + asserts: + - failedTemplate: + errorMessage: "A valid application.yaml config is required" + + - it: should render complex sophora configuration + values: + - ./values/configmap-complex.yaml + asserts: + - exists: + path: data["application.yaml"] + - matchRegex: + path: data["application.yaml"] + pattern: "server-connection:" + - matchRegex: + path: data["application.yaml"] + pattern: "urls:" + - matchRegex: + path: data["application.yaml"] + pattern: "contentapi:" + + - it: should have correct labels + set: + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: sophora-contentapi + - equal: + path: metadata.labels["app.kubernetes.io/instance"] + value: RELEASE-NAME + - equal: + path: metadata.labels["app.kubernetes.io/managed-by"] + value: Helm diff --git a/charts/sophora-contentapi/tests/deployment_test.yaml b/charts/sophora-contentapi/tests/deployment_test.yaml new file mode 100644 index 00000000..4e21b1c8 --- /dev/null +++ b/charts/sophora-contentapi/tests/deployment_test.yaml @@ -0,0 +1,313 @@ +suite: test deployment +templates: + - deployment.yaml +tests: + - it: should create deployment with default values + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Deployment + - equal: + path: metadata.name + value: RELEASE-NAME-sophora-contentapi + - matchRegex: + path: metadata.labels["helm.sh/chart"] + pattern: ^sophora-contentapi- + - equal: + path: spec.selector.matchLabels["app.kubernetes.io/name"] + value: sophora-contentapi + - equal: + path: spec.selector.matchLabels["app.kubernetes.io/instance"] + value: RELEASE-NAME + + - it: should use custom fullnameOverride + set: + fullnameOverride: my-custom-name + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: metadata.name + value: my-custom-name + + - it: should use custom nameOverride + set: + nameOverride: custom-contentapi + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: metadata.name + value: RELEASE-NAME-custom-contentapi + + - it: should set correct image configuration + set: + image.repository: my-repo/contentapi + image.tag: 7.0.0 + image.pullPolicy: Always + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: my-repo/contentapi:7.0.0 + - equal: + path: spec.template.spec.containers[0].imagePullPolicy + value: Always + + - it: should use appVersion when tag is not specified + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].image + value: docker.subshell.com/sophora/contentapi:6.0.0 + + - it: should set imagePullSecrets + set: + imagePullSecrets[0].name: my-registry-secret + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.imagePullSecrets[0].name + value: my-registry-secret + + - it: should set custom javaOptions + set: + javaOptions: -Xmx2g -XX:+UseG1GC + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: JDK_JAVA_OPTIONS + value: -Xmx2g -XX:+UseG1GC + + - it: should set default javaOptions + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: JDK_JAVA_OPTIONS + value: -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem + + - it: should configure authentication secret + set: + sophora.authentication.secret.name: my-secret + sophora.authentication.secret.usernameKey: myuser + sophora.authentication.secret.passwordKey: mypass + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: SOPHORA_CLIENT_SERVERCONNECTION_USERNAME + valueFrom: + secretKeyRef: + name: my-secret + key: myuser + - contains: + path: spec.template.spec.containers[0].env + content: + name: SOPHORA_CLIENT_SERVERCONNECTION_PASSWORD + valueFrom: + secretKeyRef: + name: my-secret + key: mypass + + - it: should set extraEnv variables + set: + contentapi.extraEnv[0].name: CUSTOM_VAR + contentapi.extraEnv[0].value: custom-value + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - contains: + path: spec.template.spec.containers[0].env + content: + name: CUSTOM_VAR + value: custom-value + + - it: should configure startup probe + set: + startupProbe.failureThreshold: 20 + startupProbe.initialDelaySeconds: 10 + startupProbe.periodSeconds: 5 + startupProbe.timeoutSeconds: 60 + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].startupProbe.failureThreshold + value: 20 + - equal: + path: spec.template.spec.containers[0].startupProbe.initialDelaySeconds + value: 10 + - equal: + path: spec.template.spec.containers[0].startupProbe.periodSeconds + value: 5 + - equal: + path: spec.template.spec.containers[0].startupProbe.timeoutSeconds + value: 60 + - equal: + path: spec.template.spec.containers[0].startupProbe.httpGet.path + value: /actuator/health/liveness + + - it: should configure readiness probe + set: + readinessProbe.failureThreshold: 10 + readinessProbe.initialDelaySeconds: 3 + readinessProbe.periodSeconds: 10 + readinessProbe.timeoutSeconds: 15 + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].readinessProbe.failureThreshold + value: 10 + - equal: + path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds + value: 3 + - equal: + path: spec.template.spec.containers[0].readinessProbe.periodSeconds + value: 10 + - equal: + path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds + value: 15 + - equal: + path: spec.template.spec.containers[0].readinessProbe.httpGet.path + value: /actuator/health/readiness + + - it: should configure liveness probe + set: + livenessProbe.failureThreshold: 5 + livenessProbe.initialDelaySeconds: 30 + livenessProbe.periodSeconds: 120 + livenessProbe.timeoutSeconds: 20 + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].livenessProbe.failureThreshold + value: 5 + - equal: + path: spec.template.spec.containers[0].livenessProbe.initialDelaySeconds + value: 30 + - equal: + path: spec.template.spec.containers[0].livenessProbe.periodSeconds + value: 120 + - equal: + path: spec.template.spec.containers[0].livenessProbe.timeoutSeconds + value: 20 + - equal: + path: spec.template.spec.containers[0].livenessProbe.httpGet.path + value: /actuator/health/liveness + + - it: should set resource requests and limits + set: + resources.requests.cpu: 500m + resources.requests.memory: 2Gi + resources.limits.memory: 2Gi + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].resources.requests.cpu + value: 500m + - equal: + path: spec.template.spec.containers[0].resources.requests.memory + value: 2Gi + - equal: + path: spec.template.spec.containers[0].resources.limits.memory + value: 2Gi + + - it: should set default resource requests and limits + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.spec.containers[0].resources.requests.cpu + value: 200m + - equal: + path: spec.template.spec.containers[0].resources.requests.memory + value: 1Gi + - equal: + path: spec.template.spec.containers[0].resources.limits.memory + value: 1Gi + + - it: should add pod annotations + set: + podAnnotations.prometheus.io/scrape: "true" + podAnnotations.prometheus.io/port: "8080" + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - equal: + path: spec.template.metadata.annotations["prometheus.io/scrape"] + value: "true" + - equal: + path: spec.template.metadata.annotations["prometheus.io/port"] + value: "8080" + + - it: should include checksum annotation for configmap + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - exists: + path: spec.template.metadata.annotations["checksum/config"] + + - it: should mount config volume + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - contains: + path: spec.template.spec.containers[0].volumeMounts + content: + name: config + mountPath: /app/config + readOnly: true + - contains: + path: spec.template.spec.volumes + content: + name: config + configMap: + name: RELEASE-NAME-sophora-contentapi + + - it: should expose http port + set: + sophora.authentication.secret.name: test-secret + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - contains: + path: spec.template.spec.containers[0].ports + content: + name: http + protocol: TCP + containerPort: 8080 + + - it: should fail without authentication secret name + set: + sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 + asserts: + - failedTemplate: + errorMessage: "A valid secret name must be provided in .Values.sophora.authentication.secret.name" + + - it: should fail without sophora configuration + set: + sophora.authentication.secret.name: test-secret + asserts: + - failedTemplate: + errorMessage: "A valid application.yaml config is required" diff --git a/charts/sophora-contentapi/tests/extra-list_test.yaml b/charts/sophora-contentapi/tests/extra-list_test.yaml new file mode 100644 index 00000000..1ac47ab2 --- /dev/null +++ b/charts/sophora-contentapi/tests/extra-list_test.yaml @@ -0,0 +1,60 @@ +suite: test extra deploy resources +templates: + - extra-list.yaml +tests: + - it: should not create any resources by default + asserts: + - hasDocuments: + count: 0 + + - it: should render single extra resource + values: + - ./values/extradeploy-single.yaml + asserts: + - hasDocuments: + count: 1 + - isKind: + of: ConfigMap + - equal: + path: metadata.name + value: extra-configmap + + - it: should render multiple extra resources + values: + - ./values/extradeploy-multiple.yaml + asserts: + - hasDocuments: + count: 3 + + - it: should render first extra resource correctly + values: + - ./values/extradeploy-multiple.yaml + documentIndex: 0 + asserts: + - isKind: + of: ConfigMap + - equal: + path: metadata.name + value: extra-cm-1 + + - it: should render second extra resource correctly + values: + - ./values/extradeploy-multiple.yaml + documentIndex: 1 + asserts: + - isKind: + of: Secret + - equal: + path: metadata.name + value: extra-secret + + - it: should render third extra resource correctly + values: + - ./values/extradeploy-multiple.yaml + documentIndex: 2 + asserts: + - isKind: + of: ServiceAccount + - equal: + path: metadata.name + value: extra-sa diff --git a/charts/sophora-contentapi/tests/httproute_test.yaml b/charts/sophora-contentapi/tests/httproute_test.yaml new file mode 100644 index 00000000..696967cd --- /dev/null +++ b/charts/sophora-contentapi/tests/httproute_test.yaml @@ -0,0 +1,223 @@ +suite: test httproute +templates: + - httproute.yaml +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute when enabled + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.hostnames[0]: contentapi.example.com + asserts: + - hasDocuments: + count: 1 + - isKind: + of: HTTPRoute + - equal: + path: metadata.name + value: RELEASE-NAME-sophora-contentapi + + - it: should use custom fullnameOverride + set: + fullnameOverride: my-httproute + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - equal: + path: metadata.name + value: my-httproute + + - it: should configure parentRefs + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.parentRefs[0].namespace: gateway-ns + asserts: + - equal: + path: spec.parentRefs[0].name + value: my-gateway + - equal: + path: spec.parentRefs[0].namespace + value: gateway-ns + + - it: should configure multiple parentRefs + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: gateway-1 + httpRoute.parentRefs[1].name: gateway-2 + asserts: + - equal: + path: spec.parentRefs[0].name + value: gateway-1 + - equal: + path: spec.parentRefs[1].name + value: gateway-2 + + - it: should configure hostnames + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.hostnames[0]: contentapi1.example.com + httpRoute.hostnames[1]: contentapi2.example.com + asserts: + - contains: + path: spec.hostnames + content: contentapi1.example.com + - contains: + path: spec.hostnames + content: contentapi2.example.com + + - it: should not have hostnames when not configured + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - notExists: + path: spec.hostnames + + - it: should configure backendRefs with correct service + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - equal: + path: spec.rules[0].backendRefs[0].name + value: RELEASE-NAME-sophora-contentapi + - equal: + path: spec.rules[0].backendRefs[0].port + value: 8080 + + - it: should use custom service port + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + service.port: 9090 + asserts: + - equal: + path: spec.rules[0].backendRefs[0].port + value: 9090 + + - it: should configure matches + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.matches[0].path.type: PathPrefix + httpRoute.matches[0].path.value: /api + asserts: + - equal: + path: spec.rules[0].matches[0].path.type + value: PathPrefix + - equal: + path: spec.rules[0].matches[0].path.value + value: /api + + - it: should configure multiple matches + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.matches[0].path.type: PathPrefix + httpRoute.matches[0].path.value: /api + httpRoute.matches[1].path.type: Exact + httpRoute.matches[1].path.value: /health + asserts: + - equal: + path: spec.rules[0].matches[0].path.value + value: /api + - equal: + path: spec.rules[0].matches[1].path.value + value: /health + + - it: should not have matches when not configured + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - notExists: + path: spec.rules[0].matches + + - it: should configure filters + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.filters[0].type: RequestHeaderModifier + httpRoute.filters[0].requestHeaderModifier.set[0].name: X-Custom-Header + httpRoute.filters[0].requestHeaderModifier.set[0].value: custom-value + asserts: + - equal: + path: spec.rules[0].filters[0].type + value: RequestHeaderModifier + - equal: + path: spec.rules[0].filters[0].requestHeaderModifier.set[0].name + value: X-Custom-Header + - equal: + path: spec.rules[0].filters[0].requestHeaderModifier.set[0].value + value: custom-value + + - it: should not have filters when not configured + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - notExists: + path: spec.rules[0].filters + + - it: should configure annotations + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + httpRoute.annotations.custom: annotation + httpRoute.annotations.another: value + asserts: + - equal: + path: metadata.annotations.custom + value: annotation + - equal: + path: metadata.annotations.another + value: value + + - it: should not have annotations when not configured + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - notExists: + path: metadata.annotations + + - it: should have correct labels + set: + httpRoute.enabled: true + httpRoute.parentRefs[0].name: my-gateway + asserts: + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: sophora-contentapi + - equal: + path: metadata.labels["app.kubernetes.io/instance"] + value: RELEASE-NAME + - matchRegex: + path: metadata.labels["helm.sh/chart"] + pattern: ^sophora-contentapi- + + - it: should create httproute with all custom values + values: + - ./values/httproute-custom.yaml + asserts: + - equal: + path: metadata.name + value: custom-route + - equal: + path: spec.parentRefs[0].name + value: custom-gateway + - contains: + path: spec.hostnames + content: custom.example.com + - equal: + path: spec.rules[0].matches[0].path.value + value: /custom + - equal: + path: metadata.annotations.custom + value: annotation diff --git a/charts/sophora-contentapi/tests/ingress_test.yaml b/charts/sophora-contentapi/tests/ingress_test.yaml new file mode 100644 index 00000000..0089b6eb --- /dev/null +++ b/charts/sophora-contentapi/tests/ingress_test.yaml @@ -0,0 +1,196 @@ +suite: test ingress +templates: + - ingress.yaml +tests: + - it: should not create ingress by default + asserts: + - hasDocuments: + count: 0 + + - it: should create ingress when enabled + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Ingress + - equal: + path: metadata.name + value: RELEASE-NAME-sophora-contentapi + + - it: should use custom fullnameOverride + set: + fullnameOverride: my-ingress + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: metadata.name + value: my-ingress + + - it: should set ingressClassName + set: + ingress.enabled: true + ingress.ingressClassName: traefik + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: spec.ingressClassName + value: traefik + + - it: should use default ingressClassName nginx + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: spec.ingressClassName + value: nginx + + - it: should set annotations + set: + ingress.enabled: true + ingress.annotations.cert-manager.io/cluster-issuer: letsencrypt + ingress.annotations.nginx.ingress.kubernetes.io/ssl-redirect: "true" + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: metadata.annotations["cert-manager.io/cluster-issuer"] + value: letsencrypt + - equal: + path: metadata.annotations["nginx.ingress.kubernetes.io/ssl-redirect"] + value: "true" + + - it: should configure single host + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: /api + ingress.hosts[0].pathType: Prefix + asserts: + - equal: + path: spec.rules[0].host + value: contentapi.example.com + - equal: + path: spec.rules[0].http.paths[0].path + value: /api + - equal: + path: spec.rules[0].http.paths[0].pathType + value: Prefix + - equal: + path: spec.rules[0].http.paths[0].backend.service.name + value: RELEASE-NAME-sophora-contentapi + - equal: + path: spec.rules[0].http.paths[0].backend.service.port.number + value: 8080 + + - it: should use default pathType ImplementationSpecific + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: spec.rules[0].http.paths[0].pathType + value: ImplementationSpecific + + - it: should configure multiple hosts + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi1.example.com + ingress.hosts[0].path: / + ingress.hosts[1].host: contentapi2.example.com + ingress.hosts[1].path: /api + asserts: + - equal: + path: spec.rules[0].host + value: contentapi1.example.com + - equal: + path: spec.rules[1].host + value: contentapi2.example.com + - equal: + path: spec.rules[1].http.paths[0].path + value: /api + + - it: should configure TLS + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + ingress.tls[0].secretName: contentapi-tls + ingress.tls[0].hosts[0]: contentapi.example.com + asserts: + - equal: + path: spec.tls[0].secretName + value: contentapi-tls + - contains: + path: spec.tls[0].hosts + content: contentapi.example.com + + - it: should configure multiple TLS entries + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi1.example.com + ingress.hosts[0].path: / + ingress.tls[0].secretName: contentapi1-tls + ingress.tls[0].hosts[0]: contentapi1.example.com + ingress.tls[1].secretName: contentapi2-tls + ingress.tls[1].hosts[0]: contentapi2.example.com + asserts: + - equal: + path: spec.tls[0].secretName + value: contentapi1-tls + - equal: + path: spec.tls[1].secretName + value: contentapi2-tls + + - it: should use custom service port + set: + ingress.enabled: true + service.port: 9090 + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: spec.rules[0].http.paths[0].backend.service.port.number + value: 9090 + + - it: should have correct labels + set: + ingress.enabled: true + ingress.hosts[0].host: contentapi.example.com + ingress.hosts[0].path: / + asserts: + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: sophora-contentapi + - equal: + path: metadata.labels["app.kubernetes.io/instance"] + value: RELEASE-NAME + - matchRegex: + path: metadata.labels["helm.sh/chart"] + pattern: ^sophora-contentapi- + + - it: should create ingress with all custom values + values: + - ./values/ingress-custom.yaml + asserts: + - equal: + path: metadata.name + value: my-custom-ingress + - equal: + path: spec.ingressClassName + value: traefik + - equal: + path: metadata.annotations.custom + value: value + - equal: + path: spec.rules[0].host + value: api.example.com diff --git a/charts/sophora-contentapi/tests/service_test.yaml b/charts/sophora-contentapi/tests/service_test.yaml new file mode 100644 index 00000000..fe7f0934 --- /dev/null +++ b/charts/sophora-contentapi/tests/service_test.yaml @@ -0,0 +1,107 @@ +suite: test service +templates: + - service.yaml +tests: + - it: should create service with defaults + asserts: + - hasDocuments: + count: 1 + - isKind: + of: Service + - equal: + path: metadata.name + value: RELEASE-NAME-sophora-contentapi + - equal: + path: spec.type + value: ClusterIP + - equal: + path: spec.ports[0].port + value: 8080 + - equal: + path: spec.ports[0].protocol + value: TCP + - equal: + path: spec.ports[0].targetPort + value: http + + - it: should use custom fullnameOverride + set: + fullnameOverride: my-service + asserts: + - equal: + path: metadata.name + value: my-service + + - it: should set custom service type + set: + service.type: NodePort + asserts: + - equal: + path: spec.type + value: NodePort + + - it: should set custom service port + set: + service.port: 9090 + asserts: + - equal: + path: spec.ports[0].port + value: 9090 + + - it: should add service annotations + set: + service.annotations.prometheus.io/scrape: "true" + service.annotations.prometheus.io/port: "8080" + asserts: + - equal: + path: metadata.annotations["prometheus.io/scrape"] + value: "true" + - equal: + path: metadata.annotations["prometheus.io/port"] + value: "8080" + + - it: should not have annotations when empty + asserts: + - notExists: + path: metadata.annotations + + - it: should have correct selector labels + asserts: + - equal: + path: spec.selector["app.kubernetes.io/name"] + value: sophora-contentapi + - equal: + path: spec.selector["app.kubernetes.io/instance"] + value: RELEASE-NAME + + - it: should have correct metadata labels + asserts: + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: sophora-contentapi + - equal: + path: metadata.labels["app.kubernetes.io/instance"] + value: RELEASE-NAME + - equal: + path: metadata.labels["app.kubernetes.io/managed-by"] + value: Helm + - matchRegex: + path: metadata.labels["helm.sh/chart"] + pattern: ^sophora-contentapi- + + - it: should create service with all custom values + values: + - ./values/service-custom.yaml + asserts: + - equal: + path: metadata.name + value: custom-contentapi + - equal: + path: spec.type + value: LoadBalancer + - equal: + path: spec.ports[0].port + value: 8888 + - equal: + path: metadata.annotations.custom + value: annotation diff --git a/charts/sophora-contentapi/tests/values/configmap-complex.yaml b/charts/sophora-contentapi/tests/values/configmap-complex.yaml new file mode 100644 index 00000000..0b5dc363 --- /dev/null +++ b/charts/sophora-contentapi/tests/values/configmap-complex.yaml @@ -0,0 +1,19 @@ +sophora: + configuration: + sophora: + client: + server-connection: + urls: + - http://server1:1196 + - http://server2:1196 + connection-timeout: 30s + read-timeout: 60s + contentapi: + cache: + enabled: true + max-size: 1000 + cors: + enabled: true + allowed-origins: "*" + logging: + level: DEBUG diff --git a/charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml b/charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml new file mode 100644 index 00000000..f549ea0a --- /dev/null +++ b/charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml @@ -0,0 +1,18 @@ +extraDeploy: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: extra-cm-1 + data: + key1: value1 + - apiVersion: v1 + kind: Secret + metadata: + name: extra-secret + type: Opaque + stringData: + password: secretvalue + - apiVersion: v1 + kind: ServiceAccount + metadata: + name: extra-sa diff --git a/charts/sophora-contentapi/tests/values/extradeploy-single.yaml b/charts/sophora-contentapi/tests/values/extradeploy-single.yaml new file mode 100644 index 00000000..c582c132 --- /dev/null +++ b/charts/sophora-contentapi/tests/values/extradeploy-single.yaml @@ -0,0 +1,7 @@ +extraDeploy: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: extra-configmap + data: + key: value diff --git a/charts/sophora-contentapi/tests/values/httproute-custom.yaml b/charts/sophora-contentapi/tests/values/httproute-custom.yaml new file mode 100644 index 00000000..fd48de1e --- /dev/null +++ b/charts/sophora-contentapi/tests/values/httproute-custom.yaml @@ -0,0 +1,21 @@ +fullnameOverride: custom-route + +httpRoute: + enabled: true + annotations: + custom: annotation + parentRefs: + - name: custom-gateway + namespace: gateway-system + hostnames: + - custom.example.com + matches: + - path: + type: PathPrefix + value: /custom + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value diff --git a/charts/sophora-contentapi/tests/values/ingress-custom.yaml b/charts/sophora-contentapi/tests/values/ingress-custom.yaml new file mode 100644 index 00000000..c4a1cf17 --- /dev/null +++ b/charts/sophora-contentapi/tests/values/ingress-custom.yaml @@ -0,0 +1,16 @@ +fullnameOverride: my-custom-ingress + +ingress: + enabled: true + ingressClassName: traefik + annotations: + custom: value + cert-manager.io/cluster-issuer: letsencrypt + hosts: + - host: api.example.com + path: / + pathType: Prefix + tls: + - secretName: api-tls + hosts: + - api.example.com diff --git a/charts/sophora-contentapi/tests/values/service-custom.yaml b/charts/sophora-contentapi/tests/values/service-custom.yaml new file mode 100644 index 00000000..bfc0c103 --- /dev/null +++ b/charts/sophora-contentapi/tests/values/service-custom.yaml @@ -0,0 +1,7 @@ +fullnameOverride: custom-contentapi + +service: + type: LoadBalancer + port: 8888 + annotations: + custom: annotation From 8a81ee1ca9540dcf5ce31d9f3e032e33d9c7d9cc Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Tue, 17 Feb 2026 11:00:30 +0100 Subject: [PATCH 23/26] Revert "generated helm unittests for sophora-contentapi" This reverts commit 23825da85d4fcc0e2e64294859e5e96fa4bd487d. --- charts/sophora-contentapi/tests/README.md | 128 ------- .../tests/configmap_test.yaml | 86 ----- .../tests/deployment_test.yaml | 313 ------------------ .../tests/extra-list_test.yaml | 60 ---- .../tests/httproute_test.yaml | 223 ------------- .../tests/ingress_test.yaml | 196 ----------- .../tests/service_test.yaml | 107 ------ .../tests/values/configmap-complex.yaml | 19 -- .../tests/values/extradeploy-multiple.yaml | 18 - .../tests/values/extradeploy-single.yaml | 7 - .../tests/values/httproute-custom.yaml | 21 -- .../tests/values/ingress-custom.yaml | 16 - .../tests/values/service-custom.yaml | 7 - 13 files changed, 1201 deletions(-) delete mode 100644 charts/sophora-contentapi/tests/README.md delete mode 100644 charts/sophora-contentapi/tests/configmap_test.yaml delete mode 100644 charts/sophora-contentapi/tests/deployment_test.yaml delete mode 100644 charts/sophora-contentapi/tests/extra-list_test.yaml delete mode 100644 charts/sophora-contentapi/tests/httproute_test.yaml delete mode 100644 charts/sophora-contentapi/tests/ingress_test.yaml delete mode 100644 charts/sophora-contentapi/tests/service_test.yaml delete mode 100644 charts/sophora-contentapi/tests/values/configmap-complex.yaml delete mode 100644 charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml delete mode 100644 charts/sophora-contentapi/tests/values/extradeploy-single.yaml delete mode 100644 charts/sophora-contentapi/tests/values/httproute-custom.yaml delete mode 100644 charts/sophora-contentapi/tests/values/ingress-custom.yaml delete mode 100644 charts/sophora-contentapi/tests/values/service-custom.yaml diff --git a/charts/sophora-contentapi/tests/README.md b/charts/sophora-contentapi/tests/README.md deleted file mode 100644 index cf3a470d..00000000 --- a/charts/sophora-contentapi/tests/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Sophora Content API Helm Chart Tests - -This directory contains comprehensive unit tests for the sophora-contentapi Helm chart using [helm-unittest](https://github.com/helm-unittest/helm-unittest). - -## Test Files - -- **deployment_test.yaml** - Tests for the Deployment resource including: - - Default values and overrides - - Image configuration - - Java options - - Authentication secrets - - Environment variables - - Probes (startup, readiness, liveness) - - Resource limits and requests - - Pod annotations - - Volume mounts - -- **configmap_test.yaml** - Tests for the ConfigMap resource including: - - Name overrides - - Sophora configuration rendering - - Required configuration validation - - Complex configuration scenarios - -- **service_test.yaml** - Tests for the Service resource including: - - Default service configuration - - Custom service types and ports - - Service annotations - - Selector labels - -- **ingress_test.yaml** - Tests for the Ingress resource including: - - Enabling/disabling ingress - - IngressClassName configuration - - Annotations - - Single and multiple hosts - - TLS configuration - - Path types - -- **httproute_test.yaml** - Tests for the HTTPRoute (Gateway API) resource including: - - Enabling/disabling HTTPRoute - - Parent gateway references - - Hostnames configuration - - Matches and filters - - Annotations - -- **extra-list_test.yaml** - Tests for extraDeploy resources including: - - Rendering custom Kubernetes resources - - Multiple resource types - -## Running Tests - -### Prerequisites - -Install helm-unittest plugin: - -```bash -helm plugin install https://github.com/helm-unittest/helm-unittest -``` - -### Run All Tests - -From the chart root directory: - -```bash -helm unittest . -``` - -### Run Specific Test File - -```bash -helm unittest -f tests/deployment_test.yaml . -``` - -### Run with Verbose Output - -```bash -helm unittest -v . -``` - -### Run with Colored Output - -```bash -helm unittest --color . -``` - -## Test Coverage - -The tests cover all properties defined in values.yaml: - -- ✅ nameOverride / fullnameOverride -- ✅ image.repository / image.tag / image.pullPolicy -- ✅ imagePullSecrets -- ✅ javaOptions -- ✅ sophora.authentication.secret.* -- ✅ sophora.configuration.* -- ✅ startupProbe.* -- ✅ readinessProbe.* -- ✅ livenessProbe.* -- ✅ resources.* -- ✅ contentapi.extraEnv -- ✅ service.* -- ✅ ingress.* -- ✅ httpRoute.* -- ✅ extraDeploy -- ✅ podAnnotations - -## Test Values Files - -The `values/` directory contains test-specific values files used in tests: - -- **service-custom.yaml** - Custom service configuration -- **configmap-complex.yaml** - Complex Sophora configuration -- **ingress-custom.yaml** - Custom ingress configuration -- **httproute-custom.yaml** - Custom HTTPRoute configuration -- **extradeploy-single.yaml** - Single extra resource -- **extradeploy-multiple.yaml** - Multiple extra resources - -## Adding New Tests - -When adding new properties to values.yaml: - -1. Add test cases to the appropriate test file -2. Create new test value files if needed in `values/` directory -3. Update this README with the new test coverage -4. Run tests to ensure they pass - -## Continuous Integration - -These tests should be run as part of the CI/CD pipeline before releasing new chart versions. diff --git a/charts/sophora-contentapi/tests/configmap_test.yaml b/charts/sophora-contentapi/tests/configmap_test.yaml deleted file mode 100644 index b56b4e8c..00000000 --- a/charts/sophora-contentapi/tests/configmap_test.yaml +++ /dev/null @@ -1,86 +0,0 @@ -suite: test configmap -templates: - - configmap.yaml -tests: - - it: should create configmap with default name - set: - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - equal: - path: metadata.name - value: RELEASE-NAME-sophora-contentapi - - matchRegex: - path: metadata.labels["helm.sh/chart"] - pattern: ^sophora-contentapi- - - - it: should use custom fullnameOverride - set: - fullnameOverride: my-contentapi - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: metadata.name - value: my-contentapi - - - it: should contain application.yaml with sophora configuration - set: - sophora.configuration.sophora.client.server-connection.urls[0]: http://server:1196 - sophora.configuration.sophora.client.server-connection.urls[1]: http://server2:1196 - sophora.configuration.contentapi.somekey: somevalue - asserts: - - exists: - path: data["application.yaml"] - - matchRegex: - path: data["application.yaml"] - pattern: "sophora:" - - matchRegex: - path: data["application.yaml"] - pattern: "http://server:1196" - - matchRegex: - path: data["application.yaml"] - pattern: "http://server2:1196" - - matchRegex: - path: data["application.yaml"] - pattern: "contentapi:" - - matchRegex: - path: data["application.yaml"] - pattern: "somekey: somevalue" - - - it: should fail without sophora configuration - asserts: - - failedTemplate: - errorMessage: "A valid application.yaml config is required" - - - it: should render complex sophora configuration - values: - - ./values/configmap-complex.yaml - asserts: - - exists: - path: data["application.yaml"] - - matchRegex: - path: data["application.yaml"] - pattern: "server-connection:" - - matchRegex: - path: data["application.yaml"] - pattern: "urls:" - - matchRegex: - path: data["application.yaml"] - pattern: "contentapi:" - - - it: should have correct labels - set: - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: metadata.labels["app.kubernetes.io/name"] - value: sophora-contentapi - - equal: - path: metadata.labels["app.kubernetes.io/instance"] - value: RELEASE-NAME - - equal: - path: metadata.labels["app.kubernetes.io/managed-by"] - value: Helm diff --git a/charts/sophora-contentapi/tests/deployment_test.yaml b/charts/sophora-contentapi/tests/deployment_test.yaml deleted file mode 100644 index 4e21b1c8..00000000 --- a/charts/sophora-contentapi/tests/deployment_test.yaml +++ /dev/null @@ -1,313 +0,0 @@ -suite: test deployment -templates: - - deployment.yaml -tests: - - it: should create deployment with default values - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Deployment - - equal: - path: metadata.name - value: RELEASE-NAME-sophora-contentapi - - matchRegex: - path: metadata.labels["helm.sh/chart"] - pattern: ^sophora-contentapi- - - equal: - path: spec.selector.matchLabels["app.kubernetes.io/name"] - value: sophora-contentapi - - equal: - path: spec.selector.matchLabels["app.kubernetes.io/instance"] - value: RELEASE-NAME - - - it: should use custom fullnameOverride - set: - fullnameOverride: my-custom-name - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: metadata.name - value: my-custom-name - - - it: should use custom nameOverride - set: - nameOverride: custom-contentapi - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: metadata.name - value: RELEASE-NAME-custom-contentapi - - - it: should set correct image configuration - set: - image.repository: my-repo/contentapi - image.tag: 7.0.0 - image.pullPolicy: Always - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].image - value: my-repo/contentapi:7.0.0 - - equal: - path: spec.template.spec.containers[0].imagePullPolicy - value: Always - - - it: should use appVersion when tag is not specified - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].image - value: docker.subshell.com/sophora/contentapi:6.0.0 - - - it: should set imagePullSecrets - set: - imagePullSecrets[0].name: my-registry-secret - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.imagePullSecrets[0].name - value: my-registry-secret - - - it: should set custom javaOptions - set: - javaOptions: -Xmx2g -XX:+UseG1GC - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: JDK_JAVA_OPTIONS - value: -Xmx2g -XX:+UseG1GC - - - it: should set default javaOptions - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: JDK_JAVA_OPTIONS - value: -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem - - - it: should configure authentication secret - set: - sophora.authentication.secret.name: my-secret - sophora.authentication.secret.usernameKey: myuser - sophora.authentication.secret.passwordKey: mypass - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: SOPHORA_CLIENT_SERVERCONNECTION_USERNAME - valueFrom: - secretKeyRef: - name: my-secret - key: myuser - - contains: - path: spec.template.spec.containers[0].env - content: - name: SOPHORA_CLIENT_SERVERCONNECTION_PASSWORD - valueFrom: - secretKeyRef: - name: my-secret - key: mypass - - - it: should set extraEnv variables - set: - contentapi.extraEnv[0].name: CUSTOM_VAR - contentapi.extraEnv[0].value: custom-value - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - contains: - path: spec.template.spec.containers[0].env - content: - name: CUSTOM_VAR - value: custom-value - - - it: should configure startup probe - set: - startupProbe.failureThreshold: 20 - startupProbe.initialDelaySeconds: 10 - startupProbe.periodSeconds: 5 - startupProbe.timeoutSeconds: 60 - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].startupProbe.failureThreshold - value: 20 - - equal: - path: spec.template.spec.containers[0].startupProbe.initialDelaySeconds - value: 10 - - equal: - path: spec.template.spec.containers[0].startupProbe.periodSeconds - value: 5 - - equal: - path: spec.template.spec.containers[0].startupProbe.timeoutSeconds - value: 60 - - equal: - path: spec.template.spec.containers[0].startupProbe.httpGet.path - value: /actuator/health/liveness - - - it: should configure readiness probe - set: - readinessProbe.failureThreshold: 10 - readinessProbe.initialDelaySeconds: 3 - readinessProbe.periodSeconds: 10 - readinessProbe.timeoutSeconds: 15 - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].readinessProbe.failureThreshold - value: 10 - - equal: - path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds - value: 3 - - equal: - path: spec.template.spec.containers[0].readinessProbe.periodSeconds - value: 10 - - equal: - path: spec.template.spec.containers[0].readinessProbe.timeoutSeconds - value: 15 - - equal: - path: spec.template.spec.containers[0].readinessProbe.httpGet.path - value: /actuator/health/readiness - - - it: should configure liveness probe - set: - livenessProbe.failureThreshold: 5 - livenessProbe.initialDelaySeconds: 30 - livenessProbe.periodSeconds: 120 - livenessProbe.timeoutSeconds: 20 - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].livenessProbe.failureThreshold - value: 5 - - equal: - path: spec.template.spec.containers[0].livenessProbe.initialDelaySeconds - value: 30 - - equal: - path: spec.template.spec.containers[0].livenessProbe.periodSeconds - value: 120 - - equal: - path: spec.template.spec.containers[0].livenessProbe.timeoutSeconds - value: 20 - - equal: - path: spec.template.spec.containers[0].livenessProbe.httpGet.path - value: /actuator/health/liveness - - - it: should set resource requests and limits - set: - resources.requests.cpu: 500m - resources.requests.memory: 2Gi - resources.limits.memory: 2Gi - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].resources.requests.cpu - value: 500m - - equal: - path: spec.template.spec.containers[0].resources.requests.memory - value: 2Gi - - equal: - path: spec.template.spec.containers[0].resources.limits.memory - value: 2Gi - - - it: should set default resource requests and limits - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.spec.containers[0].resources.requests.cpu - value: 200m - - equal: - path: spec.template.spec.containers[0].resources.requests.memory - value: 1Gi - - equal: - path: spec.template.spec.containers[0].resources.limits.memory - value: 1Gi - - - it: should add pod annotations - set: - podAnnotations.prometheus.io/scrape: "true" - podAnnotations.prometheus.io/port: "8080" - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - equal: - path: spec.template.metadata.annotations["prometheus.io/scrape"] - value: "true" - - equal: - path: spec.template.metadata.annotations["prometheus.io/port"] - value: "8080" - - - it: should include checksum annotation for configmap - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - exists: - path: spec.template.metadata.annotations["checksum/config"] - - - it: should mount config volume - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - contains: - path: spec.template.spec.containers[0].volumeMounts - content: - name: config - mountPath: /app/config - readOnly: true - - contains: - path: spec.template.spec.volumes - content: - name: config - configMap: - name: RELEASE-NAME-sophora-contentapi - - - it: should expose http port - set: - sophora.authentication.secret.name: test-secret - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - contains: - path: spec.template.spec.containers[0].ports - content: - name: http - protocol: TCP - containerPort: 8080 - - - it: should fail without authentication secret name - set: - sophora.configuration.sophora.client.server-connection.urls[0]: http://localhost:1196 - asserts: - - failedTemplate: - errorMessage: "A valid secret name must be provided in .Values.sophora.authentication.secret.name" - - - it: should fail without sophora configuration - set: - sophora.authentication.secret.name: test-secret - asserts: - - failedTemplate: - errorMessage: "A valid application.yaml config is required" diff --git a/charts/sophora-contentapi/tests/extra-list_test.yaml b/charts/sophora-contentapi/tests/extra-list_test.yaml deleted file mode 100644 index 1ac47ab2..00000000 --- a/charts/sophora-contentapi/tests/extra-list_test.yaml +++ /dev/null @@ -1,60 +0,0 @@ -suite: test extra deploy resources -templates: - - extra-list.yaml -tests: - - it: should not create any resources by default - asserts: - - hasDocuments: - count: 0 - - - it: should render single extra resource - values: - - ./values/extradeploy-single.yaml - asserts: - - hasDocuments: - count: 1 - - isKind: - of: ConfigMap - - equal: - path: metadata.name - value: extra-configmap - - - it: should render multiple extra resources - values: - - ./values/extradeploy-multiple.yaml - asserts: - - hasDocuments: - count: 3 - - - it: should render first extra resource correctly - values: - - ./values/extradeploy-multiple.yaml - documentIndex: 0 - asserts: - - isKind: - of: ConfigMap - - equal: - path: metadata.name - value: extra-cm-1 - - - it: should render second extra resource correctly - values: - - ./values/extradeploy-multiple.yaml - documentIndex: 1 - asserts: - - isKind: - of: Secret - - equal: - path: metadata.name - value: extra-secret - - - it: should render third extra resource correctly - values: - - ./values/extradeploy-multiple.yaml - documentIndex: 2 - asserts: - - isKind: - of: ServiceAccount - - equal: - path: metadata.name - value: extra-sa diff --git a/charts/sophora-contentapi/tests/httproute_test.yaml b/charts/sophora-contentapi/tests/httproute_test.yaml deleted file mode 100644 index 696967cd..00000000 --- a/charts/sophora-contentapi/tests/httproute_test.yaml +++ /dev/null @@ -1,223 +0,0 @@ -suite: test httproute -templates: - - httproute.yaml -tests: - - it: should not create httproute by default - asserts: - - hasDocuments: - count: 0 - - - it: should create httproute when enabled - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.hostnames[0]: contentapi.example.com - asserts: - - hasDocuments: - count: 1 - - isKind: - of: HTTPRoute - - equal: - path: metadata.name - value: RELEASE-NAME-sophora-contentapi - - - it: should use custom fullnameOverride - set: - fullnameOverride: my-httproute - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - equal: - path: metadata.name - value: my-httproute - - - it: should configure parentRefs - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.parentRefs[0].namespace: gateway-ns - asserts: - - equal: - path: spec.parentRefs[0].name - value: my-gateway - - equal: - path: spec.parentRefs[0].namespace - value: gateway-ns - - - it: should configure multiple parentRefs - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: gateway-1 - httpRoute.parentRefs[1].name: gateway-2 - asserts: - - equal: - path: spec.parentRefs[0].name - value: gateway-1 - - equal: - path: spec.parentRefs[1].name - value: gateway-2 - - - it: should configure hostnames - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.hostnames[0]: contentapi1.example.com - httpRoute.hostnames[1]: contentapi2.example.com - asserts: - - contains: - path: spec.hostnames - content: contentapi1.example.com - - contains: - path: spec.hostnames - content: contentapi2.example.com - - - it: should not have hostnames when not configured - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - notExists: - path: spec.hostnames - - - it: should configure backendRefs with correct service - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - equal: - path: spec.rules[0].backendRefs[0].name - value: RELEASE-NAME-sophora-contentapi - - equal: - path: spec.rules[0].backendRefs[0].port - value: 8080 - - - it: should use custom service port - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - service.port: 9090 - asserts: - - equal: - path: spec.rules[0].backendRefs[0].port - value: 9090 - - - it: should configure matches - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.matches[0].path.type: PathPrefix - httpRoute.matches[0].path.value: /api - asserts: - - equal: - path: spec.rules[0].matches[0].path.type - value: PathPrefix - - equal: - path: spec.rules[0].matches[0].path.value - value: /api - - - it: should configure multiple matches - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.matches[0].path.type: PathPrefix - httpRoute.matches[0].path.value: /api - httpRoute.matches[1].path.type: Exact - httpRoute.matches[1].path.value: /health - asserts: - - equal: - path: spec.rules[0].matches[0].path.value - value: /api - - equal: - path: spec.rules[0].matches[1].path.value - value: /health - - - it: should not have matches when not configured - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - notExists: - path: spec.rules[0].matches - - - it: should configure filters - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.filters[0].type: RequestHeaderModifier - httpRoute.filters[0].requestHeaderModifier.set[0].name: X-Custom-Header - httpRoute.filters[0].requestHeaderModifier.set[0].value: custom-value - asserts: - - equal: - path: spec.rules[0].filters[0].type - value: RequestHeaderModifier - - equal: - path: spec.rules[0].filters[0].requestHeaderModifier.set[0].name - value: X-Custom-Header - - equal: - path: spec.rules[0].filters[0].requestHeaderModifier.set[0].value - value: custom-value - - - it: should not have filters when not configured - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - notExists: - path: spec.rules[0].filters - - - it: should configure annotations - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - httpRoute.annotations.custom: annotation - httpRoute.annotations.another: value - asserts: - - equal: - path: metadata.annotations.custom - value: annotation - - equal: - path: metadata.annotations.another - value: value - - - it: should not have annotations when not configured - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - notExists: - path: metadata.annotations - - - it: should have correct labels - set: - httpRoute.enabled: true - httpRoute.parentRefs[0].name: my-gateway - asserts: - - equal: - path: metadata.labels["app.kubernetes.io/name"] - value: sophora-contentapi - - equal: - path: metadata.labels["app.kubernetes.io/instance"] - value: RELEASE-NAME - - matchRegex: - path: metadata.labels["helm.sh/chart"] - pattern: ^sophora-contentapi- - - - it: should create httproute with all custom values - values: - - ./values/httproute-custom.yaml - asserts: - - equal: - path: metadata.name - value: custom-route - - equal: - path: spec.parentRefs[0].name - value: custom-gateway - - contains: - path: spec.hostnames - content: custom.example.com - - equal: - path: spec.rules[0].matches[0].path.value - value: /custom - - equal: - path: metadata.annotations.custom - value: annotation diff --git a/charts/sophora-contentapi/tests/ingress_test.yaml b/charts/sophora-contentapi/tests/ingress_test.yaml deleted file mode 100644 index 0089b6eb..00000000 --- a/charts/sophora-contentapi/tests/ingress_test.yaml +++ /dev/null @@ -1,196 +0,0 @@ -suite: test ingress -templates: - - ingress.yaml -tests: - - it: should not create ingress by default - asserts: - - hasDocuments: - count: 0 - - - it: should create ingress when enabled - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Ingress - - equal: - path: metadata.name - value: RELEASE-NAME-sophora-contentapi - - - it: should use custom fullnameOverride - set: - fullnameOverride: my-ingress - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: metadata.name - value: my-ingress - - - it: should set ingressClassName - set: - ingress.enabled: true - ingress.ingressClassName: traefik - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: spec.ingressClassName - value: traefik - - - it: should use default ingressClassName nginx - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: spec.ingressClassName - value: nginx - - - it: should set annotations - set: - ingress.enabled: true - ingress.annotations.cert-manager.io/cluster-issuer: letsencrypt - ingress.annotations.nginx.ingress.kubernetes.io/ssl-redirect: "true" - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: metadata.annotations["cert-manager.io/cluster-issuer"] - value: letsencrypt - - equal: - path: metadata.annotations["nginx.ingress.kubernetes.io/ssl-redirect"] - value: "true" - - - it: should configure single host - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: /api - ingress.hosts[0].pathType: Prefix - asserts: - - equal: - path: spec.rules[0].host - value: contentapi.example.com - - equal: - path: spec.rules[0].http.paths[0].path - value: /api - - equal: - path: spec.rules[0].http.paths[0].pathType - value: Prefix - - equal: - path: spec.rules[0].http.paths[0].backend.service.name - value: RELEASE-NAME-sophora-contentapi - - equal: - path: spec.rules[0].http.paths[0].backend.service.port.number - value: 8080 - - - it: should use default pathType ImplementationSpecific - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: spec.rules[0].http.paths[0].pathType - value: ImplementationSpecific - - - it: should configure multiple hosts - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi1.example.com - ingress.hosts[0].path: / - ingress.hosts[1].host: contentapi2.example.com - ingress.hosts[1].path: /api - asserts: - - equal: - path: spec.rules[0].host - value: contentapi1.example.com - - equal: - path: spec.rules[1].host - value: contentapi2.example.com - - equal: - path: spec.rules[1].http.paths[0].path - value: /api - - - it: should configure TLS - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - ingress.tls[0].secretName: contentapi-tls - ingress.tls[0].hosts[0]: contentapi.example.com - asserts: - - equal: - path: spec.tls[0].secretName - value: contentapi-tls - - contains: - path: spec.tls[0].hosts - content: contentapi.example.com - - - it: should configure multiple TLS entries - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi1.example.com - ingress.hosts[0].path: / - ingress.tls[0].secretName: contentapi1-tls - ingress.tls[0].hosts[0]: contentapi1.example.com - ingress.tls[1].secretName: contentapi2-tls - ingress.tls[1].hosts[0]: contentapi2.example.com - asserts: - - equal: - path: spec.tls[0].secretName - value: contentapi1-tls - - equal: - path: spec.tls[1].secretName - value: contentapi2-tls - - - it: should use custom service port - set: - ingress.enabled: true - service.port: 9090 - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: spec.rules[0].http.paths[0].backend.service.port.number - value: 9090 - - - it: should have correct labels - set: - ingress.enabled: true - ingress.hosts[0].host: contentapi.example.com - ingress.hosts[0].path: / - asserts: - - equal: - path: metadata.labels["app.kubernetes.io/name"] - value: sophora-contentapi - - equal: - path: metadata.labels["app.kubernetes.io/instance"] - value: RELEASE-NAME - - matchRegex: - path: metadata.labels["helm.sh/chart"] - pattern: ^sophora-contentapi- - - - it: should create ingress with all custom values - values: - - ./values/ingress-custom.yaml - asserts: - - equal: - path: metadata.name - value: my-custom-ingress - - equal: - path: spec.ingressClassName - value: traefik - - equal: - path: metadata.annotations.custom - value: value - - equal: - path: spec.rules[0].host - value: api.example.com diff --git a/charts/sophora-contentapi/tests/service_test.yaml b/charts/sophora-contentapi/tests/service_test.yaml deleted file mode 100644 index fe7f0934..00000000 --- a/charts/sophora-contentapi/tests/service_test.yaml +++ /dev/null @@ -1,107 +0,0 @@ -suite: test service -templates: - - service.yaml -tests: - - it: should create service with defaults - asserts: - - hasDocuments: - count: 1 - - isKind: - of: Service - - equal: - path: metadata.name - value: RELEASE-NAME-sophora-contentapi - - equal: - path: spec.type - value: ClusterIP - - equal: - path: spec.ports[0].port - value: 8080 - - equal: - path: spec.ports[0].protocol - value: TCP - - equal: - path: spec.ports[0].targetPort - value: http - - - it: should use custom fullnameOverride - set: - fullnameOverride: my-service - asserts: - - equal: - path: metadata.name - value: my-service - - - it: should set custom service type - set: - service.type: NodePort - asserts: - - equal: - path: spec.type - value: NodePort - - - it: should set custom service port - set: - service.port: 9090 - asserts: - - equal: - path: spec.ports[0].port - value: 9090 - - - it: should add service annotations - set: - service.annotations.prometheus.io/scrape: "true" - service.annotations.prometheus.io/port: "8080" - asserts: - - equal: - path: metadata.annotations["prometheus.io/scrape"] - value: "true" - - equal: - path: metadata.annotations["prometheus.io/port"] - value: "8080" - - - it: should not have annotations when empty - asserts: - - notExists: - path: metadata.annotations - - - it: should have correct selector labels - asserts: - - equal: - path: spec.selector["app.kubernetes.io/name"] - value: sophora-contentapi - - equal: - path: spec.selector["app.kubernetes.io/instance"] - value: RELEASE-NAME - - - it: should have correct metadata labels - asserts: - - equal: - path: metadata.labels["app.kubernetes.io/name"] - value: sophora-contentapi - - equal: - path: metadata.labels["app.kubernetes.io/instance"] - value: RELEASE-NAME - - equal: - path: metadata.labels["app.kubernetes.io/managed-by"] - value: Helm - - matchRegex: - path: metadata.labels["helm.sh/chart"] - pattern: ^sophora-contentapi- - - - it: should create service with all custom values - values: - - ./values/service-custom.yaml - asserts: - - equal: - path: metadata.name - value: custom-contentapi - - equal: - path: spec.type - value: LoadBalancer - - equal: - path: spec.ports[0].port - value: 8888 - - equal: - path: metadata.annotations.custom - value: annotation diff --git a/charts/sophora-contentapi/tests/values/configmap-complex.yaml b/charts/sophora-contentapi/tests/values/configmap-complex.yaml deleted file mode 100644 index 0b5dc363..00000000 --- a/charts/sophora-contentapi/tests/values/configmap-complex.yaml +++ /dev/null @@ -1,19 +0,0 @@ -sophora: - configuration: - sophora: - client: - server-connection: - urls: - - http://server1:1196 - - http://server2:1196 - connection-timeout: 30s - read-timeout: 60s - contentapi: - cache: - enabled: true - max-size: 1000 - cors: - enabled: true - allowed-origins: "*" - logging: - level: DEBUG diff --git a/charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml b/charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml deleted file mode 100644 index f549ea0a..00000000 --- a/charts/sophora-contentapi/tests/values/extradeploy-multiple.yaml +++ /dev/null @@ -1,18 +0,0 @@ -extraDeploy: - - apiVersion: v1 - kind: ConfigMap - metadata: - name: extra-cm-1 - data: - key1: value1 - - apiVersion: v1 - kind: Secret - metadata: - name: extra-secret - type: Opaque - stringData: - password: secretvalue - - apiVersion: v1 - kind: ServiceAccount - metadata: - name: extra-sa diff --git a/charts/sophora-contentapi/tests/values/extradeploy-single.yaml b/charts/sophora-contentapi/tests/values/extradeploy-single.yaml deleted file mode 100644 index c582c132..00000000 --- a/charts/sophora-contentapi/tests/values/extradeploy-single.yaml +++ /dev/null @@ -1,7 +0,0 @@ -extraDeploy: - - apiVersion: v1 - kind: ConfigMap - metadata: - name: extra-configmap - data: - key: value diff --git a/charts/sophora-contentapi/tests/values/httproute-custom.yaml b/charts/sophora-contentapi/tests/values/httproute-custom.yaml deleted file mode 100644 index fd48de1e..00000000 --- a/charts/sophora-contentapi/tests/values/httproute-custom.yaml +++ /dev/null @@ -1,21 +0,0 @@ -fullnameOverride: custom-route - -httpRoute: - enabled: true - annotations: - custom: annotation - parentRefs: - - name: custom-gateway - namespace: gateway-system - hostnames: - - custom.example.com - matches: - - path: - type: PathPrefix - value: /custom - filters: - - type: RequestHeaderModifier - requestHeaderModifier: - set: - - name: X-Custom-Header - value: custom-value diff --git a/charts/sophora-contentapi/tests/values/ingress-custom.yaml b/charts/sophora-contentapi/tests/values/ingress-custom.yaml deleted file mode 100644 index c4a1cf17..00000000 --- a/charts/sophora-contentapi/tests/values/ingress-custom.yaml +++ /dev/null @@ -1,16 +0,0 @@ -fullnameOverride: my-custom-ingress - -ingress: - enabled: true - ingressClassName: traefik - annotations: - custom: value - cert-manager.io/cluster-issuer: letsencrypt - hosts: - - host: api.example.com - path: / - pathType: Prefix - tls: - - secretName: api-tls - hosts: - - api.example.com diff --git a/charts/sophora-contentapi/tests/values/service-custom.yaml b/charts/sophora-contentapi/tests/values/service-custom.yaml deleted file mode 100644 index bfc0c103..00000000 --- a/charts/sophora-contentapi/tests/values/service-custom.yaml +++ /dev/null @@ -1,7 +0,0 @@ -fullnameOverride: custom-contentapi - -service: - type: LoadBalancer - port: 8888 - annotations: - custom: annotation From ef26d1855edecaa3a24e84e13d2be19d9701e5c2 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Tue, 17 Feb 2026 11:27:17 +0100 Subject: [PATCH 24/26] add helm unittest for httproute in sophora-contentapi --- .../tests/httproute_test.yaml | 60 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ 2 files changed, 81 insertions(+) create mode 100644 charts/sophora-contentapi/tests/httproute_test.yaml create mode 100644 charts/sophora-contentapi/tests/values/httproute.yaml diff --git a/charts/sophora-contentapi/tests/httproute_test.yaml b/charts/sophora-contentapi/tests/httproute_test.yaml new file mode 100644 index 00000000..c3224725 --- /dev/null +++ b/charts/sophora-contentapi/tests/httproute_test.yaml @@ -0,0 +1,60 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-contentapi + - equal: + path: metadata + value: + name: values-test-release-sophora-contentapi + labels: + helm.sh/chart: sophora-contentapi-0.9.8 + app.kubernetes.io/name: sophora-contentapi + app.kubernetes.io/version: 6.0.0 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-contentapi + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-contentapi/tests/values/httproute.yaml b/charts/sophora-contentapi/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-contentapi/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value From 1b8bf0475db2bccec7d314123065beb1ef23df48 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Tue, 17 Feb 2026 12:16:56 +0100 Subject: [PATCH 25/26] add httproute tests to all relevant charts, fixed problems in templates --- .../o-neko-catnip/tests/httproute_test.yaml | 61 +++++++++++++++++++ .../o-neko-catnip/tests/values/httproute.yaml | 21 +++++++ charts/o-neko/tests/httproute_test.yaml | 61 +++++++++++++++++++ charts/o-neko/tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 59 ++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ charts/sophora-ai/tests/httproute_test.yaml | 61 +++++++++++++++++++ charts/sophora-ai/tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 3 +- .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../sophora-server/tests/httproute_test.yaml | 60 ++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ charts/sophora-ugc/templates/httproute.yaml | 2 +- charts/sophora-ugc/tests/httproute_test.yaml | 61 +++++++++++++++++++ .../sophora-ugc/tests/values/httproute.yaml | 21 +++++++ .../templates/httproute.yaml | 2 + .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ .../templates/httproute.yaml | 2 +- .../tests/httproute_test.yaml | 61 +++++++++++++++++++ .../tests/values/httproute.yaml | 21 +++++++ 36 files changed, 1315 insertions(+), 3 deletions(-) create mode 100644 charts/o-neko-catnip/tests/httproute_test.yaml create mode 100644 charts/o-neko-catnip/tests/values/httproute.yaml create mode 100644 charts/o-neko/tests/httproute_test.yaml create mode 100644 charts/o-neko/tests/values/httproute.yaml create mode 100644 charts/sophora-admin-dashboard/tests/httproute_test.yaml create mode 100644 charts/sophora-admin-dashboard/tests/values/httproute.yaml create mode 100644 charts/sophora-ai/tests/httproute_test.yaml create mode 100644 charts/sophora-ai/tests/values/httproute.yaml create mode 100644 charts/sophora-image-access-service/tests/httproute_test.yaml create mode 100644 charts/sophora-image-access-service/tests/values/httproute.yaml create mode 100644 charts/sophora-image-ai/tests/httproute_test.yaml create mode 100644 charts/sophora-image-ai/tests/values/httproute.yaml create mode 100644 charts/sophora-importer/tests/httproute_test.yaml create mode 100644 charts/sophora-importer/tests/values/httproute.yaml create mode 100644 charts/sophora-indexing-service/tests/httproute_test.yaml create mode 100644 charts/sophora-indexing-service/tests/values/httproute.yaml create mode 100644 charts/sophora-linkchecker/tests/httproute_test.yaml create mode 100644 charts/sophora-linkchecker/tests/values/httproute.yaml create mode 100644 charts/sophora-media-finder/tests/httproute_test.yaml create mode 100644 charts/sophora-media-finder/tests/values/httproute.yaml create mode 100644 charts/sophora-metadata-supplier/tests/httproute_test.yaml create mode 100644 charts/sophora-metadata-supplier/tests/values/httproute.yaml create mode 100644 charts/sophora-schema-docs/tests/httproute_test.yaml create mode 100644 charts/sophora-schema-docs/tests/values/httproute.yaml create mode 100644 charts/sophora-server/tests/httproute_test.yaml create mode 100644 charts/sophora-server/tests/values/httproute.yaml create mode 100644 charts/sophora-ugc/tests/httproute_test.yaml create mode 100644 charts/sophora-ugc/tests/values/httproute.yaml create mode 100644 charts/sophora-webclient/tests/httproute_test.yaml create mode 100644 charts/sophora-webclient/tests/values/httproute.yaml create mode 100644 charts/sophora-youtube-connector/tests/httproute_test.yaml create mode 100644 charts/sophora-youtube-connector/tests/values/httproute.yaml diff --git a/charts/o-neko-catnip/tests/httproute_test.yaml b/charts/o-neko-catnip/tests/httproute_test.yaml new file mode 100644 index 00000000..514e7179 --- /dev/null +++ b/charts/o-neko-catnip/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-o-neko-catnip + - equal: + path: metadata + value: + name: values-test-release-o-neko-catnip + labels: + helm.sh/chart: o-neko-catnip-0.9.8 + app.kubernetes.io/name: o-neko-catnip + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-o-neko-catnip + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/o-neko-catnip/tests/values/httproute.yaml b/charts/o-neko-catnip/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/o-neko-catnip/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/o-neko/tests/httproute_test.yaml b/charts/o-neko/tests/httproute_test.yaml new file mode 100644 index 00000000..384b2f3d --- /dev/null +++ b/charts/o-neko/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-o-neko + - equal: + path: metadata + value: + name: values-test-release-o-neko + labels: + helm.sh/chart: o-neko-0.9.8 + app.kubernetes.io/name: o-neko + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-o-neko + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/o-neko/tests/values/httproute.yaml b/charts/o-neko/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/o-neko/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-admin-dashboard/tests/httproute_test.yaml b/charts/sophora-admin-dashboard/tests/httproute_test.yaml new file mode 100644 index 00000000..1737dfaa --- /dev/null +++ b/charts/sophora-admin-dashboard/tests/httproute_test.yaml @@ -0,0 +1,59 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-admin-dashboard + - equal: + path: metadata + value: + name: values-test-release-sophora-admin-dashboard + labels: + helm.sh/chart: sophora-admin-dashboard-0.9.8 + app.kubernetes.io/name: sophora-admin-dashboard + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-admin-dashboard + port: 80 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-admin-dashboard/tests/values/httproute.yaml b/charts/sophora-admin-dashboard/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-admin-dashboard/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-ai/tests/httproute_test.yaml b/charts/sophora-ai/tests/httproute_test.yaml new file mode 100644 index 00000000..5f8b8a0c --- /dev/null +++ b/charts/sophora-ai/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-ai + - equal: + path: metadata + value: + name: values-test-release-sophora-ai + labels: + helm.sh/chart: sophora-ai-0.9.8 + app.kubernetes.io/name: sophora-ai + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-ai + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-ai/tests/values/httproute.yaml b/charts/sophora-ai/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-ai/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-contentapi/tests/httproute_test.yaml b/charts/sophora-contentapi/tests/httproute_test.yaml index c3224725..c3c0084b 100644 --- a/charts/sophora-contentapi/tests/httproute_test.yaml +++ b/charts/sophora-contentapi/tests/httproute_test.yaml @@ -3,6 +3,7 @@ templates: - httproute.yaml chart: version: 0.9.8 + appVersion: 1.2.3 tests: - it: should not create httproute by default asserts: @@ -28,7 +29,7 @@ tests: labels: helm.sh/chart: sophora-contentapi-0.9.8 app.kubernetes.io/name: sophora-contentapi - app.kubernetes.io/version: 6.0.0 + app.kubernetes.io/version: 1.2.3 app.kubernetes.io/instance: values-test-release app.kubernetes.io/managed-by: Helm annotations: diff --git a/charts/sophora-image-access-service/tests/httproute_test.yaml b/charts/sophora-image-access-service/tests/httproute_test.yaml new file mode 100644 index 00000000..a4fcd67d --- /dev/null +++ b/charts/sophora-image-access-service/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: sophora-image-access-service + - equal: + path: metadata + value: + name: sophora-image-access-service + labels: + helm.sh/chart: sophora-image-access-service-0.9.8 + app.kubernetes.io/name: sophora-image-access-service + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: sophora-image-access-service + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-image-access-service/tests/values/httproute.yaml b/charts/sophora-image-access-service/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-image-access-service/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-image-ai/tests/httproute_test.yaml b/charts/sophora-image-ai/tests/httproute_test.yaml new file mode 100644 index 00000000..5f8b8a0c --- /dev/null +++ b/charts/sophora-image-ai/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-ai + - equal: + path: metadata + value: + name: values-test-release-sophora-ai + labels: + helm.sh/chart: sophora-ai-0.9.8 + app.kubernetes.io/name: sophora-ai + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-ai + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-image-ai/tests/values/httproute.yaml b/charts/sophora-image-ai/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-image-ai/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-importer/tests/httproute_test.yaml b/charts/sophora-importer/tests/httproute_test.yaml new file mode 100644 index 00000000..9dbb5836 --- /dev/null +++ b/charts/sophora-importer/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-importer + - equal: + path: metadata + value: + name: values-test-release-sophora-importer + labels: + helm.sh/chart: sophora-importer-0.9.8 + app.kubernetes.io/name: sophora-importer + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-importer + port: 80 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-importer/tests/values/httproute.yaml b/charts/sophora-importer/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-importer/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-indexing-service/tests/httproute_test.yaml b/charts/sophora-indexing-service/tests/httproute_test.yaml new file mode 100644 index 00000000..de35181c --- /dev/null +++ b/charts/sophora-indexing-service/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-indexing-service + - equal: + path: metadata + value: + name: values-test-release-sophora-indexing-service + labels: + helm.sh/chart: sophora-indexing-service-0.9.8 + app.kubernetes.io/name: sophora-indexing-service + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-indexing-service + port: 1837 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-indexing-service/tests/values/httproute.yaml b/charts/sophora-indexing-service/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-indexing-service/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-linkchecker/tests/httproute_test.yaml b/charts/sophora-linkchecker/tests/httproute_test.yaml new file mode 100644 index 00000000..bb99451c --- /dev/null +++ b/charts/sophora-linkchecker/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-linkchecker + - equal: + path: metadata + value: + name: values-test-release-sophora-linkchecker + labels: + helm.sh/chart: sophora-linkchecker-0.9.8 + app.kubernetes.io/name: sophora-linkchecker + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-linkchecker + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-linkchecker/tests/values/httproute.yaml b/charts/sophora-linkchecker/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-linkchecker/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-media-finder/tests/httproute_test.yaml b/charts/sophora-media-finder/tests/httproute_test.yaml new file mode 100644 index 00000000..6e8c9b3e --- /dev/null +++ b/charts/sophora-media-finder/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-media-finder + - equal: + path: metadata + value: + name: values-test-release-sophora-media-finder + labels: + helm.sh/chart: sophora-media-finder-0.9.8 + app.kubernetes.io/name: sophora-media-finder + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-media-finder + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-media-finder/tests/values/httproute.yaml b/charts/sophora-media-finder/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-media-finder/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-metadata-supplier/tests/httproute_test.yaml b/charts/sophora-metadata-supplier/tests/httproute_test.yaml new file mode 100644 index 00000000..84637fe7 --- /dev/null +++ b/charts/sophora-metadata-supplier/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-metadata-supplier + - equal: + path: metadata + value: + name: values-test-release-sophora-metadata-supplier + labels: + helm.sh/chart: sophora-metadata-supplier-0.9.8 + app.kubernetes.io/name: sophora-metadata-supplier + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-metadata-supplier + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-metadata-supplier/tests/values/httproute.yaml b/charts/sophora-metadata-supplier/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-metadata-supplier/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-schema-docs/tests/httproute_test.yaml b/charts/sophora-schema-docs/tests/httproute_test.yaml new file mode 100644 index 00000000..f7c48446 --- /dev/null +++ b/charts/sophora-schema-docs/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-schema-docs + - equal: + path: metadata + value: + name: values-test-release-sophora-schema-docs + labels: + helm.sh/chart: sophora-schema-docs-0.9.8 + app.kubernetes.io/name: sophora-schema-docs + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-schema-docs + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-schema-docs/tests/values/httproute.yaml b/charts/sophora-schema-docs/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-schema-docs/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-server/tests/httproute_test.yaml b/charts/sophora-server/tests/httproute_test.yaml new file mode 100644 index 00000000..2ceb5a99 --- /dev/null +++ b/charts/sophora-server/tests/httproute_test.yaml @@ -0,0 +1,60 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-server + - equal: + path: metadata + value: + name: values-test-release-sophora-server + labels: + helm.sh/chart: sophora-server-0.9.8 + app.kubernetes.io/name: sophora-server + app.kubernetes.io/version: latest + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-server + port: 1196 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-server/tests/values/httproute.yaml b/charts/sophora-server/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-server/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-ugc/templates/httproute.yaml b/charts/sophora-ugc/templates/httproute.yaml index ea7e423e..efe759a5 100644 --- a/charts/sophora-ugc/templates/httproute.yaml +++ b/charts/sophora-ugc/templates/httproute.yaml @@ -1,6 +1,6 @@ {{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-ugc.fullname" . -}} - {{- $svcPort := .Values.service.port -}} + {{- $svcPort := default 8080 ($.Values.ugc.config.server).port -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: diff --git a/charts/sophora-ugc/tests/httproute_test.yaml b/charts/sophora-ugc/tests/httproute_test.yaml new file mode 100644 index 00000000..3c22ea24 --- /dev/null +++ b/charts/sophora-ugc/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-ugc + - equal: + path: metadata + value: + name: values-test-release-sophora-ugc + labels: + helm.sh/chart: sophora-ugc-0.9.8 + app.kubernetes.io/name: sophora-ugc + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-ugc + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-ugc/tests/values/httproute.yaml b/charts/sophora-ugc/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-ugc/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-webclient/templates/httproute.yaml b/charts/sophora-webclient/templates/httproute.yaml index 1dc19136..0f8820e3 100644 --- a/charts/sophora-webclient/templates/httproute.yaml +++ b/charts/sophora-webclient/templates/httproute.yaml @@ -4,6 +4,8 @@ apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: {{ $fullName }} + labels: + {{- include "webclient.labels" . | nindent 4 }} {{- with .Values.httpRoute.annotations }} annotations: {{- toYaml . | nindent 4 }} diff --git a/charts/sophora-webclient/tests/httproute_test.yaml b/charts/sophora-webclient/tests/httproute_test.yaml new file mode 100644 index 00000000..82734e69 --- /dev/null +++ b/charts/sophora-webclient/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-webclient + - equal: + path: metadata + value: + name: values-test-release-sophora-webclient + labels: + helm.sh/chart: sophora-webclient-0.9.8 + app.kubernetes.io/name: sophora-webclient + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-webclient + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-webclient/tests/values/httproute.yaml b/charts/sophora-webclient/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-webclient/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value diff --git a/charts/sophora-youtube-connector/templates/httproute.yaml b/charts/sophora-youtube-connector/templates/httproute.yaml index 33832681..0b1ba4af 100644 --- a/charts/sophora-youtube-connector/templates/httproute.yaml +++ b/charts/sophora-youtube-connector/templates/httproute.yaml @@ -1,6 +1,6 @@ {{- if .Values.httpRoute.enabled -}} {{- $fullName := include "sophora-youtube-connector.fullname" . -}} - {{- $svcPort := .Values.service.port -}} + {{- $svcPort := .Values.service.httpPort -}} apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: diff --git a/charts/sophora-youtube-connector/tests/httproute_test.yaml b/charts/sophora-youtube-connector/tests/httproute_test.yaml new file mode 100644 index 00000000..5939ef3d --- /dev/null +++ b/charts/sophora-youtube-connector/tests/httproute_test.yaml @@ -0,0 +1,61 @@ +suite: test httproute +templates: + - httproute.yaml +chart: + version: 0.9.8 + appVersion: 1.2.3 +tests: + - it: should not create httproute by default + asserts: + - hasDocuments: + count: 0 + + - it: should create httproute with values + release: + name: values-test-release + values: + - ./values/httproute.yaml + asserts: + - hasDocuments: + count: 1 + - containsDocument: + kind: HTTPRoute + apiVersion: gateway.networking.k8s.io/v1 + name: values-test-release-sophora-youtube-connector + - equal: + path: metadata + value: + name: values-test-release-sophora-youtube-connector + labels: + helm.sh/chart: sophora-youtube-connector-0.9.8 + app.kubernetes.io/name: sophora-youtube-connector + app.kubernetes.io/version: 1.2.3 + app.kubernetes.io/instance: values-test-release + app.kubernetes.io/managed-by: Helm + annotations: + example.com/test: "simple" + example.com/text: some text value + - equal: + path: spec + value: + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + rules: + - backendRefs: + - name: values-test-release-sophora-youtube-connector + port: 8080 + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + matches: + - path: + type: PathPrefix + value: / + - notFailedTemplate: {} diff --git a/charts/sophora-youtube-connector/tests/values/httproute.yaml b/charts/sophora-youtube-connector/tests/values/httproute.yaml new file mode 100644 index 00000000..fa51e6cc --- /dev/null +++ b/charts/sophora-youtube-connector/tests/values/httproute.yaml @@ -0,0 +1,21 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + namespace: gateway-namespace + hostnames: + - my-service.example.com + - other.example.com + matches: + - path: + type: PathPrefix + value: / + filters: + - type: RequestHeaderModifier + requestHeaderModifier: + set: + - name: X-Custom-Header + value: custom-value + annotations: + example.com/test: simple + example.com/text: some text value From bcaae13e7e07dc789cc6a0979f49683aa29c22d8 Mon Sep 17 00:00:00 2001 From: Daniel Raap Date: Tue, 17 Feb 2026 12:19:50 +0100 Subject: [PATCH 26/26] fixed test of sophora-image-ai --- charts/sophora-image-ai/tests/httproute_test.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/sophora-image-ai/tests/httproute_test.yaml b/charts/sophora-image-ai/tests/httproute_test.yaml index 5f8b8a0c..09bb1691 100644 --- a/charts/sophora-image-ai/tests/httproute_test.yaml +++ b/charts/sophora-image-ai/tests/httproute_test.yaml @@ -21,14 +21,14 @@ tests: - containsDocument: kind: HTTPRoute apiVersion: gateway.networking.k8s.io/v1 - name: values-test-release-sophora-ai + name: values-test-release-sophora-image-ai - equal: path: metadata value: - name: values-test-release-sophora-ai + name: values-test-release-sophora-image-ai labels: - helm.sh/chart: sophora-ai-0.9.8 - app.kubernetes.io/name: sophora-ai + helm.sh/chart: sophora-image-ai-0.9.8 + app.kubernetes.io/name: sophora-image-ai app.kubernetes.io/version: 1.2.3 app.kubernetes.io/instance: values-test-release app.kubernetes.io/managed-by: Helm @@ -46,7 +46,7 @@ tests: - other.example.com rules: - backendRefs: - - name: values-test-release-sophora-ai + - name: values-test-release-sophora-image-ai port: 8080 filters: - type: RequestHeaderModifier