carvel-dev / carvel-dev/kapp-controller
`kctrl`: Use the kubeconfig on host while using the `dev` command by default
- Dominant language
- Go
- Stars
- 323
- Forks
- 127
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 6
Description
**Describe the problem/challenge you have**
As of today, we use the service account specified in the PackageInstall while creating resources created as a result of the installation. This means users have to create service accounts to be able to use dev.
Alternatively, we could create the service account for the user if not present as well.
**Describe the solution you'd like**
Using a specified service account is useful when we are trying to figure out if a service account has the minimum required set of permissions available. We can still enable users to do this by using a `--service-account` flag. Or considering that multiple PackageInstalls might be in play, these could be supplied via annotations.
**Tasks**
- [x] Add flag to accept `--use-sa-from-kube-cofig` defaulted to false. In this case use SA from packageInstall and error if SA not present.
- [x] when flag is true use SA from kubeconfig.
- [ ] Test that the correct SA is being used (positive and negative)
- [ ] Documentation update
---
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
Research direction
Review the kctrl dev command and its --use-sa-from-kube-cofig flag, focusing on how it selects the service account from the PackageInstall or kubeconfig. Add positive and negative tests that verify the correct service account is used, then update the documentation for the flag and its behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- authentication, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100