Skip to content

Change Container Registryβš“οΈŽ

In dynamic projects, changes to the container registry may be necessary. This section provides instructions for switching the container registry.

Warning

Exercise caution: 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.

Remove Container Registryβš“οΈŽ

To remove container registry integration from the EDP, follow the steps below:

1. In the EDP Portal main menu, navigate to EDP -> Configuration -> Registry.

2. Click the Reset registry button, type the confirm word and then click Confirm:

Registry settings
Registry settings

Update Registry for the Existing Components and Environmentsβš“οΈŽ

The EPAM Delivery Platform uses CodebaseImageStream custom resource to define Container Registry settings for the codebases. To update the registry for the existing codebases, follow the steps below:

  1. List all the existing CodebaseImageStream CR(s) and copy their <name> and <codebase name> fields:

    kubectl get codebaseimagestream -n edp
    
  2. Patch the CodebaseImageStream CR(s) using the commands for the registry you switched to:

    kubectl patch codebaseimagestream <name> -n edp --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "<Registry Endpoint>/<Registry Space>/<codebase name>"}]'
    
    kubectl patch codebaseimagestream <name> -n edp --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "dockerhub.io/<User>/<codebase name>"}]'
    
    kubectl patch codebaseimagestream <name> -n edp --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "<Registry Endpoint>/<Registry Space>/<codebase name>}]'
    
    kubectl patch codebaseimagestream <name> -n edp --type='json' -p='[{"op": "replace", "path": "/spec/imageName", "value": "<Registry Endpoint>/<Project>/<codebase name>}"}]'
    
    kubectl patch codebaseimagestream <name> -n edp --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 edp namespace to all the namespaces managed by the platform. To get the list of the namespaces, run the following command:

kubectl get stages -n edp -o jsonpath='{range .items[*]}{.spec.namespace}{"\n"}{end}'