carvel-dev / carvel-dev/kbld

Show Less Stdout when using --imgpkg-lock-output

Open
#121 6 comments 1 reaction 0 assignees View on GitHub
carvel accepted enhancement priority/important-soon
Dominant language
Go
Stars
329
Forks
52
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem/challenge you have**

When generating an ImagesLock file with `kbld -f ... --imgpkg-lock-output ...`, stdout showing the configs from `-f` is displayed as part of the output of running the command:

```
kbld -f package-contents/config/ --imgpkg-lock-output package-contents/.imgpkg/images.yml
resolve | final: docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0 -> index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
---
simple-app: ""
---
apiVersion: v1
kind: Service
metadata:
name: simple-app
namespace: default
spec:
ports:
- port: null
targetPort: null
selector: null
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kbld.k14s.io/images: |
null
name: simple-app
namespace: default
spec:
selector:
matchLabels: null
template:
metadata:
labels: null
spec:
containers:
- env:
- name: HELLO_MSG
value: null
image: index.docker.io/dkalinin/k8s-simple-app@sha256:4c8b96d4fffdfae29258d94a22ae4ad1fe36139d47288b8960d9958d1e63a9d0
name: simple-app
---
app_port: 80
hello_msg: stranger
svc_port: 80

Succeeded
```

It makes it difficult to know exactly what happened as far as producing the ImagesLock file.

**Describe the solution you'd like**

The output should not show the underlying Kubernetes manifests in stdout. There should maybe just be information detailing what image references were resolved to a digest format and something confirming the ImagesLock file was successfully created and is located where the user wants the file created.

**Anything else you would like to add:**

Open to any interpretation of what the output when using `--imgpkg-lock-output` should be, but my thought is at very least to remove what has been resolved via the `-f` option.

Would also be open to hear if there are use cases for producing this stdout with `--imgpkg-lock-output`. At very least, I do not think the default should show the resolved Kubernetes configs.

---
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.