carvel-dev / kapp-controller

Continuous delivery and package management for Kubernetes.
https://carvel.dev/kapp-controller
Apache License 2.0
262 stars 101 forks source link

kapp controller should support nested imgpkg bundles #189

Closed tsfrt closed 2 years ago

tsfrt commented 3 years ago

What steps did you take: I am attempting to utilize imgpkg to deploy a set of nested imgpkgs that are used to release versioned applications. I would like to nest specific versions into a parent imgpkg that is curated for a specific deployment target.

I have created an imgpkg with 2 nested image packages. I am able to do a pull recursive on the image package and I see both bundles in the .imgpkg folder and things looks OK.

When I point kapp controller at the parent imgpkg bundle I get a different outcome:

apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: env1-bundle-imgpkg
  namespace: kapp-gitops-mgmt
spec:
  serviceAccountName: kapp-sa
  fetch:
    - imgpkgBundle:
        image: <registry>/env-bundle-imgpkg/env-bundle-copy:env1
  template:
    - ytt: {}
    - kbld:
        paths:
        - "-"
        - .imgpkg/images.yml
  deploy:
    - kapp: {}

What happened:


template:
    error: 'Templating dir: Error (see .status.usefulErrorMessage for details)'
    exitCode: 1
    stderr: |
      kbld: Error: Validating imageslock/ (imgpkg.carvel.dev/v1alpha1) cluster:
        Validating Overrides[0]:
          Expected Image or ImageRepo to be non-empty
    updatedAt: "2021-05-05T15:52:34Z"
  usefulErrorMessage: |
    kbld: Error: Validating imageslock/ (imgpkg.carvel.dev/v1alpha1) cluster:
      Validating Overrides[0]:
        Expected Image or ImageRepo to be non-empty

What did you expect: I expected my imgpkg to at least begin to reconcile.

Anything else you would like to add:

Environment:


Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible" 👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

ewrenn8 commented 3 years ago

Opened related PR in vendir. Once thats merged, we can update kc to leverage it

aaronshurley commented 3 years ago

Looks like the PR was merged in vendir but a new version hasn't been released yet.

frizzr commented 2 years ago

Looks like this did make it to the released version of Vendir:

https://github.com/vmware-tanzu/carvel-vendir/issues/62#issuecomment-867169923

aaronshurley commented 2 years ago

Nice catch, @frizzr! Closing.