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

feat (jkube-kit/resource) : Add toggle to preserve HelmParameter case #2369

Merged
merged 3 commits into from Sep 22, 2023

Conversation

bryopsida
Copy link
Contributor

@bryopsida bryopsida commented Sep 2, 2023

Description

Adds preserveParameterCase to HelmConfig to allow opting in to preserve HelmParameter case in Values.yaml.
Adds apiVersion to HelmConfig to allow specifying chart schema version.

Fixes #2356

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • I have read the contributing guidelines
  • I signed-off my commit with a user that has signed the Eclipse Contributor Agreement
  • My code follows the style guidelines of this project
  • I Keep It Small and Simple: The smaller the PR is, the easier it is to review and have it merged
  • I use conventional commits in my commit messages
  • I have performed a self-review of my code
  • I Added CHANGELOG entry
  • I have updated the documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@manusa
Copy link
Member

manusa commented Sep 2, 2023

Eclipse JKube CI Report

Started new GH workflow run for #2369 (2023-09-22T09:45:35Z)

⚙️ JKube E2E Tests (6272503804)

Test results

✔️ Test reports (Minikube v1.25.13-dockerfile)
[✓] DockerFileITCase - k8sBuild - k8s:build, should create image inferring contextDir from provided dockerFile configuration
[✓] ContextDirITCase - k8sBuild - k8s:build, should create image with docker file and files read from provided contextDir configuration
[✓] ContextDirAndDockerFileITCase - k8sBuild - k8s:build, should create image for configured special dockerFile with files added from provided contextDir
[✓] ContextDirAndCustomAssemblyITCase - k8sBuild - k8s:build, should create image with docker file and files read from provided contextDir configuration (within Dockerfile, files are read from configured Assembly properties)
[✓] SimpleK8sITCase - k8sBuild - k8s:build, should create image
[✓] SimpleK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] SimpleK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] SimpleK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (1) passed successfully!!!

✔️ Test reports (Minikube v1.25.13-other)
[✓] KarafK8sITCase - k8sBuild - k8s:build, should create image
[✓] VertxK8sITCase - k8sBuild - k8s:build, should create image
[✓] ThorntailK8sITCase - k8sBuild - k8s:build, should create image
[✓] OpenLibertyK8sITCase - k8sBuild - k8s:build, should create image
[✓] WildflyJarK8sITCase - k8sBuild - k8s:build, should create image
[✓] VertxK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] KarafK8sITCase - k8sResource - k8s:resource, should create manifest for Kubernetes
[✓] ThorntailK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] OpenLibertyK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] WildflyJarK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] VertxK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] VertxK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] KarafK8sITCase - K8sApply - k8s:apply, should apply manifests on k8s cluster
[✓] VertxK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] KarafK8sITCase - k8sLog - k8s:log
[✓] DslK8sGradleITCase - k8sBuild - k8sBuild, should create image
[✓] DslK8sGradleITCase - k8sResource - k8sResource, should create manifests
[✓] DslK8sGradleITCase - k8sHelm - k8sHelm, should create Helm charts
[✓] KarafK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ThorntailK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ThorntailK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] OpenLibertyK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] OpenLibertyK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] OpenLibertyK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] WildflyJarK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] DslK8sGradleITCase - k8sApply - k8sApply, should deploy pod and service
[✓] DslK8sGradleITCase - k8sLog - k8sLog, should retrieve log
[✓] DslK8sGradleITCase - k8sUndeploy - k8sUndeploy, should delete all applied resources
[✓] WildflyJarK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (5) passed successfully!!!

✔️ Test reports (Minikube v1.25.13-quarkus)
[✓] QuarkusK8sITCase - k8sBuild - k8s:build, should create image
[✓] QuarkusK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] QuarkusK8sITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] QuarkusK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] QuarkusK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (5) passed successfully!!!

✔️ Test reports (Minikube v1.25.13-quarkus-native)
[✓] QuarkusNativeK8sITCase - k8sBuild - k8s:build, should create image
[✓] QuarkusNativeK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] QuarkusNativeK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] QuarkusNativeK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (4) passed successfully!!!

