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

Wired up version field in AppChart #2101

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Wired up version field in AppChart #2101

wants to merge 2 commits into from

Conversation

agracey
Copy link
Contributor

@agracey agracey commented Feb 23, 2023

Currently, you can't specify the needed fields to use an OCI chart as an application template:
#1485

Opening as draft since I've confirmed that the code compiles but I ran out of time to test the new functionality :(

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2023

Codecov Report

Base: 43.54% // Head: 31.48% // Decreases project coverage by -12.07% ⚠️

Coverage data is based on head (4da9725) compared to base (cc90d9e).
Patch coverage: 50.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2101       +/-   ##
===========================================
- Coverage   43.54%   31.48%   -12.07%     
===========================================
  Files         181      181               
  Lines       14603    14608        +5     
===========================================
- Hits         6359     4599     -1760     
- Misses       7415     9380     +1965     
+ Partials      829      629      -200     
Flag Coverage Δ
acceptance-api 29.60% <50.00%> (-4.39%) ⬇️
acceptance-cli ?
unittests 8.46% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/api/core/v1/models/models.go 40.90% <ø> (-18.19%) ⬇️
internal/appchart/appchart.go 43.96% <40.00%> (-10.09%) ⬇️
internal/helm/helm.go 68.40% <100.00%> (-1.54%) ⬇️
helpers/bytes/bytes.go 0.00% <0.00%> (-100.00%) ⬇️
internal/dex/code_verifier.go 0.00% <0.00%> (-100.00%) ⬇️
helpers/string.go 0.00% <0.00%> (-80.00%) ⬇️
internal/api/v1/service/match.go 0.00% <0.00%> (-75.68%) ⬇️
internal/api/v1/service/catalogmatch.go 0.00% <0.00%> (-74.29%) ⬇️
internal/cli/admincmd/settings.go 0.00% <0.00%> (-69.12%) ⬇️
internal/dex/dex.go 0.00% <0.00%> (-66.67%) ⬇️
... and 54 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@agracey
Copy link
Contributor Author

agracey commented Feb 23, 2023

This does work but needs a change to the CRD.

@@ -321,7 +321,7 @@ func Deploy(logger logr.Logger, parameters ChartParameters) error {
}

helmChart := appChart.HelmChart
helmVersion := ""
helmVersion := appChart.ChartVersion

Copy link
Contributor

Choose a reason for hiding this comment

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

How do you see this interacting with

pieces := strings.SplitN(helmChart, ":", 2)
if len(pieces) == 2 {
helmVersion = pieces[1]
helmChart = pieces[0]
}
just a few lines below ?

IOW when the chart reference is relative to a helm repository then the version is taken from the chart reference, with actual chart and version separated by :.

Could something similar be done with OCI references ? Assuming that OCI references can be detected as such generally.

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.

None yet

3 participants