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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # pin@v1.14.0

- name: Install Gateway API CRDs
if: steps.list-changed.outputs.changed == 'true'
run: kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.0/standard-install.yaml

- name: Install Ingress Controller
if: steps.list-changed.outputs.changed == 'true'
run: "helm install ingress-nginx/ingress-nginx --generate-name --set controller.service.type='NodePort' --set controller.admissionWebhooks.enabled=false"
Expand Down
2 changes: 1 addition & 1 deletion charts/backstage/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ sources:
# 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.7.0
version: 2.8.0
9 changes: 8 additions & 1 deletion charts/backstage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Backstage Helm Chart

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/backstage)](https://artifacthub.io/packages/search?repo=backstage)
![Version: 2.7.0](https://img.shields.io/badge/Version-2.7.0-informational?style=flat-square)
![Version: 2.8.0](https://img.shields.io/badge/Version-2.8.0-informational?style=flat-square)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for deploying a Backstage application
Expand Down Expand Up @@ -164,6 +164,13 @@ Kubernetes: `>= 1.19.0-0`
| global | Global parameters Global Docker image parameters Please, note that this will override the image parameters, including dependencies, configured to use the global value Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass | object | See below |
| global.imagePullSecrets | Global Docker registry secret names as an array </br> E.g. `imagePullSecrets: [myRegistryKeySecretName]` | list | `[]` |
| global.imageRegistry | Global Docker image registry | string | `""` |
| httpRoute | HTTPRoute parameters | object | `{"annotations":{},"enabled":false,"hostnames":[],"labels":{},"parentRefs":[],"rules":[{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]}` |
| httpRoute.annotations | Additional annotations for the HTTPRoute resource | object | `{}` |
| httpRoute.enabled | Enable the creation of the HTTPRoute resource | bool | `false` |
| httpRoute.hostnames | List of hostnames matching HTTP header | list | `[]` |
| httpRoute.labels | Additional labels for the HTTPRoute resource | object | `{}` |
| httpRoute.parentRefs | List of Gateways this HTTPRoute is attached to | list | `[]` |
| httpRoute.rules | List of rules and filters applied to the HTTPRoute | list | `[{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` |
| ingress | Ingress parameters | object | `{"annotations":{},"className":"","enabled":false,"extraHosts":[],"extraTls":[],"host":"","path":"/","tls":{"enabled":false,"secretName":""}}` |
| ingress.annotations | Additional annotations for the Ingress resource | object | `{}` |
| ingress.className | Name of the IngressClass cluster resource which defines which controller will implement the resource (e.g nginx) | string | `""` |
Expand Down
7 changes: 7 additions & 0 deletions charts/backstage/ci/httproute-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
httpRoute:
enabled: true
parentRefs:
- name: default
namespace: proxy
hostnames:
- backstage.example.com
51 changes: 51 additions & 0 deletions charts/backstage/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "common.names.fullname" . -}}
{{- $svcPort := .Values.service.ports.backend -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: backstage
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.httpRoute.labels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.httpRoute.labels "context" $) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.httpRoute.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.httpRoute.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- with .Values.httpRoute.parentRefs }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the upstream API spec it seems we're lacking the timeouts field within rules. Can you please add it?

https://gateway-api.sigs.k8s.io/reference/spec/#httprouterule

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can this, but I haven't seen this on any helm resource for other charts so far.

{{- range .Values.httpRoute.rules }}
{{- with .matches }}
- matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .name }}
name: {{ .name }}
{{- end }}
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
weight: 1
{{- end }}
{{- end }}
217 changes: 217 additions & 0 deletions charts/backstage/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6358,6 +6358,223 @@
"title": "Global parameters.",
"type": "object"
},
"httpRoute": {
"additionalProperties": false,
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Additional annotations for the HTTPRoute resource",
"type": "object"
},
"enabled": {
"default": false,
"title": "Enable the creation of the HTTPRoute resource",
"type": "boolean"
},
"hostnames": {
"default": [],
"items": {
"type": "string"
},
"title": "List of hostnames matching HTTP header",
"type": "array"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"default": {},
"title": "Additional labels for the HTTPRoute resource",
"type": "object"
},
"parentRefs": {
"default": [],
"items": {
"additionalProperties": false,
"properties": {
"group": {
"title": "Group is the group of the referent.",
"type": "string"
},
"kind": {
"title": "Kind is kind of the referent.",
"type": "string"
},
"name": {
"title": "Name is the name of the referent.",
"type": "string"
},
"namespace": {
"title": "Namespace is the namespace of the referent.",
"type": "string"
},
"port": {
"title": "Port is the network port this Route targets.",
"type": "integer"
},
"sectionName": {
"title": "SectionName is the name of a section within the target resource.",
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"title": "List of Gateways this HTTPRoute is attached to",
"type": "array"
},
"rules": {
"default": [],
"items": {
"additionalProperties": false,
"properties": {
"backendRefs": {
"items": {
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"kind": {
"type": "string"
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"port": {
"type": "integer"
},
"weight": {
"type": "integer"
}
},
"type": "object"
},
"type": "array"
},
"filters": {
"items": {
"type": "object"
},
"type": "array"
},
"matches": {
"items": {
"additionalProperties": false,
"properties": {
"headers": {
"items": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"type": {
"enum": [
"Exact",
"RegularExpression"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
],
"type": "object"
},
"type": "array"
},
"method": {
"enum": [
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"CONNECT",
"OPTIONS",
"TRACE",
"PATCH"
],
"type": "string"
},
"path": {
"additionalProperties": false,
"properties": {
"type": {
"enum": [
"Exact",
"PathPrefix",
"RegularExpression"
],
"title": "HTTPPathMatchType specifies the semantics of how HTTP paths should be compared.",
"type": "string"
},
"value": {
"title": "Value of the HTTP path to match against.",
"type": "string"
}
},
"title": "Path specifies a HTTP request path matcher.",
"type": "object"
},
"queryParams": {
"items": {
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"type": {
"enum": [
"Exact",
"RegularExpression"
],
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
],
"type": "object"
},
"type": "array"
}
},
"type": "object"
},
"type": "array"
},
"name": {
"title": "Name is the name of the rule.",
"type": "string"
}
},
"type": "object"
},
"title": "List of rules and filters applied to the HTTPRoute",
"type": "array"
}
},
"title": "HTTPRoute parameters",
"type": "object"
},
"ingress": {
"additionalProperties": false,
"properties": {
Expand Down
Loading
Loading