kubesphere / kubesphere/ks-devops
[Proposal] Avoid communicate with Jenkins on DevOps credential modules
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 164
- Forks
- 140
- PR merge metrics
- No merged PRs in 30d
Description
Current
The credential controller will create or update it to Jenkins via API calling once you create a DevOps credential via UI or CLI.
Potential Problems
- The extra cost of maintaining the credential controller in kubesphere
- Highly rely on Jenkins
- Potential exception from the communication from KubeSphere and Jenkins
- Users can modify (or remove) the credential from Jenkins side, then they might meet some confusing results due to they don't fully understand how does it work
Expected
- Less dependence on Jenkins
- No extra cost of unnecessary maintaining code lines
Solution
There's a plugin that can help us. kubernetes-credentials-provider-plugin can build a mapping between K8S secrets and Jenkins credentials. We don't need to maintain those credentials.
What do we need to do?
- Add some new mapping base on the extension points from kubernetes-credentials-provider-plugin. We can implement it in kubesphere-extension-plugin.
- Remove the credential controller from KubeSphere
- Remove an API from ks-apiserver (GET
devops/{devops}/credentials/{credential}/usage) - Remove other out-dated code lines
Desire reviewers
/cc @shaowenchen
Relevant Issues from Forum
https://kubesphere.com.cn/forum/d/3244-devops/19
/area devops
/kind feature-request
/priority medium
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pkg/controller/devopscredential/devopscredential_controller.go and the ks-apiserver GET devops/{devops}/credentials/{credential}/usage API. Review the extension points in kubernetes-credentials-provider-plugin and the proposed kubesphere-extension-plugin mapping. Done means the mapping replaces controller-managed Jenkins credentials, the controller and API are removed, and outdated code is cleaned up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, ci-cd, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100