oras icon indicating copy to clipboard operation
oras copied to clipboard

does oras plan to support delete helm charts from docker registry?

Open hustclf opened this issue 5 years ago • 8 comments

does oras has a plan to support delete helm charts from docker registry?

Thanks.

hustclf avatar Jul 16 '20 03:07 hustclf

@hustclf currently no plan. This functionality is supported via the OCI API, but many registries do not support it. What would this look like from a UX perspective?

jdolitsky avatar Jul 16 '20 14:07 jdolitsky

Deleting via the distribution API is optional to support for registries, so the UX would also suffer from the fact that these operations can (and most commonly will) fail.

jzelinskie avatar Jul 16 '20 14:07 jzelinskie

@jdolitsky I have no idea about the UX perspective.

I store helm charts in docker registry via helm registry, and there too many old versions of charts as time going on, I just want to delete these from docker registry, but not found in registry api, is there a solution can solve my problem?

Thanks!

hustclf avatar Jul 17 '20 02:07 hustclf

@jzelinskie I think you hit on something worth noting in the design. Is ORAS looking to only support required distribution spec features or optional ones as well? If optional ones would be supported than I would suggest supporting the delete operation but gracefully telling the callers when it's not implemented.

mattfarina avatar Aug 21 '20 15:08 mattfarina

As time yields on, developers automate, and we all recognize storage is:

  1. not infinite
  2. not free - someone pays
  3. means I have old stuff that is insecure and causes users & customers compliance issues

We should absolutely support the delete api of the oci distribution spec. While not every registry supports delete, that's a registry option. The ORAS client & library should support needed apis that are standard on the spec.

SteveLasker avatar Sep 13 '20 22:09 SteveLasker

We need to delete via API and but there is no UX support that as of now!! :)

harishsg99 avatar Sep 14 '20 07:09 harishsg99

Are you asking for what the delete api would look like in the ORAS library and ORAS client? The current CLI:

oras -h
Usage:
  oras [command]

Available Commands:
  help        Help about any command
  login       Log in to a remote registry
  logout      Log out from a remote registry
  pull        Pull files from remote registry
  push        Push files to remote registry
  version     Show the oras version information

with a possible delete vs. untagOnly flag

oras delete 
--artifact the fully qualified artifact registry.example.com/repo/artifact:tag
--artifact registry.example.com/repo/artifact@sha256:[digest]
--untagOnly

SteveLasker avatar Sep 14 '20 16:09 SteveLasker

oras is evolving into a generic registry client. Yes, it's in the plan

shizhMSFT avatar May 07 '22 12:05 shizhMSFT

Addressed and closed by #506. As long as the remote registry supports deletion, helm chart artifacts can be deleted by oras manifest delete.

shizhMSFT avatar Sep 15 '22 06:09 shizhMSFT

Note: untag is not possible with generic docker registries as neither docker spec nor OCI spec support untagging at the HTTP API level.

However, untag are available in registry by some cloud providers (e.g. Azure Container Registry).

shizhMSFT avatar Sep 15 '22 06:09 shizhMSFT

thank you for implementing it.

Unfortunately ghcr.io does not support it yet:

Error: failed to delete ghcr.io/foo/bar:0.0.1: DELETE "https://ghcr.io/v2/foo/bar/manifests/sha256:...":
 response status code 405: unsupported: The operation is unsupported.

guettli avatar Nov 29 '23 15:11 guettli