Introduce a facility to maintain kubernetes_api
We introduced FetchKubernetesTokenService
(app/services/ci/fetch_kubernetes_token_service.rb) in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14470. This class is almost copied from KuberntesService
(app/models/project_services/kubernetes_service.rb). This is not dry. We should introduce a facility to maintain kubernetes_api and points it from KuberntesService
. And we can remove FetchKubernetesTokenService
.
The following discussion from !14470 (merged) should be addressed:
-
@dosuken123 started a discussion: (+1 comment) @ayufan @nick.thomas This is a class to remove
attr_accessor :username, :password
fromKubernetesService
. Previously, we discussed at https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14470#note_41830601. I know this is ugly but I don't want to tweakKubernetesService
in this MR. I'll create a follow-up MR as technical debt. Then, we can have time to check if the new facility doesn't break any lagacyKubernetesService
functionality. What do you think?
/cc @ayufan