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 (jkube-kit/resource/helm) : Remove classifier from Helm Chart tarball name (#1369) #2036
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #2036 (2023-03-24T06:11:23Z) ⚙️ JKube E2E Tests (4508242444)
|
Codecov Report
@@ Coverage Diff @@
## master #2036 +/- ##
============================================
+ Coverage 55.73% 55.76% +0.02%
- Complexity 4284 4289 +5
============================================
Files 481 481
Lines 21211 21218 +7
Branches 2841 2841
============================================
+ Hits 11823 11833 +10
+ Misses 8177 8176 -1
+ Partials 1211 1209 -2
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
E2E tests need to be updated |
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Relates to dekorateio/dekorate#1087 |
@manusa : dekorateio/dekorate#1087 seems to make classifier a configurable field with default value as EMPTY string. Shall I modify this PR to add a configurable field for the classifier as well? |
Yes, I think that would keep things consistent in case of an eventual merge + also allow for backwards compatibility in our side. |
76048ba
to
0484adf
Compare
I checked using a Quarkus project. There is some difference in locations where jkube and dekorate generate helm charts: JKube: Dekorate: Do we want to jkube to change it's default locations to be same as dekorate? |
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
… Helm Chart tarball name (eclipse-jkube#1369) + Add new field in HelmConfig with name tarFileClassifier + Change default location of Helm Chart tarball directory to output directory to avoid collission between K8s and OpenShift helm chart tarballs. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
+ Move Helm documentation out of maven/gradle plugins to JKube Kit + Modify default value of Helm Tarball Output Directory value to be same as Helm Output Directory Signed-off-by: Rohan Kumar <rohaan@redhat.com>
0484adf
to
9eb7d9d
Compare
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@@ -323,4 +324,11 @@ private static List<HelmParameter> collectParameters(HelmConfig helmConfig) { | |||
}); | |||
return parameters; | |||
} | |||
|
|||
private static String resolveHelmClassifier(HelmConfig helmConfig) { | |||
if (StringUtils.isEmpty(helmConfig.getTarFileClassifier())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for any subsequent PR, please use isBlank instead, this way we make sure a classifier such as
is not considered.
private static File helmK8sOutputDir; | ||
private static File helmOpenShiftOutputDir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these variables static??
@manusa : Helm chart was getting generated in Previously, In order to change the default This was causing problems with the case when there was more than one helm type(HelmType.KUBERNETES and HelmType.OPENSHIFT). I have moved tarballOutDir defaulting logic to HelmService so that we can use the helmType provided in that particular helm chart generation iteration. |
Signed-off-by: Marc Nuri <marc@marcnuri.com>
…tection logic to HelmService + Rather than setting default tarballOutputDir in HelmServiceUtil, we should leave it up to HelmService to automatically pick it up since it already has helm type information available. + Remove hardcoded value of tarballOutputDir from HelmServiceIT#setUp method Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Marc Nuri <marc@marcnuri.com>
Kudos, SonarCloud Quality Gate passed! |
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Related to eclipse-jkube/jkube#1369 eclipse-jkube/jkube#2036 removes trailing classifier suffixes from generated Helm Archives. It also changes the default location where Helm Archive is generated. Update E2E tests to accomodate this change. Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Description
Fixes #1369
directory to avoid collission between K8s and OpenShift helm chart
tarballs.
Breaking Changes:
k8s:helm
/k8sHelm
would no longer contain trailing classifier by default. However, you can add a classifier usingjkube.helm.tarFileClassifier
configuration field. For example, In previous releases a helm chart namedfoo
with version0.0.1
hadfoo-0.0.1-helm.tar.gz
as archive name. From this release onwards, the name for equivalent archive file would befoo-0.0.1.tar.gz
k8s:helm
/k8sHelm
has been changed. In previous releases, it was (target
/build
). From this release onwards, Helm Chart archive would be generated in the same directory where Helm Chart is generated, defaulting to the following values:target/jkube/helm/${chartName}/kubernetes
build/jkube/helm/${chartName}/kubernetes
target/jkube/helm/${chartName}/openshift
build/jkube/helm/${chartName}/openshift
Signed-off-by: Rohan Kumar rohaan@redhat.com
Type of change
test, version modification, documentation, etc.)
Checklist