Skip to content

[chore] Updating pullPolicy to match uptsream chart#281

Closed
OpinionatedHeron wants to merge 0 commit intoredhat-developer:mainfrom
OpinionatedHeron:imagePullPolicy
Closed

[chore] Updating pullPolicy to match uptsream chart#281
OpinionatedHeron wants to merge 0 commit intoredhat-developer:mainfrom
OpinionatedHeron:imagePullPolicy

Conversation

@OpinionatedHeron
Copy link
Copy Markdown
Member

Description of the change

Updating the pullPolicy to match the default configuration to the upstream Backstage chart.

Which issue(s) does this PR fix or relate to

RHDHBUGS-2236

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes. The pre-commit Workflow will do this automatically for you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

@rhdh-qodo-merge
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

RHDHBUGS-2236 - PR Code Verified

Compliant requirements:

  • Unset image pullPolicy values in the RHDH charts to honor Kubernetes default pull behavior.
  • Align defaults with the upstream Backstage chart where pullPolicy is unset.
  • Bump chart version(s) appropriately following semantic versioning.
  • Ensure values.yaml, schema template, and generated schema reflect the change consistently.

Requires further human verification:

  • Ensure chart testing (ct lint) and pre-commit schema generation were executed and pass in CI.
  • Validate runtime behavior on a cluster that Kubernetes default imagePullPolicy is indeed applied as expected across all workloads.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🔒 No security concerns identified
⚡ Recommended focus areas for review

Schema Consistency

Verify that setting imagePullPolicy to an empty string in the generated schema is acceptable for schema validation and consumer tooling, and that upstream references tolerate empty strings rather than omitting the field entirely.

"image": "{{ include \"backstage.image\" . }}",
"imagePullPolicy": "",
"name": "install-dynamic-plugins",
Test Pod PullPolicy

Confirm that using an empty string for imagePullPolicy in test manifests does not conflict with Helm/Kubernetes validation and still results in the field being omitted in rendered manifests as intended.

image: "{{ .Values.test.image.registry }}/{{ .Values.test.image.repository }}:{{ .Values.test.image.tag }}"
imagePullPolicy: ""
command: ["/bin/sh", "-c"]
📚 Focus areas based on broader codebase context

Schema Mismatch

The PR sets imagePullPolicy to an empty string in multiple places, but the values schema defaults currently expect explicit values. Ensure the values and schema stay aligned to avoid Helm validation or rendering inconsistencies. (Ref 1, Ref 2)

imagePullPolicy: ""
command: ["/bin/sh", "-c"]

Reference reasoning: The existing chart configuration and values emphasize explicit, OpenShift-compatible defaults and alignment with upstream settings. Introducing empty strings for imagePullPolicy without updating associated defaults/schemas can diverge from documented expectations and previously explicit configuration patterns.

📄 References
  1. redhat-developer/rhdh-chart/charts/backstage/values.yaml [22-34]
  2. redhat-developer/rhdh-chart/charts/backstage/values.yaml [99-112]
  3. redhat-developer/rhdh-chart/charts/backstage/ci/with-orchestrator-values.yaml [1-21]
  4. redhat-developer/rhdh-chart/charts/backstage/ci/with-orchestrator-and-dynamic-plugins-npmrc-values.yaml [1-24]
  5. redhat-developer/rhdh-chart/charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml [0-2]
  6. redhat-developer/rhdh-chart/charts/backstage/templates/network-policies.yaml [0-2]
  7. redhat-developer/rhdh-chart/charts/orchestrator-software-templates/ci/upstream-values.yaml [1-16]
  8. redhat-developer/rhdh-chart/charts/orchestrator-software-templates/templates/tekton/tekton-tasks.yaml [117-151]

@rhdh-qodo-merge rhdh-qodo-merge Bot added Review effort 2/5 enhancement New feature or request labels Dec 8, 2025
@rhdh-qodo-merge
Copy link
Copy Markdown

PR Type

Enhancement


Description

  • Update imagePullPolicy from IfNotPresent to empty string across multiple charts

  • Align with upstream Backstage chart default configuration

  • Bump backstage chart version to 4.6.4

  • Update JSON schema and template files to reflect policy changes


File Walkthrough

Relevant files
Configuration changes
Chart.yaml
Bump backstage chart version                                                         

charts/backstage/Chart.yaml

  • Increment chart version from 4.6.3 to 4.6.4 following semantic
    versioning
+1/-1     
test-connection.yaml
Update test pod imagePullPolicy                                                   

charts/backstage/templates/tests/test-connection.yaml

  • Change imagePullPolicy from IfNotPresent to empty string in test
    connection pod
+1/-1     
values.schema.json
Update schema imagePullPolicy value                                           

charts/backstage/values.schema.json

  • Update imagePullPolicy from IfNotPresent to empty string in
    install-dynamic-plugins init container schema
+1/-1     
values.schema.tmpl.json
Update template schema pullPolicy                                               

charts/backstage/values.schema.tmpl.json

  • Change pullPolicy from IfNotPresent to empty string in upstream
    backstage image defaults
+1/-1     
values.yaml
Update values imagePullPolicy settings                                     

charts/backstage/values.yaml

  • Change upstream backstage image pullPolicy from IfNotPresent to empty
    string
  • Update install-dynamic-plugins init container imagePullPolicy to empty
    string
+2/-2     
wait-for-crd.yaml
Update wait-for-crd imagePullPolicy                                           

charts/orchestrator-software-templates-infra/templates/openshift-gitops/wait-for-crd.yaml

  • Change imagePullPolicy from IfNotPresent to empty string in
    wait-for-crd container
+1/-1     

@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented Dec 8, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix invalid imagePullPolicy value

Set imagePullPolicy to a valid value like IfNotPresent, as an empty string is
invalid and will cause resource creation to fail.

charts/backstage/templates/tests/test-connection.yaml [34]

-imagePullPolicy: ""
+imagePullPolicy: IfNotPresent
  • Apply / Chat
Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies that an empty string is an invalid value for imagePullPolicy, and this change introduced in the PR would cause Kubernetes resource creation to fail.

High
Fix invalid image pull policy

Set pullPolicy to a valid value like IfNotPresent, as an empty string will
render an invalid imagePullPolicy in Kubernetes manifests and cause deployment
failures.

charts/backstage/values.yaml [42]

-pullPolicy: ""
+pullPolicy: IfNotPresent
  • Apply / Chat
Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies that setting pullPolicy to an empty string in values.yaml will result in an invalid Kubernetes manifest, causing deployment failures.

High
  • Update

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant