Skip to content

Commit 3428a9a

Browse files
authored
fix(backstage): correctly render lightspeed image fields regardless if they are string or map [RHDHBUGS-3091] (#385)
1 parent e076f4c commit 3428a9a

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

charts/backstage/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ sources: []
4747
# Versions are expected to follow Semantic Versioning (https://semver.org/)
4848
# Note that when this chart is published to https://github.com/openshift-helm-charts/charts
4949
# it will follow the RHDH versioning 1.y.z
50-
version: 5.11.0
50+
version: 5.11.1

charts/backstage/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# RHDH Backstage Helm Chart for OpenShift
33

4-
![Version: 5.11.0](https://img.shields.io/badge/Version-5.11.0-informational?style=flat-square)
4+
![Version: 5.11.1](https://img.shields.io/badge/Version-5.11.1-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
A Helm chart for deploying Red Hat Developer Hub, which is a Red Hat supported version of Backstage.
@@ -29,7 +29,7 @@ For the **Generally Available** version of this chart, see:
2929
helm repo add bitnami https://charts.bitnami.com/bitnami
3030
helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart
3131

32-
helm install my-backstage redhat-developer/backstage --version 5.11.0
32+
helm install my-backstage redhat-developer/backstage --version 5.11.1
3333
```
3434

3535
## Introduction

charts/backstage/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ Referenced from: https://github.com/bitnami/charts/blob/main/bitnami/postgresql/
4949
{{- end -}}
5050
{{- end -}}
5151

52+
{{/*
53+
Return an image reference from a value that may be a string or a map with registry/repository/tag fields.
54+
*/}}
55+
{{- define "backstage.image.render" -}}
56+
{{- if kindIs "string" .image -}}
57+
{{- .image -}}
58+
{{- else -}}
59+
{{- include "common.images.image" (dict "imageRoot" (.image | toYaml | fromYaml) "global" .global) -}}
60+
{{- end -}}
61+
{{- end -}}
62+
5263
{{/*
5364
Return the configured Lightspeed runtime volume type and validate the required
5465
source block is present.

charts/backstage/vendor/backstage/charts/backstage/templates/backstage-deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ spec:
131131
{{- end }}
132132
{{- if $lightspeed.enabled }}
133133
- name: {{ $lightspeed.initContainer.name }}
134-
image: {{ include "common.tplvalues.render" (dict "value" $lightspeed.initContainer.image "context" $) }}
134+
image: {{ include "backstage.image.render" (dict "image" $lightspeed.initContainer.image "global" .Values.global) | quote }}
135135
imagePullPolicy: {{ $lightspeed.initContainer.imagePullPolicy | quote }}
136136
{{- if $lightspeed.initContainer.securityContext }}
137137
securityContext:
@@ -255,7 +255,7 @@ spec:
255255
{{- end }}
256256
{{- if $lightspeed.enabled }}
257257
- name: {{ $lightspeed.sidecar.name }}
258-
image: {{ include "common.tplvalues.render" (dict "value" $lightspeed.sidecar.image "context" $) }}
258+
image: {{ include "backstage.image.render" (dict "image" $lightspeed.sidecar.image "global" .Values.global) | quote }}
259259
imagePullPolicy: {{ $lightspeed.sidecar.imagePullPolicy | quote }}
260260
{{- if $lightspeed.sidecar.securityContext }}
261261
securityContext:

0 commit comments

Comments
 (0)