✔️ Test reports (Minikube v1.25.13-springboot)
[✓] HelmConfigITCase - k8sResource - k8s:resource, no specified profile, should create default resource manifests
[✓] ZeroConfigFatJarK8sITCase - k8sBuild - k8s:build, should create fat jar image
[✓] ZeroConfigK8sITCase - k8sBuild - k8s:build, should create layered jar image
[✓] CustomResourceK8sITCase - k8sBuild - k8s:build, should create image
[✓] CompleteK8sITCase - k8sBuild - k8s:build, should create image
[✓] CompleteDockerITCase - k8sBuild - k8s:build, should create image and assembly files
[✓] HelmConfigITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] ZeroConfigFatJarK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] HelmConfigITCase - k8sHelmPush - k8s:helm-push, should push the charts
[✓] CompleteK8sJibITCase - k8sBuild - k8s:build, should create JIB image
[✓] CompleteK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] ZeroConfigFatJarK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - k8sPush - k8s:push, should push image to remote registry
[✓] CustomResourceK8sITCase - k8sPush - k8s:push, should push image to remote registry
[✓] CompleteK8sJibITCase - k8sResource - k8s:resource, should create manifests
[✓] CompleteDockerITCase - k8sResource - k8s:resource, should create manifests in specific directory
[✓] ZeroConfigFatJarK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] CompleteK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] CustomResourceK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] CompleteK8sJibITCase - k8sPush - k8s:push, should push image to remote registry
[✓] ZeroConfigFatJarK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] CompleteK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] CompleteDockerITCase - k8sApply - k8s:apply, should deploy pod and service form manifests in specific directory
[✓] CompleteDockerITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] CustomResourceK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sGradleITCase - k8sBuild - k8sBuild, should create image
[✓] CustomResourceK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] ZeroConfigK8sGradleITCase - k8sResource - k8sResource, should create manifests
[✓] CompleteK8sJibITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sGradleITCase - k8sHelm - k8sHelm, should create Helm charts
[✓] CustomResourceK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] CompleteK8sJibITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] ZeroConfigK8sGradleITCase - k8sPush - k8sPush, should push image to remote registry
[✓] ZeroConfigK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sGradleITCase - k8sApply - k8sApply, should deploy pod and service
[✓] ZeroConfigK8sGradleITCase - k8sLog - k8sLog, should retrieve log
[✓] ZeroConfigK8sGradleITCase - k8sUndeploy - k8sUndeploy, should delete all applied resources
[✓] All tests (6) passed successfully!!!

✔️ Test reports (Minikube v1.25.13-webapp)
[✓] JettyK8sITCase - k8sBuild - k8s:build, should create image
[✓] TomcatJakartaeeK8sITCase - k8sBuild - k8s:build should display the Tomcat webapps dir hint by default
[✓] ZeroConfigK8sITCase - k8sBuild - k8s:build, should create image
[✓] TomcatJavaeeK8sITCase - k8sBuild - k8s:build should display the Tomcat webapps dir hint by default
[✓] WildFlyK8sITCase - k8sBuild - k8s:build, should create image
[✓] JettyK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] ZeroConfigK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] TomcatJavaeeK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] TomcatJakartaeeK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] WildFlyK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] JettyK8sWatchITCase - k8sWatchCopy - k8s:watch, with mode=copy, SHOULD hot deploy the application
[✓] JettyK8sWatchITCase - k8sWatchNone - k8s:watch, with mode=none, SHOULD NOT hot deploy the application
[✓] JettyK8sWatchITCase - k8sWatchBuildAndRun - k8s:watch, with mode=both, SHOULD hot deploy the application
[✓] JettyK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] JettyK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] ZeroConfigK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] JettyK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] TomcatJavaeeK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - testNodePortResponse - Service as NodePort response should return String
[✓] TomcatJakartaeeK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] WildFlyK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] TomcatJavaeeK8sITCase - k8sLog - k8s:log, should retrieve log with migration notice
[✓] WildFlyK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] TomcatJavaeeK8sITCase - testJavaeeNodePortResponse - The JavaEE servlet, exposed as a NodePort Service, should return a string and contain `Hello World`
[✓] WildFlyK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] TomcatJakartaeeK8sITCase - k8sLog - k8s:log, should retrieve log with migration notice
[✓] TomcatJavaeeK8sITCase - k8sUndeployJavaEE - k8s:undeploy, should delete all applied resources
[✓] TomcatJakartaeeK8sITCase - testJakartaeeNodePortResponse - The JakartaEE servlet, exposed as a NodePort Service, should return a string and contain `Hello World`
[✓] TomcatJakartaeeK8sITCase - k8sUndeployJakartaEE - k8s:undeploy, should delete all applied resources
[✓] TomcatJavaeeK8sITCase - k8sBuildWithWebappEnv - k8s:build, with jkube.generator.webapp.env should not display the Tomcat webapps dir hint
[✓] TomcatJakartaeeK8sITCase - k8sBuildWithWebappEnv - k8s:build, with jkube.generator.webapp.env should not display the Tomcat webapps dir hint
[✓] TomcatJavaeeK8sITCase - k8sApplyWithNewDeployment - k8s:apply, should deploy pod and service with new image
[✓] TomcatJakartaeeK8sITCase - k8sApplyWithNewDeployment - k8s:apply, should deploy pod and service with new image
[✓] TomcatJavaeeK8sITCase - k8sLogWithoutJavaeeMigrationNotice - k8s:log, should retrieve log without JavaEE migration notice
[✓] TomcatJavaeeK8sITCase - testJavaEENodePortResponseError - JavaEE Service as NodePort response should return 500 and java.lang.NoClassDefFoundError message
[✓] TomcatJavaeeK8sITCase - finalK8sUndeploy - Final k8s:undeploy, should delete all applied resources
[✓] TomcatJakartaeeK8sITCase - testJakartaEENodePortResponse - JakartaEE Service as NodePort response should return String
[✓] TomcatJakartaeeK8sITCase - k8sLogWithoutJavaeeMigrationNotice - k8s:log, should retrieve log without JavaEE migration notice
[✓] TomcatJakartaeeK8sITCase - finalK8sUndeploy - Final k8s:undeploy, should delete all applied resources
[✓] All tests (11) passed successfully!!!

✔️ Test reports (Minikube v1.28.1-dockerfile)
[✓] DockerFileITCase - k8sBuild - k8s:build, should create image inferring contextDir from provided dockerFile configuration
[✓] ContextDirAndCustomAssemblyITCase - k8sBuild - k8s:build, should create image with docker file and files read from provided contextDir configuration (within Dockerfile, files are read from configured Assembly properties)
[✓] ContextDirAndDockerFileITCase - k8sBuild - k8s:build, should create image for configured special dockerFile with files added from provided contextDir
[✓] ContextDirITCase - k8sBuild - k8s:build, should create image with docker file and files read from provided contextDir configuration
[✓] SimpleK8sITCase - k8sBuild - k8s:build, should create image
[✓] SimpleK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] SimpleK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] SimpleK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (1) passed successfully!!!

✔️ Test reports (Minikube v1.28.1-other)
[✓] KarafK8sITCase - k8sBuild - k8s:build, should create image
[✓] VertxK8sITCase - k8sBuild - k8s:build, should create image
[✓] ThorntailK8sITCase - k8sBuild - k8s:build, should create image
[✓] OpenLibertyK8sITCase - k8sBuild - k8s:build, should create image
[✓] WildflyJarK8sITCase - k8sBuild - k8s:build, should create image
[✓] KarafK8sITCase - k8sResource - k8s:resource, should create manifest for Kubernetes
[✓] VertxK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] ThorntailK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] OpenLibertyK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] WildflyJarK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] KarafK8sITCase - K8sApply - k8s:apply, should apply manifests on k8s cluster
[✓] KarafK8sITCase - k8sLog - k8s:log
[✓] VertxK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] DslK8sGradleITCase - k8sBuild - k8sBuild, should create image
[✓] DslK8sGradleITCase - k8sResource - k8sResource, should create manifests
[✓] DslK8sGradleITCase - k8sHelm - k8sHelm, should create Helm charts
[✓] KarafK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] VertxK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] VertxK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ThorntailK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ThorntailK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] OpenLibertyK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] OpenLibertyK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] OpenLibertyK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] WildflyJarK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] WildflyJarK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] DslK8sGradleITCase - k8sApply - k8sApply, should deploy pod and service
[✓] DslK8sGradleITCase - k8sLog - k8sLog, should retrieve log
[✓] DslK8sGradleITCase - k8sUndeploy - k8sUndeploy, should delete all applied resources
[✓] All tests (5) passed successfully!!!

