You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While uploading a helm chart to GitHub Container Registry, I keep getting 404 /Not found error like this:
[ERROR] k8s: Error performing helm push: java.lang.IllegalStateException: Failure in initiating upload request: Not Found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.065 s
[INFO] Finished at: 2023-10-11T10:45:21+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.14.0:helm-push (default-cli) on project jkube-helm-chart-upload-ghcr-demo: Failure in initiating upload request: Not Found
It doesn't seem to be required for registries like ghcr.io but if we don't specify port for local docker registries like localhost:5000, I get this error:
[INFO] --- k8s:1.15-SNAPSHOT:helm-push (default-cli) @ jkube-helm-push-testing ---
[INFO] k8s: Creating Helm Chart "jkube-helm-push-testing" for Kubernetes
[INFO] k8s: Uploading Helm Chart "jkube-helm-push-testing" to local
[ERROR] k8s: Error performing helm push: java.lang.IllegalStateException: java.util.concurrent.ExecutionException: java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:80
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.147 s
[INFO] Finished at: 2023-10-11T11:59:52+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jkube:kubernetes-maven-plugin:1.15-SNAPSHOT:helm-push (default-cli) on project jkube-helm-push-testing: java.util.concurrent.ExecutionException: java.net.ConnectException: Failed to connect to localhost/[0:0:0:0:0:0:0:1]:80: Connection refused -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Describe the bug
Related to #2377
While uploading a helm chart to GitHub Container Registry, I keep getting 404 /Not found error like this:
Upon closer inspection, I think it's due to passing an invalid Host header while doing OCI upload request. For a Url like
ghcr.io
, host is computed asghcr.io:-1
:https://github.com/eclipse/jkube/blob/cc6d239259aab437655a8bfdb76f0328f1170a95/jkube-kit/resource/helm/src/main/java/org/eclipse/jkube/kit/resource/helm/oci/OCIRegistryClient.java#L128
We should only add port value if registry URL contains a valid port.
Eclipse JKube version
SNAPSHOT
Component
Kubernetes Maven Plugin
Apache Maven version
None
Gradle version
None
Steps to reproduce
Set up GitHub Container Registry and try pushing with this configuration:
Expected behavior
Plugin should push to GitHub Container Registry without any problems
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: