Open rechandler12 opened 2 years ago
I think jkube-image enricher should do the job. But it just doesn't work. It also should set imagePullPolicy to Always as it it version latest.
Duplicate of https://github.com/eclipse/jkube/issues/1138
I think jkube-image enricher should do the job. But it just doesn't work. It also should set imagePullPolicy to Always as it it version latest.
Duplicate of #1138
agree but only this part, lack of registry is new issue
Regarding the registry, I'm unsure if the global registry configuration is supposed to alter the resulting image name.
In your case, I assume that what's happening is: Performing a k8s:push should push the image to the configured registry. Resource YAML files don't contain registry information (i.e. your cluster should be configured to pull the images from the private registry).
In your case, the easiest workaround should be to configure the complete image name including the registry (as this is supposed to be part of the image name, since you want to force the pull from that registry)
<properties>
<jkube.generator.name>nexus.xxx.pl/%g/%a:%l</jkube.generator.name>
</properties>
As I said, I'm unsure if we want to change this behavior, since users might be performing pushes to different registries just by switching a command line argument. (e.g. you might want to push the same image to quay.io and docker.io).
Okey, thanks. This workaround should be enough. If you don't want to change this behavior, maybe consider new config param: registry, or addGlobalRegistry. Something like this.
Description
When I run
k8s:resource
image in container spec does not contain registry. And Kubernetes cannot download image from docker.Plugin config:
I run command:
Logs in console:
And my final file contain:
It should be:
I think jkube-image enricher should do the job. But it just doesn't work. It also should set imagePullPolicy to Always as it it version latest.
Enricher has already code for those tasks: https://github.com/eclipse/jkube/blob/master/jkube-kit/enricher/generic/src/main/java/org/eclipse/jkube/enricher/generic/ImageEnricher.java methods: mergeImage mergeImagePullPolicy
Info
mvn -v
) :