Description
What steps did you take:
using registry/project/image as a placeholder for my actual image
I have a directory containing the to-be contents of my package:
config
|_ upstream # this is an imgpkg bundle, i.e. has upstream/.imgpkg
|_ downstream # this is plain YTT
I ran
kctrl pkg init
Then I adjusted PackageBuild
manually:
apiVersion: kctrl.carvel.dev/v1alpha1
kind: PackageBuild
metadata:
name: my.package.com
spec:
release:
- resource: {}
template:
spec:
export:
- imgpkgBundle:
image: registry/project/image
useKbldImagesLock: false
includePaths:
- config/downstream
- config/upstream
app:
spec:
deploy:
- {}
template:
- ytt:
paths:
- .
- kbld: {}
Then I updated the resources in package-resources.yaml
to reflect my needs:
- Filled in metadata
- Set
Package
apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
name: my.package.com.0.0.0
spec:
refName: my.package.com
template:
spec:
deploy:
- kapp:
rawOptions:
- --wait-timeout=5m
- --kube-api-qps=20
- --kube-api-burst=30
fetch:
- git: { }
template:
- ytt:
paths:
- config/upstream
- config/downstream
- kbld: { }
valuesSchema:
openAPIv3: null
version: 0.0.0
What happened:
When I run
kctrl pkg release -v 0.0.0-$USER
it fails with
❯ kctrl pkg release -v 0.0.0-$USER --chdir manifests/build
Prerequisites
1. The host must be authorized to push images to a registry (can be set up by
running `docker login`)
2. Package can be released only after `kctrl package init` has been run
successfully.
The bundle created needs to be pushed to an OCI registry. Registry URL format:
<REGISTRY_URL/REPOSITORY_NAME> e.g. index.docker.io/k8slt/sample-bundle
> Enter the registry URL (regisrty/project/path):
W1019 09:12:46.033515 65993 gcp.go:119] WARNING: the gcp auth plugin is deprecated in v1.22+, unavailable in v1.26+; use gcloud instead.
To learn more, consult https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
Target cluster 'https://35.195.245.51' (nodes: gke-tinwork-whinny-default-pool-664656e5-3xmv, 4+)
kbld builds images when necessary and ensures that all image references are
resolved to an immutable reference
Building images and resolving references
| $ ytt -f /var/folders/0r/_173x1jn2d1bp7h4twh90hc80000gp/T/kapp-controller-fetch-template-deploy1953851271/0
| $ kbld -f - --imgpkg-lock-output=.imgpkg/images.yml
kctrl: Error: Reconciling: kbld:
Error:
- Resolving image 'regisrty/project/image': GET https://regisrty/v2/project/image/manifests/latest: NOT_FOUND: repository project/image not found
Annoyingly, my package-build.yaml
gets overwritten by kctrl every time I run the release command:
- It reformats it
- It reorders fields
- It adds
creationTimestamp: null
- It removes
useKbldImagesLock: false
If there are other (unrelated) YTT files in my repository, it fails as it tries to template them.
What did you expect:
That's hard to say. I think I would expect my package image to be pushed and Package
resource to appear somewhere.
Anything else you would like to add:
I am switching back to scripted package releasing.
Environment:
❯ kctrl version
kctrl version 0.41.2
Succeeded
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status