Merge pull request #6198 from ywk253100/181101_replication

Pass internal core URL as source in replication
This commit is contained in:
Daniel Jiang 2018-11-02 12:29:53 +08:00 committed by GitHub
commit 163fc11b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,17 +89,13 @@ func (d *DefaultReplicator) Replicate(replication *Replication) error {
} }
if operation == common_models.RepOpTransfer { if operation == common_models.RepOpTransfer {
url, err := config.ExtEndpoint()
if err != nil {
return err
}
job.Name = common_job.ImageTransfer job.Name = common_job.ImageTransfer
job.Parameters = map[string]interface{}{ job.Parameters = map[string]interface{}{
"repository": repository, "repository": repository,
"tags": tags, "tags": tags,
"src_registry_url": url, "src_registry_url": config.InternalCoreURL(),
"src_registry_insecure": true, "src_registry_insecure": false,
// "src_token_service_url":"", "src_token_service_url": config.InternalTokenServiceEndpoint(),
"dst_registry_url": target.URL, "dst_registry_url": target.URL,
"dst_registry_insecure": target.Insecure, "dst_registry_insecure": target.Insecure,
"dst_registry_username": target.Username, "dst_registry_username": target.Username,