✔️ Test reports (Minikube v1.28.1-quarkus)
[✓] QuarkusK8sITCase - k8sBuild - k8s:build, should create image
[✓] QuarkusK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] QuarkusK8sITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] QuarkusK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] QuarkusK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (5) passed successfully!!!

✔️ Test reports (Minikube v1.28.1-quarkus-native)
[✓] QuarkusNativeK8sITCase - k8sBuild - k8s:build, should create image
[✓] QuarkusNativeK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] QuarkusNativeK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] QuarkusNativeK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] All tests (4) passed successfully!!!

✔️ Test reports (Minikube v1.28.1-springboot)
[✓] HelmConfigITCase - k8sResource - k8s:resource, no specified profile, should create default resource manifests
[✓] ZeroConfigFatJarK8sITCase - k8sBuild - k8s:build, should create fat jar image
[✓] CompleteDockerITCase - k8sBuild - k8s:build, should create image and assembly files
[✓] ZeroConfigK8sITCase - k8sBuild - k8s:build, should create layered jar image
[✓] CompleteK8sITCase - k8sBuild - k8s:build, should create image
[✓] CustomResourceK8sITCase - k8sBuild - k8s:build, should create image
[✓] HelmConfigITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] ZeroConfigFatJarK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] CompleteDockerITCase - k8sResource - k8s:resource, should create manifests in specific directory
[✓] CompleteK8sJibITCase - k8sBuild - k8s:build, should create JIB image
[✓] HelmConfigITCase - k8sHelmPush - k8s:helm-push, should push the charts
[✓] ZeroConfigFatJarK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - k8sPush - k8s:push, should push image to remote registry
[✓] CustomResourceK8sITCase - k8sPush - k8s:push, should push image to remote registry
[✓] CompleteK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] CompleteK8sJibITCase - k8sResource - k8s:resource, should create manifests
[✓] ZeroConfigFatJarK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] ZeroConfigK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] CompleteDockerITCase - k8sApply - k8s:apply, should deploy pod and service form manifests in specific directory
[✓] CustomResourceK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] CompleteK8sJibITCase - k8sPush - k8s:push, should push image to remote registry
[✓] ZeroConfigK8sITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] ZeroConfigFatJarK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] CompleteDockerITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sGradleITCase - k8sBuild - k8sBuild, should create image
[✓] ZeroConfigK8sGradleITCase - k8sResource - k8sResource, should create manifests
[✓] ZeroConfigK8sGradleITCase - k8sHelm - k8sHelm, should create Helm charts
[✓] ZeroConfigK8sGradleITCase - k8sPush - k8sPush, should push image to remote registry
[✓] CompleteK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] CompleteK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] CustomResourceK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] CustomResourceK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] CustomResourceK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] CompleteK8sJibITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] CompleteK8sJibITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] ZeroConfigK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sGradleITCase - k8sApply - k8sApply, should deploy pod and service
[✓] ZeroConfigK8sGradleITCase - k8sLog - k8sLog, should retrieve log
[✓] ZeroConfigK8sGradleITCase - k8sUndeploy - k8sUndeploy, should delete all applied resources
[✓] All tests (6) passed successfully!!!

