Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

A new image is created for every tag #958

Closed
jsilverio22 opened this issue Dec 2, 2022 · 1 comment
Closed

A new image is created for every tag #958

jsilverio22 opened this issue Dec 2, 2022 · 1 comment
Assignees
Milestone

Comments

@jsilverio22
Copy link
Contributor

A new image is created for every tag refactor image creation to include a list of tags/reference

@jsilverio22 jsilverio22 self-assigned this Dec 2, 2022
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 2, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 2, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 2, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 5, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 5, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 5, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 7, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 10, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 11, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
jsilverio22 added a commit to jsilverio22/acorn that referenced this issue Dec 11, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
ibuildthecloud pushed a commit to ibuildthecloud/acorn that referenced this issue Dec 16, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
ibuildthecloud pushed a commit to ibuildthecloud/acorn that referenced this issue Dec 17, 2022
…rences acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
ibuildthecloud pushed a commit that referenced this issue Dec 17, 2022
…rences #958 #882 (#959)

refactor: image api to create one img that includes list of tags/references #958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
@jsilverio22 jsilverio22 added this to the v0.5.0 milestone Jan 3, 2023
tylerslaton pushed a commit to tylerslaton/runtime that referenced this issue Jan 5, 2023
…rences acorn-io#958 acorn-io#882 (acorn-io#959)

refactor: image api to create one img that includes list of tags/references acorn-io#958

Signed-off-by: Joshua Silverio <joshua@acorn.io>
@thedadams
Copy link
Contributor

thedadams commented Jan 10, 2023

Reproduced on Acorn v0.4.2:

  1. Built an image using acorn build -t asdf .
  2. Tagged this image using acorn tag 614ae13a6fe9 asdf:v1
  3. Request images using kubectl -n acorn get images.api.acorn.io and saw two entries:
REPOSITORY   TAG      IMAGE-ID
asdf         latest   614ae13a6fe9
asdf         v1       614ae13a6fe9
  1. Deleting one image via acorn image delete asdf deleted both images.

On the latest version of Acorn:

  1. Built an image using acorn build -t asdf .
  2. Tagged this image using acorn tag db6650d775f9 asdf:v1
  3. Request images using kubectl -n acorn get images.api.acorn.io and saw only one entry with two tags:
IMAGE-ID       TAGS
db6650d775f9   asdf:latest,asdf:v1
  1. For completeness, I also requested the imageinstance via kubectl -n acorn get imageinstance db6650d775f903fc18c1c49ab319c6eba261845187e4ba8ffdf1b4e819253b34 -o yaml and saw the tags there, too:
apiVersion: internal.acorn.io/v1
digest: sha256:db6650d775f903fc18c1c49ab319c6eba261845187e4ba8ffdf1b4e819253b34
kind: ImageInstance
metadata:
  annotations:
    apply.acorn.io/applied: H4sIAAAAAAAA/5zNyw2DMAwA0F185oDJP3N0AcdxWiQSEElPiN2rqht0gfcuyOtT+oAI/UWLsTEna82cnTMlzKowekbWgZLCwFYSLRa9Nuid6ES+lFwwafHo0fmgnYMJqgzKNAjiBXwKjXVvj7VKH1QPiO29bRM0qgIR/v7CYlRSGn5SP4i/HPF+NrjvTwAAAP//M4WaBdkAAAA
  creationTimestamp: "2023-01-10T19:04:06Z"
  generation: 3
  name: db6650d775f903fc18c1c49ab319c6eba261845187e4ba8ffdf1b4e819253b34
  namespace: acorn
  resourceVersion: "1466"
  uid: b0a38ea5-d85f-4776-9947-f5a65fe2650a
tags:
- asdf:latest
- asdf:v1
  1. Deleting an image tag via acorn image.api.acorn.io rm asdf:v1 only removed the corresponding tag from the above two requests:
IMAGE-ID       TAGS
db6650d775f9   asdf:latest
apiVersion: internal.acorn.io/v1
digest: sha256:db6650d775f903fc18c1c49ab319c6eba261845187e4ba8ffdf1b4e819253b34
kind: ImageInstance
metadata:
  annotations:
    apply.acorn.io/applied: H4sIAAAAAAAA/5zNyw2DMAwA0F185oDJP3N0AcdxWiQSEElPiN2rqht0gfcuyOtT+oAI/UWLsTEna82cnTMlzKowekbWgZLCwFYSLRa9Nuid6ES+lFwwafHo0fmgnYMJqgzKNAjiBXwKjXVvj7VKH1QPiO29bRM0qgIR/v7CYlRSGn5SP4i/HPF+NrjvTwAAAP//M4WaBdkAAAA
  creationTimestamp: "2023-01-10T19:04:06Z"
  generation: 4
  name: db6650d775f903fc18c1c49ab319c6eba261845187e4ba8ffdf1b4e819253b34
  namespace: acorn
  resourceVersion: "1512"
  uid: b0a38ea5-d85f-4776-9947-f5a65fe2650a
tags:
- asdf:latest
  1. Added the tag back and deleted the image via acorn image rm db6650d775f9 and received this following error as expected:
Error: deleting db6650d775f9: unable to delete db6650d775f9 (must be forced) - image is referenced in multiple repositories
  1. Delete the image via acorn image rm -f db6650d775f9 and saw that the corresponding Kubernetes objects were deleted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants