Skip to content

Commit 2f998d9

Browse files
committed
(opt) reduce number of times fetchClusterObjects is invoked
1 parent 0b8188b commit 2f998d9

10 files changed

+487
-263
lines changed

controllers/clustersummary_controller.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,10 +1966,21 @@ func getClusterSummaryWithInstantiatedCharts(ctx context.Context, cs *configv1be
19661966
csCopy.Spec.ClusterProfileSpec.HelmCharts = make([]configv1beta1.HelmChart,
19671967
len(cs.Spec.ClusterProfileSpec.HelmCharts))
19681968

1969+
clusterObjects, err := fetchClusterObjects(ctx, getManagementClusterConfig(), getManagementClusterClient(),
1970+
cs.Spec.ClusterNamespace, cs.Spec.ClusterName, cs.Spec.ClusterType, logger)
1971+
if err != nil {
1972+
logger.V(logs.LogInfo).Error(err, "failed to fetch resources")
1973+
return nil, err
1974+
}
1975+
innerDCtx := &deploymentContext{
1976+
clusterSummary: cs,
1977+
clusterObjects: clusterObjects,
1978+
mgmtResources: mgmtResources,
1979+
}
1980+
19691981
for i := range cs.Spec.ClusterProfileSpec.HelmCharts {
19701982
helmChart := &cs.Spec.ClusterProfileSpec.HelmCharts[i]
1971-
instantiateHelmChart, err := getInstantiatedChart(ctx, cs,
1972-
helmChart, mgmtResources, logger)
1983+
instantiateHelmChart, err := getInstantiatedChart(ctx, innerDCtx, helmChart, logger)
19731984
if err != nil {
19741985
return nil, err
19751986
}

controllers/deployment_context.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
Copyright 2022-26. projectsveltos.io. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package controllers
18+
19+
import (
20+
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
21+
22+
configv1beta1 "github.com/projectsveltos/addon-controller/api/v1beta1"
23+
)
24+
25+
// deploymentContext bundles the per-reconciliation data threaded through most
26+
// deployment functions, avoiding long repeated argument lists.
27+
type deploymentContext struct {
28+
clusterSummary *configv1beta1.ClusterSummary
29+
clusterObjects *currentClusterObjects
30+
mgmtResources map[string]*unstructured.Unstructured
31+
}

controllers/export_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ limitations under the License.
1616

1717
package controllers
1818

19+
import (
20+
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
21+
22+
configv1beta1 "github.com/projectsveltos/addon-controller/api/v1beta1"
23+
)
24+
1925
var (
2026
UpdateClusterSummaries = updateClusterSummaries
2127
CreateClusterSummary = createClusterSummary
@@ -214,3 +220,17 @@ var (
214220
type (
215221
ReferencedObject = referencedObject
216222
)
223+
224+
// NewDeploymentContext constructs a deploymentContext for use in tests.
225+
func NewDeploymentContext(
226+
clusterSummary *configv1beta1.ClusterSummary,
227+
clusterObjects *currentClusterObjects,
228+
mgmtResources map[string]*unstructured.Unstructured,
229+
) *deploymentContext {
230+
231+
return &deploymentContext{
232+
clusterSummary: clusterSummary,
233+
clusterObjects: clusterObjects,
234+
mgmtResources: mgmtResources,
235+
}
236+
}

controllers/handlers_helm.go

Lines changed: 243 additions & 166 deletions
Large diffs are not rendered by default.

controllers/handlers_helm_test.go

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ var _ = Describe("HandlersHelm", func() {
164164
HelmChartAction: configv1beta1.HelmChartActionInstall,
165165
}
166166
Expect(controllers.ShouldUpgrade(context.TODO(), currentRelease, requestChart,
167-
clusterSummary, nil, textlogger.NewLogger(textlogger.NewConfig()))).To(BeTrue())
167+
controllers.NewDeploymentContext(clusterSummary, nil, nil),
168+
textlogger.NewLogger(textlogger.NewConfig()))).To(BeTrue())
168169
})
169170

170171
It("UpdateStatusForeferencedHelmReleases updates ClusterSummary.Status.HelmReleaseSummaries", func() {
@@ -367,8 +368,13 @@ var _ = Describe("HandlersHelm", func() {
367368

368369
manager.RegisterClusterSummaryForCharts(clusterSummary)
369370

371+
clusterObjects, err := controllers.FetchClusterObjects(context.TODO(), testEnv.Config, testEnv.Client,
372+
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, libsveltosv1beta1.ClusterTypeCapi,
373+
textlogger.NewLogger(textlogger.NewConfig()))
374+
Expect(err).To(BeNil())
375+
370376
clusterSummary, err = controllers.UpdateStatusForNonReferencedHelmReleases(context.TODO(), testEnv.Client,
371-
clusterSummary, nil, textlogger.NewLogger(textlogger.NewConfig()))
377+
controllers.NewDeploymentContext(clusterSummary, clusterObjects, nil), textlogger.NewLogger(textlogger.NewConfig()))
372378
Expect(err).To(BeNil())
373379

374380
Eventually(func() bool {
@@ -499,7 +505,13 @@ var _ = Describe("HandlersHelm", func() {
499505
Expect(testEnv.Create(context.TODO(), clusterSummary)).To(Succeed())
500506
Expect(waitForObject(context.TODO(), testEnv.Client, clusterSummary)).To(Succeed())
501507

502-
instaniatedChart, err := controllers.GetInstantiatedChart(context.TODO(), clusterSummary, helmChart, nil,
508+
clusterObjects, err := controllers.FetchClusterObjects(context.TODO(), testEnv.Config, testEnv.Client,
509+
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, libsveltosv1beta1.ClusterTypeCapi,
510+
textlogger.NewLogger(textlogger.NewConfig()))
511+
Expect(err).To(BeNil())
512+
513+
instaniatedChart, err := controllers.GetInstantiatedChart(context.TODO(),
514+
controllers.NewDeploymentContext(clusterSummary, clusterObjects, nil), helmChart,
503515
textlogger.NewLogger(textlogger.NewConfig()))
504516
Expect(err).To(BeNil())
505517
Expect(instaniatedChart.ReleaseName).To(Equal(helmChart.ReleaseName))
@@ -544,7 +556,13 @@ var _ = Describe("HandlersHelm", func() {
544556
Expect(testEnv.Create(context.TODO(), clusterSummary)).To(Succeed())
545557
Expect(waitForObject(context.TODO(), testEnv.Client, clusterSummary)).To(Succeed())
546558

547-
instaniatedChart, err := controllers.GetInstantiatedChart(context.TODO(), clusterSummary, helmChart, nil,
559+
clusterObjects, err := controllers.FetchClusterObjects(context.TODO(), testEnv.Config, testEnv.Client,
560+
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, libsveltosv1beta1.ClusterTypeSveltos,
561+
textlogger.NewLogger(textlogger.NewConfig()))
562+
Expect(err).To(BeNil())
563+
564+
instaniatedChart, err := controllers.GetInstantiatedChart(context.TODO(),
565+
controllers.NewDeploymentContext(clusterSummary, clusterObjects, nil), helmChart,
548566
textlogger.NewLogger(textlogger.NewConfig()))
549567
Expect(err).To(BeNil())
550568
Expect(instaniatedChart.ReleaseName).To(Equal(helmChart.ReleaseName))

controllers/handlers_kustomize.go

Lines changed: 60 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,12 @@ func kustomizationHash(ctx context.Context, c client.Client, clusterSummary *con
355355
hash := sha256.Sum256(raw)
356356
config += hex.EncodeToString((hash[:]))
357357

358+
clusterObjects, err := fetchClusterObjects(ctx, getManagementClusterConfig(), getManagementClusterClient(),
359+
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, clusterSummary.Spec.ClusterType, logger)
360+
if err != nil {
361+
return nil, err
362+
}
363+
358364
for i := range sortedKustomizationRefs {
359365
kustomizationRef := &sortedKustomizationRefs[i]
360366

@@ -370,7 +376,7 @@ func kustomizationHash(ctx context.Context, c client.Client, clusterSummary *con
370376
config += fmt.Sprintf("%d", kustomizationRef.Tier)
371377

372378
valueFromHash, err := getKustomizeReferenceResourceHash(ctx, c, clusterSummary,
373-
kustomizationRef, logger)
379+
kustomizationRef, clusterObjects, logger)
374380
if err != nil {
375381
logger.V(logs.LogInfo).Info(
376382
fmt.Sprintf("failed to get hash from referenced ConfigMap/Secret in ValuesFrom %v", err))
@@ -461,27 +467,20 @@ func getHashFromKustomizationRef(ctx context.Context, c client.Client, clusterSu
461467

462468
// instantiateKustomizeSubstituteValues gets all substitute values for a KustomizationRef and
463469
// instantiate those using resources in the management cluster.
464-
func instantiateKustomizeSubstituteValues(ctx context.Context, clusterSummary *configv1beta1.ClusterSummary,
465-
mgmtResources map[string]*unstructured.Unstructured, values map[string]string, logger logr.Logger,
466-
) (map[string]string, error) {
470+
func instantiateKustomizeSubstituteValues(ctx context.Context, dCtx *deploymentContext,
471+
values map[string]string, logger logr.Logger) (map[string]string, error) {
467472

468473
stringifiedValues, err := stringifyMap(values)
469474
if err != nil {
470475
logger.V(logs.LogInfo).Info(fmt.Sprintf("failed to stringify values map: %v", err))
471476
return nil, err
472477
}
473478

474-
requestorName := clusterSummary.Namespace + clusterSummary.Name + "kustomize"
475-
476-
objects, err := fetchClusterObjects(ctx, getManagementClusterConfig(), getManagementClusterClient(),
477-
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, clusterSummary.Spec.ClusterType, logger)
478-
if err != nil {
479-
return nil, err
480-
}
479+
requestorName := dCtx.clusterSummary.Namespace + dCtx.clusterSummary.Name + "kustomize"
481480

482481
instantiatedValue, err :=
483482
instantiateTemplateValues(ctx, getManagementClusterConfig(), getManagementClusterClient(),
484-
clusterSummary, requestorName, stringifiedValues, objects, mgmtResources, logger)
483+
dCtx.clusterSummary, requestorName, stringifiedValues, dCtx.clusterObjects, dCtx.mgmtResources, logger)
485484
if err != nil {
486485
logger.V(logs.LogInfo).Info(fmt.Sprintf("failed to instantiate values %v", err))
487486
return nil, err
@@ -617,13 +616,18 @@ func getKustomizeValuesFrom(ctx context.Context, c client.Client, clusterSummary
617616
}
618617

619618
func getKustomizeReferenceResourceHash(ctx context.Context, c client.Client, clusterSummary *configv1beta1.ClusterSummary,
620-
kustomizationRef *configv1beta1.KustomizationRef, logger logr.Logger) (string, error) {
619+
kustomizationRef *configv1beta1.KustomizationRef, clusterObjects *currentClusterObjects, logger logr.Logger) (string, error) {
621620

622621
mgmtResources, err := collectTemplateResourceRefs(ctx, clusterSummary)
623622
if err != nil {
624623
logger.V(logs.LogInfo).Error(err, "failed to collect templateResourceRefs")
625624
return "", err
626625
}
626+
innerDCtx := &deploymentContext{
627+
clusterSummary: clusterSummary,
628+
clusterObjects: clusterObjects,
629+
mgmtResources: mgmtResources,
630+
}
627631

628632
// Get key-value pairs from ValuesFrom
629633
templatedValues, nonTemplatedValues, err := getKustomizeSubstituteValues(ctx, c, clusterSummary, kustomizationRef, logger)
@@ -635,7 +639,8 @@ func getKustomizeReferenceResourceHash(ctx context.Context, c client.Client, clu
635639
// Get substitute values. Those are collected from Data sections of referenced ConfigMap/Secret instances.
636640
// Those values can be expressed as template. This method instantiates those using resources in
637641
// the managemenet cluster
638-
instantiatedSubstituteValues, err := instantiateKustomizeSubstituteValues(ctx, clusterSummary, mgmtResources, templatedValues, logger)
642+
instantiatedSubstituteValues, err := instantiateKustomizeSubstituteValues(ctx, innerDCtx,
643+
templatedValues, logger)
639644
if err != nil {
640645
logger.V(logs.LogInfo).Error(err, "failed to instantiate kustomize substitute values")
641646
return "", err
@@ -669,11 +674,11 @@ func getKustomizationRefs(clusterSummary *configv1beta1.ClusterSummary) []config
669674
}
670675

671676
func deployKustomizeRef(ctx context.Context, c client.Client, remoteRestConfig *rest.Config,
672-
kustomizationRef *configv1beta1.KustomizationRef, clusterSummary *configv1beta1.ClusterSummary,
673-
logger logr.Logger) (localReports, remoteReports []libsveltosv1beta1.ResourceReport, err error) {
677+
kustomizationRef *configv1beta1.KustomizationRef, dCtx *deploymentContext, logger logr.Logger,
678+
) (localReports, remoteReports []libsveltosv1beta1.ResourceReport, err error) {
674679

675680
var tmpDir string
676-
tmpDir, err = prepareFileSystem(ctx, c, kustomizationRef, clusterSummary, logger)
681+
tmpDir, err = prepareFileSystem(ctx, c, kustomizationRef, dCtx.clusterSummary, logger)
677682
if err != nil {
678683
return nil, nil, err
679684
}
@@ -684,15 +689,9 @@ func deployKustomizeRef(ctx context.Context, c client.Client, remoteRestConfig *
684689

685690
defer os.RemoveAll(tmpDir)
686691

687-
objects, err := fetchClusterObjects(ctx, getManagementClusterConfig(), getManagementClusterClient(),
688-
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, clusterSummary.Spec.ClusterType, logger)
689-
if err != nil {
690-
return nil, nil, err
691-
}
692-
693692
// Path can be expressed as a template and instantiate using Cluster fields.
694693
instantiatedPath, err := instantiateTemplateValues(ctx, getManagementClusterConfig(), getManagementClusterClient(),
695-
clusterSummary, clusterSummary.GetName(), kustomizationRef.Path, objects, nil, logger)
694+
dCtx.clusterSummary, dCtx.clusterSummary.GetName(), kustomizationRef.Path, dCtx.clusterObjects, nil, logger)
696695
if err != nil {
697696
return nil, nil, err
698697
}
@@ -703,7 +702,7 @@ func deployKustomizeRef(ctx context.Context, c client.Client, remoteRestConfig *
703702
var instantiatedComponents []string
704703
for _, comp := range kustomizationRef.Components {
705704
instantiatedComp, err := instantiateTemplateValues(ctx, getManagementClusterConfig(), getManagementClusterClient(),
706-
clusterSummary, clusterSummary.GetName(), comp, objects, nil, logger)
705+
dCtx.clusterSummary, dCtx.clusterSummary.GetName(), comp, dCtx.clusterObjects, nil, logger)
707706
if err != nil {
708707
return nil, nil, err
709708
}
@@ -771,7 +770,8 @@ func deployKustomizeRef(ctx context.Context, c client.Client, remoteRestConfig *
771770
return nil, nil, err
772771
}
773772

774-
return deployKustomizeResources(ctx, c, remoteRestConfig, kustomizationRef, resMap, clusterSummary, logger)
773+
return deployKustomizeResources(ctx, c, remoteRestConfig, kustomizationRef, resMap,
774+
dCtx, logger)
775775
}
776776

777777
func prepareFileSystem(ctx context.Context, c client.Client,
@@ -894,13 +894,18 @@ func prepareFileSystemWithData(binaryData map[string][]byte,
894894

895895
func getKustomizedResources(ctx context.Context, c client.Client, clusterSummary *configv1beta1.ClusterSummary,
896896
deploymentType configv1beta1.DeploymentType, resMap resmap.ResMap,
897-
kustomizationRef *configv1beta1.KustomizationRef, logger logr.Logger,
897+
kustomizationRef *configv1beta1.KustomizationRef, clusterObjects *currentClusterObjects, logger logr.Logger,
898898
) (objectsToDeployLocally, objectsToDeployRemotely []*unstructured.Unstructured, mgmtResources map[string]*unstructured.Unstructured, err error) {
899899

900900
mgmtResources, err = collectTemplateResourceRefs(ctx, clusterSummary)
901901
if err != nil {
902902
return nil, nil, nil, err
903903
}
904+
innerDCtx := &deploymentContext{
905+
clusterSummary: clusterSummary,
906+
clusterObjects: clusterObjects,
907+
mgmtResources: mgmtResources,
908+
}
904909

905910
// Get key-value pairs from ValuesFrom
906911
templatedValues, nonTemplatedValues, err := getKustomizeSubstituteValues(ctx, c, clusterSummary, kustomizationRef, logger)
@@ -911,7 +916,8 @@ func getKustomizedResources(ctx context.Context, c client.Client, clusterSummary
911916
// Get substitute values. Those are collected from Data sections of referenced ConfigMap/Secret instances.
912917
// Those values can be expressed as template. This method instantiates those using resources in
913918
// the managemenet cluster
914-
instantiatedSubstituteValues, err := instantiateKustomizeSubstituteValues(ctx, clusterSummary, mgmtResources, templatedValues, logger)
919+
instantiatedSubstituteValues, err := instantiateKustomizeSubstituteValues(ctx, innerDCtx,
920+
templatedValues, logger)
915921
if err != nil {
916922
return nil, nil, nil, err
917923
}
@@ -968,23 +974,23 @@ func getKustomizedResources(ctx context.Context, c client.Client, clusterSummary
968974

969975
func deployKustomizeResources(ctx context.Context, c client.Client, remoteRestConfig *rest.Config,
970976
kustomizationRef *configv1beta1.KustomizationRef, resMap resmap.ResMap,
971-
clusterSummary *configv1beta1.ClusterSummary, logger logr.Logger,
977+
dCtx *deploymentContext, logger logr.Logger,
972978
) (localReports, remoteReports []libsveltosv1beta1.ResourceReport, err error) {
973979

974980
// Assume that if objects are deployed in the management clusters, those are needed before any resource is deployed
975981
// in the managed cluster. So try to deploy those first if any.
976982

977983
localConfig := rest.CopyConfig(getManagementClusterConfig())
978-
adminNamespace, adminName := getClusterSummaryAdmin(clusterSummary)
984+
adminNamespace, adminName := getClusterSummaryAdmin(dCtx.clusterSummary)
979985
if adminName != "" {
980986
localConfig.Impersonate = rest.ImpersonationConfig{
981987
UserName: fmt.Sprintf("system:serviceaccount:%s:%s", adminNamespace, adminName),
982988
}
983989
}
984990

985991
objectsToDeployLocally, objectsToDeployRemotely, _, err :=
986-
getKustomizedResources(ctx, c, clusterSummary, kustomizationRef.DeploymentType, resMap,
987-
kustomizationRef, logger)
992+
getKustomizedResources(ctx, c, dCtx.clusterSummary, kustomizationRef.DeploymentType, resMap,
993+
kustomizationRef, dCtx.clusterObjects, logger)
988994
if err != nil {
989995
return nil, nil, err
990996
}
@@ -996,7 +1002,7 @@ func deployKustomizeResources(ctx context.Context, c client.Client, remoteRestCo
9961002
}
9971003
localReports, err = deployUnstructured(ctx, true, localConfig, c, objectsToDeployLocally,
9981004
ref, kustomizationRef.Tier, kustomizationRef.SkipNamespaceCreation, libsveltosv1beta1.FeatureKustomize,
999-
clusterSummary, []string{}, logger)
1005+
dCtx.clusterSummary, []string{}, logger)
10001006
if err != nil {
10011007
logger.V(logs.LogInfo).Info(fmt.Sprintf("failed to deploy to management cluster %v", err))
10021008
return localReports, nil, err
@@ -1012,8 +1018,8 @@ func deployKustomizeResources(ctx context.Context, c client.Client, remoteRestCo
10121018
kustomizationRef.SkipNamespaceCreation)
10131019

10141020
return localReports, nil, pullmode.StageResourcesForDeployment(ctx, getManagementClusterClient(),
1015-
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, configv1beta1.ClusterSummaryKind,
1016-
clusterSummary.Name, string(libsveltosv1beta1.FeatureKustomize), bundleResources, false, logger, setters...)
1021+
dCtx.clusterSummary.Spec.ClusterNamespace, dCtx.clusterSummary.Spec.ClusterName, configv1beta1.ClusterSummaryKind,
1022+
dCtx.clusterSummary.Name, string(libsveltosv1beta1.FeatureKustomize), bundleResources, false, logger, setters...)
10171023
}
10181024

10191025
remoteClient, err := client.New(remoteRestConfig, client.Options{})
@@ -1023,7 +1029,7 @@ func deployKustomizeResources(ctx context.Context, c client.Client, remoteRestCo
10231029

10241030
remoteReports, err = deployUnstructured(ctx, false, remoteRestConfig, remoteClient, objectsToDeployRemotely,
10251031
ref, kustomizationRef.Tier, kustomizationRef.SkipNamespaceCreation, libsveltosv1beta1.FeatureKustomize,
1026-
clusterSummary, []string{}, logger)
1032+
dCtx.clusterSummary, []string{}, logger)
10271033
if err != nil {
10281034
logger.V(logs.LogInfo).Info(fmt.Sprintf("failed to deploy to remote cluster %v", err))
10291035
return localReports, remoteReports, err
@@ -1141,14 +1147,31 @@ func deployEachKustomizeRefs(ctx context.Context, c client.Client, remoteRestCon
11411147
clusterSummary *configv1beta1.ClusterSummary, logger logr.Logger,
11421148
) (localResourceReports, remoteResourceReports []libsveltosv1beta1.ResourceReport, err error) {
11431149

1150+
clusterObjects, err := fetchClusterObjects(ctx, getManagementClusterConfig(), getManagementClusterClient(),
1151+
clusterSummary.Spec.ClusterNamespace, clusterSummary.Spec.ClusterName, clusterSummary.Spec.ClusterType, logger)
1152+
if err != nil {
1153+
return nil, nil, err
1154+
}
1155+
1156+
mgmtResources, err := collectTemplateResourceRefs(ctx, clusterSummary)
1157+
if err != nil {
1158+
return nil, nil, err
1159+
}
1160+
dCtx := &deploymentContext{
1161+
clusterSummary: clusterSummary,
1162+
clusterObjects: clusterObjects,
1163+
mgmtResources: mgmtResources,
1164+
}
1165+
11441166
capacity := len(clusterSummary.Spec.ClusterProfileSpec.KustomizationRefs)
11451167
localResourceReports = make([]libsveltosv1beta1.ResourceReport, 0, capacity)
11461168
remoteResourceReports = make([]libsveltosv1beta1.ResourceReport, 0, capacity)
11471169
for i := range clusterSummary.Spec.ClusterProfileSpec.KustomizationRefs {
11481170
kustomizationRef := &clusterSummary.Spec.ClusterProfileSpec.KustomizationRefs[i]
11491171
var tmpLocal []libsveltosv1beta1.ResourceReport
11501172
var tmpRemote []libsveltosv1beta1.ResourceReport
1151-
tmpLocal, tmpRemote, err = deployKustomizeRef(ctx, c, remoteRestConfig, kustomizationRef, clusterSummary, logger)
1173+
tmpLocal, tmpRemote, err = deployKustomizeRef(ctx, c, remoteRestConfig, kustomizationRef,
1174+
dCtx, logger)
11521175
if err != nil {
11531176
return nil, nil, err
11541177
}

0 commit comments

Comments
 (0)