✔️ Test reports (Minikube v1.28.1-webapp)
[✓] JettyK8sITCase - k8sBuild - k8s:build, should create image
[✓] ZeroConfigK8sITCase - k8sBuild - k8s:build, should create image
[✓] TomcatJakartaeeK8sITCase - k8sBuild - k8s:build should display the Tomcat webapps dir hint by default
[✓] TomcatJavaeeK8sITCase - k8sBuild - k8s:build should display the Tomcat webapps dir hint by default
[✓] WildFlyK8sITCase - k8sBuild - k8s:build, should create image
[✓] JettyK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] ZeroConfigK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] TomcatJakartaeeK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] TomcatJavaeeK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] WildFlyK8sITCase - k8sResource - k8s:resource, should create manifests
[✓] JettyK8sWatchITCase - k8sWatchCopy - k8s:watch, with mode=copy, SHOULD hot deploy the application
[✓] JettyK8sWatchITCase - k8sWatchNone - k8s:watch, with mode=none, SHOULD NOT hot deploy the application
[✓] JettyK8sWatchITCase - k8sWatchBuildAndRun - k8s:watch, with mode=both, SHOULD hot deploy the application
[✓] JettyK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] JettyK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] ZeroConfigK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] JettyK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] ZeroConfigK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] TomcatJakartaeeK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] ZeroConfigK8sITCase - testNodePortResponse - Service as NodePort response should return String
[✓] TomcatJakartaeeK8sITCase - k8sLog - k8s:log, should retrieve log with migration notice
[✓] TomcatJakartaeeK8sITCase - testJakartaeeNodePortResponse - The JakartaEE servlet, exposed as a NodePort Service, should return a string and contain `Hello World`
[✓] ZeroConfigK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] TomcatJakartaeeK8sITCase - k8sUndeployJakartaEE - k8s:undeploy, should delete all applied resources
[✓] TomcatJavaeeK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] TomcatJakartaeeK8sITCase - k8sBuildWithWebappEnv - k8s:build, with jkube.generator.webapp.env should not display the Tomcat webapps dir hint
[✓] TomcatJavaeeK8sITCase - k8sLog - k8s:log, should retrieve log with migration notice
[✓] TomcatJavaeeK8sITCase - testJavaeeNodePortResponse - The JavaEE servlet, exposed as a NodePort Service, should return a string and contain `Hello World`
[✓] TomcatJavaeeK8sITCase - k8sUndeployJavaEE - k8s:undeploy, should delete all applied resources
[✓] TomcatJavaeeK8sITCase - k8sBuildWithWebappEnv - k8s:build, with jkube.generator.webapp.env should not display the Tomcat webapps dir hint
[✓] WildFlyK8sITCase - k8sApply - k8s:apply, should deploy pod and service
[✓] WildFlyK8sITCase - k8sLog - k8s:log, should retrieve log
[✓] TomcatJakartaeeK8sITCase - k8sApplyWithNewDeployment - k8s:apply, should deploy pod and service with new image
[✓] WildFlyK8sITCase - k8sUndeploy - k8s:undeploy, should delete all applied resources
[✓] TomcatJavaeeK8sITCase - k8sApplyWithNewDeployment - k8s:apply, should deploy pod and service with new image
[✓] TomcatJavaeeK8sITCase - k8sLogWithoutJavaeeMigrationNotice - k8s:log, should retrieve log without JavaEE migration notice
[✓] TomcatJavaeeK8sITCase - testJavaEENodePortResponseError - JavaEE Service as NodePort response should return 500 and java.lang.NoClassDefFoundError message
[✓] TomcatJakartaeeK8sITCase - testJakartaEENodePortResponse - JakartaEE Service as NodePort response should return String
[✓] TomcatJavaeeK8sITCase - finalK8sUndeploy - Final k8s:undeploy, should delete all applied resources
[✓] TomcatJakartaeeK8sITCase - k8sLogWithoutJavaeeMigrationNotice - k8s:log, should retrieve log without JavaEE migration notice
[✓] TomcatJakartaeeK8sITCase - finalK8sUndeploy - Final k8s:undeploy, should delete all applied resources
[✓] All tests (11) passed successfully!!!

