diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index 0374956..bfc5e0d 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -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.6.3 +version: 2.7.0 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index bbbcc9c..b90988d 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -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.6.3](https://img.shields.io/badge/Version-2.6.3-informational?style=flat-square) +![Version: 2.7.0](https://img.shields.io/badge/Version-2.7.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 @@ -163,6 +163,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
E.g. `imagePullSecrets: [myRegistryKeySecretName]` | list | `[]` | | global.imageRegistry | Global Docker image registry | string | `""` | +| httpRoute | HTTPRoute parameters, the successor to Ingress for routing HTTP traffic (Gateway API) | object | See below | +| httpRoute.annotations | Additional annotations for the HTTPRoute resource | object | `{}` | +| httpRoute.enabled | Enable the creation of the HTTPRoute resource | bool | `false` | +| httpRoute.extraRules | Additional routing rules
Ref: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.HTTPRouteRule | list | `[]` | +| httpRoute.hostnames | Hostnames to be used for the HTTPRoute | list | `[]` | +| httpRoute.parentRefs | Gateway reference configuration (list of parent Gateway references)
Ref: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.ParentReference | list | `[]` | +| httpRoute.path | Path to be used for the HTTPRoute (default: "/") | string | `"/"` | | 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 | `""` | diff --git a/charts/backstage/ci/httproute-values.yaml b/charts/backstage/ci/httproute-values.yaml new file mode 100644 index 0000000..3ccf9c9 --- /dev/null +++ b/charts/backstage/ci/httproute-values.yaml @@ -0,0 +1,6 @@ +httpRoute: + enabled: true + parentRefs: + - name: my-gateway + hostnames: + - backstage.example.com diff --git a/charts/backstage/templates/httproute.yaml b/charts/backstage/templates/httproute.yaml new file mode 100644 index 0000000..b5907a5 --- /dev/null +++ b/charts/backstage/templates/httproute.yaml @@ -0,0 +1,57 @@ +{{- if .Values.httpRoute.enabled }} +{{- if not .Values.httpRoute.parentRefs }} +{{- fail "httpRoute.parentRefs is required when httpRoute.enabled is true. Please specify at least one Gateway reference." }} +{{- end }} +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ include "common.names.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 or .Values.httpRoute.annotations .Values.commonAnnotations }} + annotations: + {{- if .Values.httpRoute.annotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.httpRoute.annotations "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} + {{- end }} +spec: + parentRefs: + {{- range .Values.httpRoute.parentRefs }} + - group: {{ .group | default "gateway.networking.k8s.io" }} + kind: {{ .kind | default "Gateway" }} + name: {{ include "common.tplvalues.render" ( dict "value" .name "context" $ ) }} + {{- if .namespace }} + namespace: {{ include "common.tplvalues.render" ( dict "value" .namespace "context" $ ) }} + {{- end }} + {{- if .sectionName }} + sectionName: {{ include "common.tplvalues.render" ( dict "value" .sectionName "context" $ ) }} + {{- end }} + {{- end }} + {{- if .Values.httpRoute.hostnames }} + hostnames: + {{- range .Values.httpRoute.hostnames }} + - {{ include "common.tplvalues.render" ( dict "value" . "context" $ ) | quote }} + {{- end }} + {{- end }} + rules: + - matches: + - path: + type: PathPrefix + value: {{ .Values.httpRoute.path | default "/" }} + backendRefs: + - group: "" + kind: Service + name: {{ include "common.names.fullname" . }} + port: {{ .Values.service.ports.backend }} + weight: 1 + {{- if .Values.httpRoute.extraRules }} + {{- include "common.tplvalues.render" ( dict "value" .Values.httpRoute.extraRules "context" $ ) | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index ee86f19..72f3cc3 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -6340,6 +6340,79 @@ "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" + }, + "extraRules": { + "default": [], + "title": "Additional routing rules", + "type": "array" + }, + "hostnames": { + "default": [], + "items": { + "type": "string" + }, + "title": "Hostnames to be used for the HTTPRoute", + "type": "array" + }, + "parentRefs": { + "default": [], + "items": { + "properties": { + "group": { + "default": "gateway.networking.k8s.io", + "title": "API group of the Gateway", + "type": "string" + }, + "kind": { + "default": "Gateway", + "title": "Kind of the Gateway", + "type": "string" + }, + "name": { + "default": "", + "title": "Name of the Gateway", + "type": "string" + }, + "namespace": { + "default": "", + "title": "Namespace of the Gateway", + "type": "string" + }, + "sectionName": { + "default": "", + "title": "SectionName within the target Gateway", + "type": "string" + } + }, + "type": "object" + }, + "title": "Gateway reference configuration", + "type": "array" + }, + "path": { + "default": "/", + "title": "Path to be used for the HTTPRoute", + "type": "string" + } + }, + "title": "HTTPRoute parameters (Gateway API)", + "type": "object" + }, "ingress": { "additionalProperties": false, "properties": { diff --git a/charts/backstage/values.schema.tmpl.json b/charts/backstage/values.schema.tmpl.json index 80f5f94..ff96066 100644 --- a/charts/backstage/values.schema.tmpl.json +++ b/charts/backstage/values.schema.tmpl.json @@ -202,6 +202,79 @@ } } }, + "httpRoute": { + "title": "HTTPRoute parameters (Gateway API)", + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "title": "Enable the creation of the HTTPRoute resource", + "type": "boolean", + "default": false + }, + "annotations": { + "title": "Additional annotations for the HTTPRoute resource", + "type": "object", + "default": {}, + "additionalProperties": { + "type": "string" + } + }, + "parentRefs": { + "title": "Gateway reference configuration", + "type": "array", + "default": [], + "items": { + "type": "object", + "properties": { + "group": { + "title": "API group of the Gateway", + "type": "string", + "default": "gateway.networking.k8s.io" + }, + "kind": { + "title": "Kind of the Gateway", + "type": "string", + "default": "Gateway" + }, + "name": { + "title": "Name of the Gateway", + "type": "string", + "default": "" + }, + "namespace": { + "title": "Namespace of the Gateway", + "type": "string", + "default": "" + }, + "sectionName": { + "title": "SectionName within the target Gateway", + "type": "string", + "default": "" + } + } + } + }, + "hostnames": { + "title": "Hostnames to be used for the HTTPRoute", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "path": { + "title": "Path to be used for the HTTPRoute", + "type": "string", + "default": "/" + }, + "extraRules": { + "title": "Additional routing rules", + "type": "array", + "default": [] + } + } + }, "backstage": { "title": "Backstage parameters", "type": "object", diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index 36aac53..be5930e 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -97,6 +97,46 @@ ingress: # secretName: backstage-env --> extraTls: [] +# -- HTTPRoute parameters, the successor to Ingress for routing HTTP traffic (Gateway API) +# @default -- See below +httpRoute: + + # -- Enable the creation of the HTTPRoute resource + enabled: false + + # -- Additional annotations for the HTTPRoute resource + annotations: {} + + # -- Gateway reference configuration (list of parent Gateway references) + #
Ref: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.ParentReference + # + parentRefs: [] + + # -- Hostnames to be used for the HTTPRoute + # + hostnames: [] + + # -- Path to be used for the HTTPRoute (default: "/") + path: "/" + + # -- Additional routing rules + #
Ref: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.HTTPRouteRule + # + extraRules: [] + # -- Backstage parameters # @default -- See below backstage: