carvel-dev / carvel-dev/kapp

--filter-labels isn't properly filtering CRD

Open
#367 8 comments 0 reactions 0 assignees View on GitHub
helping with an issue
Dominant language
Go
Stars
1.1k
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**What steps did you take:**
[A clear and concise description steps and any files that can be used to reproduce the problem.]
```
:; kapp deploy -a someapp -y -f foo.yaml --filter-labels=a.b.c/bar=qaz
```

**What happened:**
[A small description of the result]
kapp complained about not finding custom resource types for several CRDs. the CRDs should have been filtered out (read: excluded from consideration) by the `--filter-labels` flag, but kapp was still processing them somehow.

**What did you expect:**
[A description of what was expected]
expected kapp to ignore all resources in foo.yaml that do not have labels matching the specified filter

**Anything else you would like to add:**
[Additional information that will assist in solving the issue.]

**Environment:**

- kapp version (use `kapp --version`): 0.42.0
- OS (e.g. from `/etc/os-release`):
- Kubernetes version (use `kubectl version`)

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

Research direction

Reproduce the issue with `kapp deploy -a someapp -y -f foo.yaml --filter-labels=a.b.c/bar=qaz` using resources that include CRDs. Trace how `--filter-labels` is applied and verify that unmatched CRDs are excluded before custom resource types are processed; done means the command no longer complains about filtered-out CRDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.