✔️ Test reports (OpenShift v3.11.0-other)
[✓] WildflyJarOcITCase - ocBuild - oc:build, should create image
[✓] WildflyJarOcITCase - ocResource - oc:resource, should create manifests
[✓] ThorntailOcITCase - ocBuild - oc:build, should create image
[✓] ThorntailOcITCase - ocResource - oc:resource, should create manifests
[✓] KarafOcITCase - ocBuild - oc:build, should create image
[✓] KarafOcITCase - ocResource - oc:resource, should create resource manifests
[✓] OpenLibertyOcITCase - ocBuild - oc:build, should create image
[✓] OpenLibertyOcITCase - ocResource - oc:resource, should create manifests
[✓] VertxOcITCase - ocBuild - oc:build, should create image
[✓] VertxOcITCase - ocResource - oc:resource, should create manifests
[✓] DslOcGradleITCase - ocBuild - ocBuild, should create image
[✓] DslOcGradleITCase - ocResource - ocResource, should create manifests
[✓] WildflyJarOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] WildflyJarOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] ThorntailOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] ThorntailOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] KarafOcITCase - ocApply - oc:apply, should create pod, service and route
[✓] KarafOcITCase - ocLog - oc:log, should retrieve log
[✓] KarafOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] OpenLibertyOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] OpenLibertyOcITCase - ocLog - oc:log, should retrieve log
[✓] VertxOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] OpenLibertyOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] VertxOcITCase - k8sLog - oc:log, should retrieve log
[✓] VertxOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] DslOcGradleITCase - ocApply - ocApply, should deploy pod and service
[✓] DslOcGradleITCase - ocHelm - ocHelm, should create Helm charts
[✓] DslOcGradleITCase - ocLog - ocLog, should retrieve log
[✓] DslOcGradleITCase - ocUndeploy - ocUndeploy, should delete all applied resources
[✓] All tests (6) passed successfully!!!

✔️ Test reports (OpenShift v3.11.0-quarkus)
[✓] QuarkusOcITCase - ocBuild - oc:build, should create image
[✓] QuarkusOcITCase - ocResource - oc:resource, should create manifests
[✓] QuarkusOcITCase - ocHelm - oc:helm, should create Helm charts
[✓] QuarkusOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] QuarkusOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] All tests (5) passed successfully!!!

✔️ Test reports (OpenShift v3.11.0-springboot)
[✓] HelmConfigITCase - ocResource - oc:resource, no specified profile, should create default resource manifests
[✓] HelmConfigITCase - ocHelm - oc:helm, should create Helm charts
[✓] HelmConfigITCase - ocHelmPush - oc:helm-push, should push the charts
[✓] WatchOcITCase - watch_whenSourceModified_shouldLiveReloadChanges - watch, SHOULD hot reload application on changes
[✓] ZeroConfigOcGradleITCase - ocBuild - ocBuild, should create image
[✓] ZeroConfigOcGradleITCase - ocResource - ocResource, should create manifests
[✓] ZeroConfigOcITCase - ocBuild - oc:build, should create image
[✓] ZeroConfigOcGradleITCase - ocApply - ocApply, should deploy pod and service
[✓] ZeroConfigOcITCase - ocResource - oc:resource, should create manifests
[✓] ZeroConfigOcGradleITCase - ocHelm - ocHelm, should create Helm charts
[✓] ZeroConfigOcGradleITCase - ocLog - ocLog, should retrieve log
[✓] ZeroConfigOcGradleITCase - ocUndeploy - ocUndeploy, should delete all applied resources
[✓] ZeroConfigOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] ZeroConfigOcITCase - ocHelm - oc:helm, should create Helm charts
[✓] ZeroConfigOcITCase - ocLog - oc:log, should retrieve log
[✓] ZeroConfigOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] All tests (3) passed successfully!!!

✔️ Test reports (OpenShift v3.11.0-webapp)
[✓] WildFlyOcITCase - ocBuild - oc:build, should create image
[✓] WildFlyOcITCase - ocResource - oc:resource, should create manifests
[✓] ZeroConfigOcITCase - ocBuild - oc:build, should create image
[✓] ZeroConfigOcITCase - ocResource - oc:resource, should create manifests
[✓] JettyOcITCase - ocBuild - oc:build, should create image
[✓] JettyOcITCase - ocResource - oc:resource, should create manifests
[✓] WildFlyOcDockerModeITCase - ocBuild - oc:build, should create image using docker
[✓] WildFlyOcDockerModeITCase - ocResource - k8s:resource, should create manifests
[✓] WildFlyOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] WildFlyOcITCase - ocLog - oc:log, should retrieve logs
[✓] ZeroConfigOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] ZeroConfigOcITCase - testNodePortResponse - Service as NodePort response should return String
[✓] WildFlyOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] ZeroConfigOcITCase - ocLog - oc:log, should retrieve log
[✓] JettyOcITCase - ocApply - oc:apply, should deploy pod and service
[✓] ZeroConfigOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] JettyOcITCase - ocLog - oc:log, should retrieve log
[✓] JettyOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] WildFlyOcDockerModeITCase - ocApply - oc:apply, should deploy pod and service
[✓] WildFlyOcDockerModeITCase - ocLog - oc:log, should retrieve logs
[✓] WildFlyOcDockerModeITCase - ocUndeploy - oc:undeploy, should delete all applied resources
[✓] All tests (5) passed successfully!!!

✔️ Test reports (Windows)
[✓] WindowsITCase - k8sBuild - k8s:build, should create image
[✓] WindowsITCase - k8sPush - k8s:push, should push image to remote registry
[✓] WindowsITCase - k8sResource - k8s:resource, should create manifests
[✓] WindowsITCase - ocResource - oc:resource, should create manifests
[✓] WindowsITCase - k8sHelm - k8s:helm, should create Helm charts
[✓] WindowsITCase - ocHelm - oc:helm, should create Helm charts
[✓] All tests (6) passed successfully!!!

@codecov
Copy link

codecov bot commented Sep 2, 2023

Codecov Report

Merging #2369 (fae04b3) into master (1ac4f7c) will increase coverage by 1.72%.
Report is 97 commits behind head on master.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #2369      +/-   ##
============================================
+ Coverage     59.36%   61.08%   +1.72%     
- Complexity     4586     4775     +189     
============================================
  Files           500      518      +18     
  Lines         21211    21387     +176     
  Branches       2830     2825       -5     
============================================
+ Hits          12591    13064     +473     
+ Misses         7370     7101     -269     
+ Partials       1250     1222      -28     
Files Changed Coverage Δ
...lipse/jkube/gradle/plugin/AbstractJKubePlugin.java 93.54% <ø> (ø)
.../org/eclipse/jkube/gradle/plugin/GradleLogger.java 86.66% <ø> (ø)
...va/org/eclipse/jkube/gradle/plugin/GroovyUtil.java 87.75% <ø> (ø)
...a/org/eclipse/jkube/gradle/plugin/JKubePlugin.java 100.00% <ø> (ø)
.../eclipse/jkube/gradle/plugin/KubernetesPlugin.java 100.00% <ø> (ø)
...se/jkube/gradle/plugin/task/AbstractJKubeTask.java 86.60% <ø> (ø)
.../jkube/gradle/plugin/task/KubernetesApplyTask.java 80.00% <ø> (ø)
.../jkube/gradle/plugin/task/KubernetesBuildTask.java 80.95% <ø> (ø)
.../jkube/gradle/plugin/task/KubernetesDebugTask.java 85.71% <ø> (ø)
...ube/gradle/plugin/task/KubernetesHelmPushTask.java 86.66% <ø> (ø)
... and 51 more

... and 63 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -167,6 +171,10 @@ Defaults to empty string.
The parameters can also represent a Golang expression
|

| preserveParameterCase
| A boolean toggling whether the parameter case is preserved when generating the Values.yaml file, off by default
Copy link
Member

Choose a reason for hiding this comment

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

nit, would be better to write default value just like other fields.

Suggested change
| A boolean toggling whether the parameter case is preserved when generating the Values.yaml file, off by default
| A boolean toggling whether the parameter case is preserved when generating the Values.yaml file
Defaults to `false`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

import java.util.Collections;
import java.util.Map;
import java.util.Properties;
import java.util.*;
Copy link
Member

Choose a reason for hiding this comment

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

Could you please revert to individual imports instead of wildcards?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

helmConfig.setApiVersion("v2");

File file = File.createTempFile("api-version-test", ".tmp");
file.deleteOnExit();
Copy link
Member

Choose a reason for hiding this comment

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

What's the significance of creating this file in the scope of this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leftover that I missed, removed it.

helmConfig.setPreserveParameterCase(true);

File file = File.createTempFile("case-preservation-test", ".tmp");
file.deleteOnExit();
Copy link
Member

Choose a reason for hiding this comment

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

Even When I comment out these file creation lines, tests seem to pass. Could this possibly be a leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure is, I've removed it.

@@ -140,6 +140,36 @@ void deserialize() throws Exception {
.toBuilder().name("ngnix").version("1.2.3").repository("https://example.com/charts").build()));
}

@Test
void canEnableCasePresevation() throws IOException {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
void canEnableCasePresevation() throws IOException {
void canEnableCasePreservation() throws IOException {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -83,7 +83,7 @@ public HelmService(JKubeConfiguration jKubeConfiguration, ResourceServiceConfig
this.logger = logger;
}

/**
/**
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/**
/**

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

return parameter.getName();
} else {
return parameter.getName().toLowerCase();
}
Copy link
Member

Choose a reason for hiding this comment

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

This just my opinion, but we should try to use original method here:

  public String getHelmName(final boolean preserveCase) {
    if (preserveCase) {
      return parameter.getName();
    }
    return getHelmName();
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched to use the original method as suggested.

@bryopsida bryopsida force-pushed the 2356-preserve-helm-param-case branch 2 times, most recently from 587168d to 73ac8fa Compare September 9, 2023 12:16
@bryopsida
Copy link
Contributor Author

Looking at the test failures it looks like a ssh connectivity failure, is there anything I need to do on my end? Tests were passing before I rebased to address a merge conflict in the changelog.

@sunix
Copy link
Member

sunix commented Sep 11, 2023

hello @manusa do you remember the reason why the HelmParameters were turned to lowercase ?
If it is generating errors, I don't think it is good to have a toggle to turn off lowercase that would generate errors to the user.

@manusa
Copy link
Member

manusa commented Sep 11, 2023

hello @manusa do you remember the reason why the HelmParameters were turned to lowercase ?

No, I haven't approved the PR yet because I want to check it out and see if I can remember why this was done in the first place.

@manusa manusa self-assigned this Sep 21, 2023
Adds preserveParameterCase to HelmConfig to allow opting in to preserve HelmParameter case in Values.yaml.

Adds apiVersion to HelmConfig to allow specifying chart schema version.

Signed-off-by: bryopsida <8363252+bryopsida@users.noreply.github.com>
@manusa manusa force-pushed the 2356-preserve-helm-param-case branch from 73ac8fa to c3824db Compare September 21, 2023 13:56
Signed-off-by: Marc Nuri <marc@marcnuri.com>
@manusa manusa force-pushed the 2356-preserve-helm-param-case branch from c3824db to 58bb4f4 Compare September 21, 2023 13:57
@manusa manusa added this to the 1.15.0 milestone Sep 22, 2023
Signed-off-by: Marc Nuri <marc@marcnuri.com>
@manusa manusa force-pushed the 2356-preserve-helm-param-case branch from 069cfde to fae04b3 Compare September 22, 2023 09:23
@sonarcloud
Copy link

sonarcloud bot commented Sep 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.18) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@manusa manusa merged commit da2c4d6 into eclipse-jkube:master Sep 22, 2023
12 checks passed
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.

Preserve Helm Parameters case
4 participants