kyma-project / cli

Simple set of commands to manage a Kyma installation
Apache License 2.0
111 stars 118 forks source link

Adjust secret lookup logic for `image-import` command #2070

Closed kwiatekus closed 1 month ago

kwiatekus commented 1 month ago

Description image-import command should be able to lookup docker registry secret from docker-registry module.

Currently it looks up secret by name serverless-registry-config-default and in the scenario when docker registry is installed it returns error

./kyma-cli image-import  kwiatekus/test:latest
failed to load in-cluster registry configuration: secrets "serverless-registry-config-default" not found

Adjust the secret lookup logic so that:

Additionally please improve the success message after importing.. Looks to me that the string templating is mixes up strings

Importing kwiatekus/redispop:latest

Successfully imported image
Use it as 'dockerregistry-config' and use the localhost:32137/kwiatekus/redispop:latest secret.

Should be:

Use it as localhost:32137/kwiatekus/redispop:latest and use the 'dockerregistry-config' as image pull secret.