Usage of private registry not possible with helm install
Describe the bug With out k8s-clusters, which does not have access to the internet, we need to use our private docker registry. We use JFrog Artifatory where you can add remote-repository to pull the images from public registries and store them in the local private registry. If you install the operator with helm, you cant use this repository, because there images from different "folders" needed.
Example:
assume our internal registry is registry.internal-domain.com/iaas-docker with configured remote-repos for the dockerhub and quay.io.
So you can pull all needed images manually:
docker login registry.internal-domain.com
docker pull registry.internal-domain.com/iaas-docker/netapp/trident-operator:21.04.1
docker pull registry.internal-domain.com/iaas-docker/netapp/trident:21.04.1
docker pull registry.internal-domain.com/iaas-docker/k8scsi/csi-node-driver-registrar:v2.1.0
docker pull registry.internal-domain.com/iaas-docker/netapp/trident-autosupport:21.01
docker pull registry.internal-domain.com/iaas-docker/k8scsi/csi-provisioner:v2.1.1
[...]
If i deploy the operator with helm, i can set the imageRegistry in the values.yaml:
# imageRegistry identifies the registry for the trident-operator, trident, and other images. Leave empty to accept the default.
imageRegistry: ""
Now following problems occur: If you set the imagerepository to
imageRegistry: registry.internal-domain.com/iaas-docker
the operator-image cant be deployed, because path /netapp is missing. (see _helpers.tpl, section "Trident operator image". There the path netapp is only added, if the default registry is used. Deployment want to pull image registry.internal-domain.com/iaas-docker/trident-operator:21.04.1, which is wrong.
if you set the imagerepository to
imageRegistry: registry.internal-domain.com/iaas-docker/netapp
the operator-image will be registry.internal-domain.com/iaas-docker/netapp/trident-operator:21.04.1, which will work for the operator. The TridentOrchestrator-Resource deployed with this helm-chart uses the same entry, wich will result in these images for the other components:
registry.internal-domain.com/iaas-docker/netapp/csi-provisioner:v2.1.1
so the k8scsi part is missing.
Environment
- Other: Deployment with helm-chart 21.07.0
To Reproduce install the helm-chart with attached examples.
values-example.yaml: operator can't be deployed values-example2.yaml: operator is deployed, but the csi-images can't be deployed.
Expected behavior I suggest 2 possible solutions:
- add the needed folders to the registry-url, which is set by the user: in this case, user will only specify the registry like that: registry.internal-domain.com/iaas-docker/ and the subpath-entries /netapp or /k8scsi will automatically added to this url.
or
- let the user specify a second registry for the registry which is used in the TridentOrchestrator. introduce a new entry in values.yaml like orchestratorImageRegistry and use this, if user sets this in his values.
i'll prepare an Pull-Request with an working example.
@rowa78 the imageRegistry parameter would apply for the CSI sidecar images. For the Trident images, you will need to use the tridentAutosupportImage, tridentImage, operatorImage parameters. You have two options here:
imageRegistryfor CSI sidecar images, andtridentAutosupportImage,tridentImage,operatorImagefor Trident images.- Alternatively, you can choose to omit
/netappand/k8scsifrom your container image paths when tagging and pushing them to your private image registry. Something like this:
registry.internal-domain.com/iaas-docker/trident-operator:21.04.1
registry.internal-domain.com/iaas-docker/trident:21.04.1
registry.internal-domain.com/iaas-docker/csi-node-driver-registrar:v2.1.0
registry.internal-domain.com/iaas-docker/trident-autosupport:21.01
registry.internal-domain.com/iaas-docker/csi-provisioner:v2.1.1
If the images are tagged like this and pushed to a private repository, providing the imageRegistry flag alone would work
Closing this issue as resolved based on @balaramesh's response. Please leave a comment if you think this issue needs to be reopened.