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

Support pushing of Helm charts to OCI registries #1364

Closed
guiliguili opened this issue Mar 18, 2022 · 1 comment · Fixed by #2147
Closed

Support pushing of Helm charts to OCI registries #1364

guiliguili opened this issue Mar 18, 2022 · 1 comment · Fixed by #2147
Assignees
Labels
component/helm ⎈ enhancement New feature or request
Milestone

Comments

@guiliguili
Copy link
Contributor

Description

With the release of Helm 3.8.0, Helm is able to store and work with charts in container registries, as an alternative to Helm repositories (c.f. Storing Helm Charts in OCI Registries).

This is a feature request to add support for oci in the helm-push goal.

Info

  • Eclipse JKube version : 1.7.0
  • Maven version (mvn -v) :
Maven home: /usr/local/Cellar/maven/3.8.3/libexec
Java version: 17, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/17/libexec/openjdk.jdk/Contents/Home
Default locale: en_FR, platform encoding: US-ASCII
OS name: "mac os x", version: "12.2.1", arch: "x86_64", family: "mac"

This would provide a vendor independant alternative to the existing HTTP based repositories currently supported.

@guiliguili
Copy link
Contributor Author

guiliguili commented Mar 18, 2022

FYI I tried the following configuration :

<plugin>
  <groupId>org.eclipse.jkube</groupId>
  <artifactId>kubernetes-maven-plugin</artifactId>
  <configuration>
      <helm>
          <stableRepository>
              <name>local-stable-repo-id</name>
              <url>oci://localhost:5100/helm-charts</url>
              <type>ARTIFACTORY</type>
          </stableRepository>
          <snapshotRepository>
              <name>local-snapshot-repo-id</name>
              <url>oci://localhost:5100/helm-charts</url>
              <type>ARTIFACTORY</type>
          </snapshotRepository>
      </helm>
  </configuration>
  </plugin>
</plugin>

And I not surprisingly got the following error :

[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.7.0:helm-push (jkube-install) on project commerce-kie-maven: unknown protocol: oci -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.7.0:helm-push (jkube-install) on project commerce-kie-maven: unknown protocol: oci
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: unknown protocol: oci
    at org.eclipse.jkube.maven.plugin.mojo.build.HelmPushMojo.executeInternal (HelmPushMojo.java:46)
    at org.eclipse.jkube.maven.plugin.mojo.build.AbstractJKubeMojo.execute (AbstractJKubeMojo.java:111)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.net.MalformedURLException: unknown protocol: oci
    at java.net.URL.<init> (URL.java:652)
    at java.net.URL.<init> (URL.java:541)
    at java.net.URL.<init> (URL.java:488)
    at org.eclipse.jkube.kit.resource.helm.HelmRepositoryConnectionUtils.createConnection (HelmRepositoryConnectionUtils.java:54)
    at org.eclipse.jkube.kit.resource.helm.HelmRepositoryConnectionUtils.getConnectionForUploadToArtifactory (HelmRepositoryConnectionUtils.java:38)
    at org.eclipse.jkube.kit.resource.helm.HelmRepository$HelmRepoType.createConnection (HelmRepository.java:64)
    at org.eclipse.jkube.kit.resource.helm.HelmUploader.uploadSingle (HelmUploader.java:43)
    at org.eclipse.jkube.kit.resource.helm.HelmService.uploadHelmChart (HelmService.java:159)
    at org.eclipse.jkube.kit.resource.helm.HelmService.uploadHelmChart (HelmService.java:138)
    at org.eclipse.jkube.maven.plugin.mojo.build.HelmPushMojo.executeInternal (HelmPushMojo.java:43)
    at org.eclipse.jkube.maven.plugin.mojo.build.AbstractJKubeMojo.execute (AbstractJKubeMojo.java:111)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

@manusa manusa added the enhancement New feature or request label Mar 19, 2022
@manusa manusa added this to the 1.x milestone Mar 19, 2022
@manusa manusa modified the milestones: 1.x, 1.13.0 May 3, 2023
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue May 9, 2023
…uments in HttpRequest

Related to eclipse-jkube/jkube#1364

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue May 9, 2023
…uments in HttpRequest

Related to eclipse-jkube/jkube#1364

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue May 9, 2023
…uments in HttpRequest

Related to eclipse-jkube/jkube#1364

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue May 10, 2023
…uments in HttpRequest

Related to eclipse-jkube/jkube#1364

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit to fabric8io/kubernetes-client that referenced this issue May 10, 2023
…uments in HttpRequest

Related to eclipse-jkube/jkube#1364

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@manusa manusa modified the milestones: 1.13.0, 1.14.0 Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/helm ⎈ enhancement New feature or request
Projects
None yet
3 participants