Skip to content

Commit 5929632

Browse files
Merge pull request #6157 from devtron-labs/release-candidate-v0.24.0
misc: Release candidate v0.24.0
2 parents dc9ce1b + 829b0d7 commit 5929632

File tree

115 files changed

+1343
-877
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1343
-877
lines changed

api/cluster/ClusterRestHandler.go

Lines changed: 72 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ import (
2020
"context"
2121
"encoding/json"
2222
"errors"
23+
bean2 "github.com/devtron-labs/devtron/pkg/cluster/bean"
24+
"github.com/devtron-labs/devtron/pkg/cluster/environment"
25+
"github.com/devtron-labs/devtron/pkg/cluster/rbac"
2326
"net/http"
2427
"strconv"
28+
"strings"
2529
"time"
2630

2731
"github.com/devtron-labs/devtron/pkg/auth/authorisation/casbin"
@@ -69,8 +73,8 @@ type ClusterRestHandlerImpl struct {
6973
enforcer casbin.Enforcer
7074
deleteService delete2.DeleteService
7175
argoUserService argo.ArgoUserService
72-
environmentService cluster.EnvironmentService
73-
clusterRbacService cluster.ClusterRbacService
76+
environmentService environment.EnvironmentService
77+
clusterRbacService rbac.ClusterRbacService
7478
}
7579

7680
func NewClusterRestHandlerImpl(clusterService cluster.ClusterService,
@@ -82,8 +86,8 @@ func NewClusterRestHandlerImpl(clusterService cluster.ClusterService,
8286
enforcer casbin.Enforcer,
8387
deleteService delete2.DeleteService,
8488
argoUserService argo.ArgoUserService,
85-
environmentService cluster.EnvironmentService,
86-
clusterRbacService cluster.ClusterRbacService) *ClusterRestHandlerImpl {
89+
environmentService environment.EnvironmentService,
90+
clusterRbacService rbac.ClusterRbacService) *ClusterRestHandlerImpl {
8791
return &ClusterRestHandlerImpl{
8892
clusterService: clusterService,
8993
clusterNoteService: clusterNoteService,
@@ -107,7 +111,7 @@ func (impl ClusterRestHandlerImpl) SaveClusters(w http.ResponseWriter, r *http.R
107111
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
108112
return
109113
}
110-
beans := []*cluster.ClusterBean{}
114+
beans := []*bean2.ClusterBean{}
111115
err = decoder.Decode(&beans)
112116
if err != nil {
113117
impl.logger.Errorw("request err, Save", "error", err, "payload", beans)
@@ -178,7 +182,7 @@ func (impl ClusterRestHandlerImpl) Save(w http.ResponseWriter, r *http.Request)
178182
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
179183
return
180184
}
181-
bean := new(cluster.ClusterBean)
185+
bean := new(bean2.ClusterBean)
182186
err = decoder.Decode(bean)
183187
if err != nil {
184188
impl.logger.Errorw("request err, Save", "error", err, "payload", bean)
@@ -247,7 +251,7 @@ func (impl ClusterRestHandlerImpl) ValidateKubeconfig(w http.ResponseWriter, r *
247251
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
248252
return
249253
}
250-
bean := &cluster.Kubeconfig{}
254+
bean := &bean2.Kubeconfig{}
251255
err = decoder.Decode(bean)
252256
if err != nil {
253257
impl.logger.Errorw("request err, Validate", "error", err, "payload", bean)
@@ -309,7 +313,7 @@ func (impl ClusterRestHandlerImpl) FindAll(w http.ResponseWriter, r *http.Reques
309313
}
310314

311315
// RBAC enforcer applying
312-
var result []*cluster.ClusterBean
316+
var result []*bean2.ClusterBean
313317
for _, item := range clusterList {
314318
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionGet, item.ClusterName); ok {
315319
result = append(result, item)
@@ -374,7 +378,7 @@ func (impl ClusterRestHandlerImpl) FindNoteByClusterId(w http.ResponseWriter, r
374378
}
375379
// RBAC enforcer applying
376380
token := r.Header.Get("token")
377-
authenticated, err := impl.clusterRbacService.CheckAuthorization(bean.ClusterName, bean.ClusterId, token, userId, false)
381+
authenticated, err := impl.clusterRbacService.CheckAuthorization(bean.ClusterName, bean.ClusterId, token, userId, true)
378382
if err != nil {
379383
impl.logger.Errorw("error in checking rbac for cluster", "err", err, "clusterId", bean.ClusterId)
380384
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
@@ -397,7 +401,7 @@ func (impl ClusterRestHandlerImpl) Update(w http.ResponseWriter, r *http.Request
397401
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
398402
return
399403
}
400-
var bean cluster.ClusterBean
404+
var bean bean2.ClusterBean
401405
err = decoder.Decode(&bean)
402406
if err != nil {
403407
impl.logger.Errorw("request err, Update", "error", err, "payload", bean)
@@ -458,7 +462,7 @@ func (impl ClusterRestHandlerImpl) UpdateClusterDescription(w http.ResponseWrite
458462
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
459463
return
460464
}
461-
var bean cluster.ClusterBean
465+
var bean bean2.ClusterBean
462466
err = decoder.Decode(&bean)
463467
if err != nil {
464468
impl.logger.Errorw("request err, UpdateClusterDescription", "error", err, "payload", bean)
@@ -474,7 +478,8 @@ func (impl ClusterRestHandlerImpl) UpdateClusterDescription(w http.ResponseWrite
474478
return
475479
}
476480
// RBAC enforcer applying
477-
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionUpdate, clusterDescription.ClusterName); !ok {
481+
authenticated := impl.clusterRbacService.CheckAuthorisationForAllK8sPermissions(token, clusterDescription.ClusterName, casbin.ActionUpdate)
482+
if !authenticated {
478483
common.WriteJsonResp(w, errors.New("unauthorized"), nil, http.StatusForbidden)
479484
return
480485
}
@@ -518,7 +523,8 @@ func (impl ClusterRestHandlerImpl) UpdateClusterNote(w http.ResponseWriter, r *h
518523
return
519524
}
520525
// RBAC enforcer applying
521-
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionUpdate, clusterDescription.ClusterName); !ok {
526+
authenticated := impl.clusterRbacService.CheckAuthorisationForAllK8sPermissions(token, clusterDescription.ClusterName, casbin.ActionUpdate)
527+
if !authenticated {
522528
common.WriteJsonResp(w, errors.New("unauthorized"), nil, http.StatusForbidden)
523529
return
524530
}
@@ -544,7 +550,7 @@ func (impl ClusterRestHandlerImpl) FindAllForAutoComplete(w http.ResponseWriter,
544550
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
545551
return
546552
}
547-
var result []cluster.ClusterBean
553+
var result []bean2.ClusterBean
548554
v := r.URL.Query()
549555
authEnabled := true
550556
auth := v.Get("auth")
@@ -573,7 +579,7 @@ func (impl ClusterRestHandlerImpl) FindAllForAutoComplete(w http.ResponseWriter,
573579
//RBAC enforcer Ends
574580

575581
if len(result) == 0 {
576-
result = make([]cluster.ClusterBean, 0)
582+
result = make([]bean2.ClusterBean, 0)
577583
}
578584
common.WriteJsonResp(w, err, result, http.StatusOK)
579585
}
@@ -586,7 +592,7 @@ func (impl ClusterRestHandlerImpl) DeleteCluster(w http.ResponseWriter, r *http.
586592
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
587593
return
588594
}
589-
var bean cluster.ClusterBean
595+
var bean bean2.ClusterBean
590596
err = decoder.Decode(&bean)
591597
if err != nil {
592598
impl.logger.Errorw("request err, Delete", "error", err, "payload", bean)
@@ -619,17 +625,61 @@ func (impl ClusterRestHandlerImpl) DeleteCluster(w http.ResponseWriter, r *http.
619625

620626
func (impl ClusterRestHandlerImpl) GetAllClusterNamespaces(w http.ResponseWriter, r *http.Request) {
621627
token := r.Header.Get("token")
628+
userId, err := impl.userService.GetLoggedInUser(r)
629+
if userId == 0 || err != nil {
630+
impl.logger.Errorw("err, GetAllClusterNamespaces", "error", err, "userId", userId)
631+
common.WriteJsonResp(w, err, "Unauthorized User", http.StatusUnauthorized)
632+
return
633+
}
622634
clusterNamespaces := impl.clusterService.GetAllClusterNamespaces()
623635

624636
// RBAC enforcer applying
625-
for clusterName, _ := range clusterNamespaces {
626-
if ok := impl.enforcer.Enforce(token, casbin.ResourceCluster, casbin.ActionGet, clusterName); !ok {
627-
delete(clusterNamespaces, clusterName)
628-
}
637+
filteredClusterNamespaces, err := impl.HandleRbacForClusterNamespace(userId, token, clusterNamespaces)
638+
if err != nil {
639+
impl.logger.Errorw("error in GetAllClusterNamespaces", "err", err)
640+
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
641+
return
629642
}
630643
//RBAC enforcer Ends
631644

632-
common.WriteJsonResp(w, nil, clusterNamespaces, http.StatusOK)
645+
common.WriteJsonResp(w, nil, filteredClusterNamespaces, http.StatusOK)
646+
}
647+
648+
func (impl ClusterRestHandlerImpl) HandleRbacForClusterNamespace(userId int32, token string, clusterNamespaces map[string][]string) (map[string][]string, error) {
649+
filteredClusterNamespaces := make(map[string][]string)
650+
if ok := impl.enforcer.Enforce(token, casbin.ResourceGlobal, casbin.ActionGet, "*"); ok {
651+
return clusterNamespaces, nil
652+
}
653+
roles, err := impl.clusterService.FetchRolesFromGroup(userId)
654+
if err != nil {
655+
impl.logger.Errorw("error on fetching user roles for cluster list", "err", err)
656+
return nil, err
657+
}
658+
659+
clusterAndNameSpaceVsAllowedMap := make(map[string]bool, len(roles))
660+
clusterNameVsAllAllowedMap := make(map[string]bool, len(roles))
661+
for _, role := range roles {
662+
clusterAndNameSpaceVsAllowedMap[strings.ToLower(role.Cluster+"_"+role.Namespace)] = true
663+
if role.Namespace == "" {
664+
clusterNameVsAllAllowedMap[role.Cluster] = true
665+
} else {
666+
clusterNameVsAllAllowedMap[role.Cluster] = false
667+
}
668+
}
669+
670+
for clusterName, allNamespaces := range clusterNamespaces {
671+
if val, exist := clusterNameVsAllAllowedMap[clusterName]; val {
672+
filteredClusterNamespaces[clusterName] = allNamespaces
673+
} else if exist {
674+
for _, namespace := range allNamespaces {
675+
if val2, exist2 := clusterAndNameSpaceVsAllowedMap[strings.ToLower(clusterName+"_"+namespace)]; exist2 && val2 {
676+
filteredClusterNamespaces[clusterName] = append(filteredClusterNamespaces[clusterName], namespace)
677+
}
678+
}
679+
}
680+
}
681+
return filteredClusterNamespaces, nil
682+
633683
}
634684

635685
func (impl ClusterRestHandlerImpl) GetClusterNamespaces(w http.ResponseWriter, r *http.Request) {
@@ -688,7 +738,7 @@ func (impl ClusterRestHandlerImpl) FindAllForClusterPermission(w http.ResponseWr
688738
if len(clusterList) == 0 {
689739
// assumption is that if list is empty, then it can happen only in case of Unauthorized (but not sending Unauthorized for super-admin user)
690740
if isActionUserSuperAdmin {
691-
clusterList = make([]cluster.ClusterBean, 0)
741+
clusterList = make([]bean2.ClusterBean, 0)
692742
} else {
693743
common.WriteJsonResp(w, errors.New("unauthorized"), nil, http.StatusForbidden)
694744
return

api/cluster/EnvironmentRestHandler.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ package cluster
1919
import (
2020
"context"
2121
"encoding/json"
22-
bean2 "github.com/devtron-labs/devtron/pkg/cluster/repository/bean"
22+
bean3 "github.com/devtron-labs/devtron/pkg/cluster/bean"
23+
request "github.com/devtron-labs/devtron/pkg/cluster/environment"
24+
bean2 "github.com/devtron-labs/devtron/pkg/cluster/environment/bean"
25+
"github.com/devtron-labs/devtron/pkg/cluster/environment/read"
2326
"net/http"
2427
"strconv"
2528
"strings"
@@ -35,7 +38,6 @@ import (
3538
"github.com/devtron-labs/devtron/api/bean"
3639

3740
"github.com/devtron-labs/devtron/api/restHandler/common"
38-
request "github.com/devtron-labs/devtron/pkg/cluster"
3941
delete2 "github.com/devtron-labs/devtron/pkg/delete"
4042
"github.com/gorilla/mux"
4143
"github.com/pkg/errors"
@@ -61,6 +63,7 @@ type EnvironmentRestHandler interface {
6163

6264
type EnvironmentRestHandlerImpl struct {
6365
environmentClusterMappingsService request.EnvironmentService
66+
environmentReadService read.EnvironmentReadService
6467
k8sCommonService k8s.K8sCommonService
6568
logger *zap.SugaredLogger
6669
userService user.UserService
@@ -76,7 +79,7 @@ type ClusterReachableResponse struct {
7679
ClusterName string `json:"clusterName"`
7780
}
7881

79-
func NewEnvironmentRestHandlerImpl(svc request.EnvironmentService, logger *zap.SugaredLogger, userService user.UserService, validator *validator.Validate, enforcer casbin.Enforcer, deleteService delete2.DeleteService, k8sUtil *k8s2.K8sServiceImpl, k8sCommonService k8s.K8sCommonService) *EnvironmentRestHandlerImpl {
82+
func NewEnvironmentRestHandlerImpl(svc request.EnvironmentService, environmentReadService read.EnvironmentReadService, logger *zap.SugaredLogger, userService user.UserService, validator *validator.Validate, enforcer casbin.Enforcer, deleteService delete2.DeleteService, k8sUtil *k8s2.K8sServiceImpl, k8sCommonService k8s.K8sCommonService) *EnvironmentRestHandlerImpl {
8083
cfg := &bean.Config{}
8184
err := env.Parse(cfg)
8285
if err != nil {
@@ -86,6 +89,7 @@ func NewEnvironmentRestHandlerImpl(svc request.EnvironmentService, logger *zap.S
8689
logger.Infow("evironment rest handler initialized", "ignoreAuthCheckValue", cfg.IgnoreAuthCheck)
8790
return &EnvironmentRestHandlerImpl{
8891
environmentClusterMappingsService: svc,
92+
environmentReadService: environmentReadService,
8993
logger: logger,
9094
userService: userService,
9195
validator: validator,
@@ -160,7 +164,7 @@ func (impl EnvironmentRestHandlerImpl) Get(w http.ResponseWriter, r *http.Reques
160164
}
161165

162166
func (impl EnvironmentRestHandlerImpl) GetAll(w http.ResponseWriter, r *http.Request) {
163-
environments, err := impl.environmentClusterMappingsService.GetAll()
167+
environments, err := impl.environmentReadService.GetAll()
164168
if err != nil {
165169
impl.logger.Errorw("service err, GetAll", "err", err)
166170
common.WriteJsonResp(w, err, nil, http.StatusInternalServerError)
@@ -516,6 +520,6 @@ func (impl EnvironmentRestHandlerImpl) GetEnvironmentConnection(w http.ResponseW
516520
//updating the cluster connection error to db
517521
mapObj := &sync.Map{}
518522
mapObj.Store(clusterBean.Id, err)
519-
impl.environmentClusterMappingsService.HandleErrorInClusterConnections([]*request.ClusterBean{clusterBean}, mapObj, true)
523+
impl.environmentClusterMappingsService.HandleErrorInClusterConnections([]*bean3.ClusterBean{clusterBean}, mapObj, true)
520524
common.WriteJsonResp(w, nil, responseObj, http.StatusOK)
521525
}

api/cluster/wire_cluster.go

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ package cluster
1818

1919
import (
2020
"github.com/devtron-labs/devtron/pkg/cluster"
21+
"github.com/devtron-labs/devtron/pkg/cluster/environment"
22+
read2 "github.com/devtron-labs/devtron/pkg/cluster/environment/read"
23+
repository3 "github.com/devtron-labs/devtron/pkg/cluster/environment/repository"
24+
"github.com/devtron-labs/devtron/pkg/cluster/rbac"
25+
"github.com/devtron-labs/devtron/pkg/cluster/read"
2126
"github.com/devtron-labs/devtron/pkg/cluster/repository"
2227
"github.com/devtron-labs/devtron/pkg/genericNotes"
2328
repository2 "github.com/devtron-labs/devtron/pkg/genericNotes/repository"
@@ -32,9 +37,11 @@ var ClusterWireSet = wire.NewSet(
3237
cluster.NewClusterServiceImpl,
3338
cluster.NewClusterServiceImplExtended,
3439
wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImplExtended)),
40+
read.NewClusterReadServiceImpl,
41+
wire.Bind(new(read.ClusterReadService), new(*read.ClusterReadServiceImpl)),
3542

36-
cluster.NewClusterRbacServiceImpl,
37-
wire.Bind(new(cluster.ClusterRbacService), new(*cluster.ClusterRbacServiceImpl)),
43+
rbac.NewClusterRbacServiceImpl,
44+
wire.Bind(new(rbac.ClusterRbacService), new(*rbac.ClusterRbacServiceImpl)),
3845

3946
repository.NewClusterDescriptionRepositoryImpl,
4047
wire.Bind(new(repository.ClusterDescriptionRepository), new(*repository.ClusterDescriptionRepositoryImpl)),
@@ -54,10 +61,12 @@ var ClusterWireSet = wire.NewSet(
5461
NewClusterRouterImpl,
5562
wire.Bind(new(ClusterRouter), new(*ClusterRouterImpl)),
5663

57-
repository.NewEnvironmentRepositoryImpl,
58-
wire.Bind(new(repository.EnvironmentRepository), new(*repository.EnvironmentRepositoryImpl)),
59-
cluster.NewEnvironmentServiceImpl,
60-
wire.Bind(new(cluster.EnvironmentService), new(*cluster.EnvironmentServiceImpl)),
64+
repository3.NewEnvironmentRepositoryImpl,
65+
wire.Bind(new(repository3.EnvironmentRepository), new(*repository3.EnvironmentRepositoryImpl)),
66+
environment.NewEnvironmentServiceImpl,
67+
wire.Bind(new(environment.EnvironmentService), new(*environment.EnvironmentServiceImpl)),
68+
read2.NewEnvironmentReadServiceImpl,
69+
wire.Bind(new(read2.EnvironmentReadService), new(*read2.EnvironmentReadServiceImpl)),
6170
NewEnvironmentRestHandlerImpl,
6271
wire.Bind(new(EnvironmentRestHandler), new(*EnvironmentRestHandlerImpl)),
6372
NewEnvironmentRouterImpl,
@@ -68,10 +77,12 @@ var ClusterWireSet = wire.NewSet(
6877
var ClusterWireSetEa = wire.NewSet(
6978
repository.NewClusterRepositoryImpl,
7079
wire.Bind(new(repository.ClusterRepository), new(*repository.ClusterRepositoryImpl)),
71-
cluster.NewClusterRbacServiceImpl,
72-
wire.Bind(new(cluster.ClusterRbacService), new(*cluster.ClusterRbacServiceImpl)),
80+
rbac.NewClusterRbacServiceImpl,
81+
wire.Bind(new(rbac.ClusterRbacService), new(*rbac.ClusterRbacServiceImpl)),
7382
cluster.NewClusterServiceImpl,
7483
wire.Bind(new(cluster.ClusterService), new(*cluster.ClusterServiceImpl)),
84+
read.NewClusterReadServiceImpl,
85+
wire.Bind(new(read.ClusterReadService), new(*read.ClusterReadServiceImpl)),
7586

7687
repository.NewClusterDescriptionRepositoryImpl,
7788
wire.Bind(new(repository.ClusterDescriptionRepository), new(*repository.ClusterDescriptionRepositoryImpl)),
@@ -90,10 +101,12 @@ var ClusterWireSetEa = wire.NewSet(
90101
wire.Bind(new(ClusterRestHandler), new(*ClusterRestHandlerImpl)),
91102
NewClusterRouterImpl,
92103
wire.Bind(new(ClusterRouter), new(*ClusterRouterImpl)),
93-
repository.NewEnvironmentRepositoryImpl,
94-
wire.Bind(new(repository.EnvironmentRepository), new(*repository.EnvironmentRepositoryImpl)),
95-
cluster.NewEnvironmentServiceImpl,
96-
wire.Bind(new(cluster.EnvironmentService), new(*cluster.EnvironmentServiceImpl)),
104+
repository3.NewEnvironmentRepositoryImpl,
105+
wire.Bind(new(repository3.EnvironmentRepository), new(*repository3.EnvironmentRepositoryImpl)),
106+
environment.NewEnvironmentServiceImpl,
107+
wire.Bind(new(environment.EnvironmentService), new(*environment.EnvironmentServiceImpl)),
108+
read2.NewEnvironmentReadServiceImpl,
109+
wire.Bind(new(read2.EnvironmentReadService), new(*read2.EnvironmentReadServiceImpl)),
97110
NewEnvironmentRestHandlerImpl,
98111
wire.Bind(new(EnvironmentRestHandler), new(*EnvironmentRestHandlerImpl)),
99112
NewEnvironmentRouterImpl,

api/helm-app/service/HelmAppService.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import (
2929
"github.com/devtron-labs/devtron/api/helm-app/service/read"
3030
"github.com/devtron-labs/devtron/internal/constants"
3131
repository2 "github.com/devtron-labs/devtron/internal/sql/repository/dockerRegistry"
32+
bean2 "github.com/devtron-labs/devtron/pkg/cluster/bean"
33+
"github.com/devtron-labs/devtron/pkg/cluster/environment"
3234
"github.com/go-pg/pg"
3335
"net/http"
3436
"reflect"
@@ -102,7 +104,7 @@ type HelmAppServiceImpl struct {
102104
serverDataStore *serverDataStore.ServerDataStore
103105
serverEnvConfig *serverEnvConfig.ServerEnvConfig
104106
appStoreApplicationVersionRepository appStoreDiscoverRepository.AppStoreApplicationVersionRepository
105-
environmentService cluster.EnvironmentService
107+
environmentService environment.EnvironmentService
106108
pipelineRepository pipelineConfig.PipelineRepository
107109
installedAppRepository repository.InstalledAppRepository
108110
appRepository app.AppRepository
@@ -116,7 +118,7 @@ func NewHelmAppServiceImpl(Logger *zap.SugaredLogger, clusterService cluster.Clu
116118
helmAppClient gRPC.HelmAppClient, pump connector.Pump, enforcerUtil rbac.EnforcerUtilHelm,
117119
serverDataStore *serverDataStore.ServerDataStore, serverEnvConfig *serverEnvConfig.ServerEnvConfig,
118120
appStoreApplicationVersionRepository appStoreDiscoverRepository.AppStoreApplicationVersionRepository,
119-
environmentService cluster.EnvironmentService, pipelineRepository pipelineConfig.PipelineRepository,
121+
environmentService environment.EnvironmentService, pipelineRepository pipelineConfig.PipelineRepository,
120122
installedAppRepository repository.InstalledAppRepository, appRepository app.AppRepository,
121123
clusterRepository clusterRepository.ClusterRepository, K8sUtil *k8s.K8sServiceImpl,
122124
helmReleaseConfig *HelmReleaseConfig,
@@ -584,7 +586,7 @@ func (impl *HelmAppServiceImpl) DeleteApplication(ctx context.Context, app *helm
584586
return response, nil
585587
}
586588

587-
func (impl *HelmAppServiceImpl) checkIfNsExists(namespace string, clusterBean *cluster.ClusterBean) (bool, error) {
589+
func (impl *HelmAppServiceImpl) checkIfNsExists(namespace string, clusterBean *bean2.ClusterBean) (bool, error) {
588590

589591
config := clusterBean.GetClusterConfig()
590592
v12Client, err := impl.K8sUtil.GetCoreV1Client(config)

0 commit comments

Comments
 (0)