Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to extract layer contents from artifact: tar file entry bin/arch contained unsupported file type Lrwxrwxrwx #4209

Closed
1 task done
djschny opened this issue Aug 30, 2023 · 10 comments · Fixed by fluxcd/source-controller#1246

Comments

@djschny
Copy link

djschny commented Aug 30, 2023

Describe the bug

Using the following definition with redaction:

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 1m
  url: oci://ghcr.io/<my_org>/<my_repo>
  ref:
    tag: staging
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: my-app
  namespace: flux-system
spec:
  interval: 1m
  prune: true
  sourceRef:
    kind: OCIRepository
    name: my-app
  path: /my-resources/

The following error is produced:

kubectl get events -n flux-system
LAST SEEN   TYPE      REASON                            OBJECT                        MESSAGE
3m2s        Warning   OCIArtifactLayerOperationFailed   ocirepository/course-tapper   failed to extract layer contents from artifact: tar file entry bin/arch contained unsupported file type Lrwxrwxrwx

Steps to reproduce

See above

Expected behavior

It should succeed and/or error should be more relevant.

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

latest

Flux check

N/A - not use flux CLI

Git provider

N/A

Container Registry provider

GitHub Packages

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@makkes
Copy link
Member

makkes commented Aug 31, 2023

Without more information on the image that you're referring to it's going to be a little tough to track down the root cause here.

@djschny
Copy link
Author

djschny commented Aug 31, 2023

From what I can tell you can reproduce this with any docker image. So use something like https://hub.docker.com/_/nginx and set the path to a directory and you should see the error.

@stefanprodan
Copy link
Member

Using a Docker image with a base OS will not work with Flux. Use flux push artifact to publish yamls.

@makkes makkes closed this as completed Aug 31, 2023
@djschny
Copy link
Author

djschny commented Aug 31, 2023

Docker images are OCI compliant images. Please re-open.

@makkes
Copy link
Member

makkes commented Aug 31, 2023

A little clarification here: Flux Kustomizations can only consume OCI images that have a certain structure and media type and these images are created using flux push artifact.

@stefanprodan
Copy link
Member

This is a duplicate of fluxcd/pkg#538 let's discuss there.

@djschny
Copy link
Author

djschny commented Aug 31, 2023

That is very shorted sited FWIW

@djschny
Copy link
Author

djschny commented Aug 31, 2023

Happy to discuss over there too.

@djschny
Copy link
Author

djschny commented Aug 31, 2023

Regardless I believe a more appropriate error should be supplied to a user.

@makkes
Copy link
Member

makkes commented Aug 31, 2023

That is very shorted sited FWIW

I would like to understand your goal here. From what I understand you would like to use a Kustomization with any arbitrary OCI image but what would you expect it to do with the contents? Are you putting Kubernetes manifests in the same image as other content such as binaries? If that's the case then you might want to take a look at layer selectors but that still won't work with any arbitrary OCI image of course.

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

Successfully merging a pull request may close this issue.

3 participants