Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix hardcoded image for test connection pod and allow to skip the creation of this pod [RHDHBUGS-155] [RHIDP-5558] #54

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

rm3l
Copy link
Member

@rm3l rm3l commented Jan 14, 2025

Description of the change

This PR makes the test-connection pod image configurable.
As reported in https://issues.redhat.com/browse/RHDHBUGS-155, the fact that the image is hardcoded can be an issue in air-gapped environments.
Besides that, this PR also makes it possible to disable the creation of this test-connection pod. I've tested it and it doesn't prevent helm test from passing even with no test pod available.

Existing or Associated Issue(s)

Additional Information

  • Disable the creation of the test pod and run helm test
$ helm upgrade --install my-backstage-1 charts/backstage --set route.enabled=false --set test.enabled=false

$ helm test my-backstage-1
[...]
NAME: my-backstage-1
LAST DEPLOYED: Tue Jan 14 18:28:25 2025
NAMESPACE: my-ns
STATUS: deployed
REVISION: 1
TEST SUITE: None
  • Try using a different image and tag
$ helm upgrade --install my-backstage-2 charts/backstage \
    --set route.enabled=false \
    --set test.image.repository=curl/curl-base \
    --set test.image.tag=8.11.1

$ helm test my-backstage-2
[...]
# the test connection should use this image: quay.io/curl/curl-base:8.11.1
NAME: my-backstage-2
LAST DEPLOYED: Tue Jan 14 18:30:19 2025
NAMESPACE: my-ns
STATUS: deployed
REVISION: 1
TEST SUITE:     my-backstage-2-test-connection
Last Started:   Tue Jan 14 18:32:44 2025
Last Completed: Tue Jan 14 18:32:53 2025
Phase:          Succeeded

Checklist

  • Chart version bumped in Chart.yaml according to semver.
  • Variables are documented in the values.yaml and added to the README.md. The pre-commit utility can be used to generate the necessary content. Use pre-commit run -a to apply changes.
  • JSON Schema template updated and re-generated the raw schema via pre-commit hook.
  • List tests pass for Chart using the Chart Testing tool and the ct lint command.

@rm3l rm3l force-pushed the RHDHBUGS-155--RHIDP-5558--fix-hardcoded-image-for-test-connection-pod branch from 96d7e22 to 21e3ac6 Compare January 14, 2025 18:27
@rm3l rm3l changed the title [WIP] fix: Fix hardcoded image for test connection pod and allow to skip the creation of this pod [RHDHBUGS-155] [RHIDP-5558] fix: Fix hardcoded image for test connection pod and allow to skip the creation of this pod [RHDHBUGS-155] [RHIDP-5558] Jan 14, 2025
@rm3l rm3l marked this pull request as ready for review January 14, 2025 19:16
@openshift-ci openshift-ci bot requested review from davidfestal and kadel January 14, 2025 19:16
charts/backstage/README.md Outdated Show resolved Hide resolved
charts/backstage/README.md Outdated Show resolved Hide resolved
charts/backstage/values.yaml Outdated Show resolved Hide resolved
charts/backstage/values.yaml Outdated Show resolved Hide resolved
@rm3l rm3l requested review from gazarenkov and Fortune-Ndlovu and removed request for davidfestal January 15, 2025 09:05
@rm3l rm3l force-pushed the RHDHBUGS-155--RHIDP-5558--fix-hardcoded-image-for-test-connection-pod branch 2 times, most recently from c020c87 to 8730d86 Compare January 15, 2025 10:15
Copy link
Member

@gazarenkov gazarenkov left a comment

Choose a reason for hiding this comment

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

Can we have helm test related information (like one from the description of this PR) somewhere documented (in Readme or so)? Would it make sense?

@rm3l
Copy link
Member Author

rm3l commented Jan 20, 2025

Can we have helm test related information (like one from the description of this PR) somewhere documented (in Readme or so)? Would it make sense?

Sure, that makes sense. I think we should have a more general CONTRIBUTING guide. I can add that as part of a subsequent issue/PR.

@gazarenkov
Copy link
Member

Can we have helm test related information (like one from the description of this PR) somewhere documented (in Readme or so)? Would it make sense?

Sure, that makes sense. I think we should have a more general CONTRIBUTING guide. I can add that as part of a subsequent issue/PR.

Yes, but until we decide "Testing" or so section in README would work as well :)

@rm3l rm3l force-pushed the RHDHBUGS-155--RHIDP-5558--fix-hardcoded-image-for-test-connection-pod branch from 8730d86 to 2b427fd Compare January 20, 2025 17:28
@rm3l rm3l requested a review from a team as a code owner January 20, 2025 17:28
@rm3l rm3l force-pushed the RHDHBUGS-155--RHIDP-5558--fix-hardcoded-image-for-test-connection-pod branch from 2b427fd to 83e13aa Compare January 20, 2025 17:31
@rm3l
Copy link
Member Author

rm3l commented Jan 20, 2025

Can we have helm test related information (like one from the description of this PR) somewhere documented (in Readme or so)? Would it make sense?

Sure, that makes sense. I think we should have a more general CONTRIBUTING guide. I can add that as part of a subsequent issue/PR.

Yes, but until we decide "Testing" or so section in README would work as well :)

Ok, added in 83e13aa (#54). PTAL. Thanks.

@rm3l rm3l requested a review from gazarenkov January 20, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants