Change Container Registry
Modifying container registry settings may be necessary. This section provides clear guidelines for transitioning to a different registry.
Removing registry settings may disrupt your CI/CD process. New components created after changing the registry, including Components and Environments, will seamlessly function. However, existing 'Components' require additional steps, as outlined below.
Reset Container Registry​
To reset container registry integration from the KubeRocketCI, follow the steps below:
-
In the KubeRocketCI main menu, navigate to Configuration -> Artifacts storage -> Registry.
-
Click the Reset registry button, type the
confirmword and then click Confirm:
Update Registry for the Existing Components and Environments​
KubeRocketCI uses CodebaseImageStream custom resource to define Container Registry settings for the codebases. To update the registry for the existing codebases, follow the steps below:
-
List all the existing
CodebaseImageStreamCR(s) and copy their<name>and<codebase name>fields:kubectl get codebaseimagestream -n krci -
Patch the
CodebaseImageStreamCR(s) using the commands for the registry you switched to:-
AWS ECR:
kubectl patch codebaseimagestream <name> -n krci --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "<Registry Endpoint>/<Registry Space>/<codebase name>"}]' -
DockerHub
kubectl patch codebaseimagestream <name> -n krci --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "dockerhub.io/<User>/<codebase name>"}]' -
Harbor
kubectl patch codebaseimagestream <name> -n krci --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "<Registry Endpoint>/<Registry Space>/<codebase name>}]' -
Nexus
kubectl patch codebaseimagestream <name> -n krci --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "<Registry Endpoint>/<Registry Space>/<codebase name>}]'
-
If necessary, update the registry credentials for the existing CD pipelines by copying the regcred secret from the krci namespace to all the namespaces managed by the platform. To get the list of the namespaces, run the following command:
kubectl get stages -n krci -o jsonpath='{range .items[*]}{.spec.namespace}{"\n"}{end}'