carvel-dev / carvel-dev/kapp-controller

Provide a first-class API (as part of App CR status) for discovering deployed resources by App CR

Open
#430 1 comment 0 reactions 0 assignees View on GitHub
carvel-accepted enhancement priority/awaiting-more-evidence
Dominant language
Go
Stars
323
Forks
127
Avg merge
2d 16h
Merged PRs (30d)
4

Description

**What steps did you take:**

1. Create a `PackageInstall` via kubectl (not using `kapp deploy`, I mean)
2. Get the generated `App` via kubectl, `kubectl get app my-app -oyaml`

**What happened:**

The `App` does not have any labels/annotations.

**What did you expect:**

I would have expected this App CR to have something like:

```
labels:
kapp.k14s.io/app: "1637859835366892605"
```

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

This problem has been discussed at this [Carvel community channel thread](https://kubernetes.slack.com/archives/CH8KCCKA5/p1637842398026700) and there is a temporary workaround: get the ConfigMap whose name is `-ctrl` and get from the Data["spec"] the key `labelValue`.

The motivation main motivation for having this annotation exposed by the App CR is for other clients (like, in my case, the Kubeapps project) to have bidirectional traceability of the resources created as a consequence of an App CR (regardless they're using Kapp or just plain kubectl calls).

Particulary, Kubeapps needs this to display to the users which Kubernetes resources are part of an installation.
Some examples and demo video on the Carvel bundles support in Kubeapps: https://github.com/kubeapps/kubeapps/pull/3816

**Environment:**

- kapp Controller version (execute `kubectl get deployment -n kapp-controller kapp-controller -o yaml` and the annotation is `kbld.k14s.io/images`):
```
- Path: /Users/dhelfand/go/src/github.com/vmware-tanzu/carvel-kapp-controller
Type: local
- Dirty: false
RemoteURL: https://github.com/vmware-tanzu/carvel-kapp-controller
SHA: 8167469ad3d7c61ce1d170e0f809b437308ce070
Tags:
- v0.30.0
```

- Kubernetes version (use `kubectl version`)
```
- Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:48:33Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
```

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