goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
24.28k stars 4.77k forks source link

Support chart replication to AWS ECR #16759

Open VikramPunnam opened 2 years ago

VikramPunnam commented 2 years ago

Amazon released support for alternate media types in ECR manifests. They can support storing helm charts as OCI images. See: https://github.com/aws/containers-roadmap/issues/308#issuecomment-675027095

I would like to be create replication rules for syncing charts between Harbor and ECR

Currently if I try to create a replication rule to push charts from Harbor to ECR, it gives the error

I tried with the artifact in the resource block but still got the same error. It only tries to replicate the Images, not the helm charts. Below are logs of the replication when resource as charts.

2022-04-27T05:22:45Z [INFO] [/controller/replication/transfer/chart/transfer.go:92]: client for source registry [type: harbor, URL: http://harbor-core:80, insecure: true] created 2022-04-27T05:22:45Z [ERROR] [/controller/replication/transfer/chart/transfer.go:98]: failed to create client for destination registry: the adapter doesn't implement the "ChartRegistry" interface

Can someone help with this, please?

chlins commented 2 years ago

Could you provide your replication rule?

VikramPunnam commented 2 years ago

Replication mode: Push based Source resource filter: all Resource: tried with all and charts (not working) Destination registry: https://api.ecr.us-east-1.amazonaws.com Trigger mode: manual

chlins commented 2 years ago

If you select OCI chart, these charts are treated with Artifact, so for resource only need select artifact. The error log from your first comment shows it tried to replicate non-OCI chart in chartmuseum, could you check whether put chart in the right place(it should not in chartmuseum)?

VikramPunnam commented 2 years ago

I tried with the artifact as well but there is no replication.

VikramPunnam commented 2 years ago

Any update on the above issue?

chlins commented 2 years ago

Hi,did you push your chart by helm v3 to harbor and could you share your artifact page?

VikramPunnam commented 2 years ago

Yes, pushed chart with helm v3. Artifact page?

chlins commented 2 years ago

https://goharbor.io/docs/2.5.0/working-with-projects/working-with-images/managing-helm-charts/#manage-helm-charts-with-the-oci-compatible-registry-of-harbor

chlins commented 2 years ago

You could refer to above docs to check whether your OCI chart is ready.

VikramPunnam commented 2 years ago

Hi Can we connect through zoom? once to understand more

chlins commented 2 years ago

Could ping me by slack channel: https://cloud-native.slack.com/archives/CC1E09J6S

github-actions[bot] commented 2 years ago

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.