From 97c8d80ea7ca8fc899733271e4e833e665c9aa07 Mon Sep 17 00:00:00 2001 From: GaoXiaodong <13814823514@163.com> Date: Thu, 10 Feb 2022 10:16:02 +0800 Subject: [PATCH] fix(application): rm app phase chart fetched (#1763) Co-authored-by: xdonggao --- api/application/types.go | 3 --- api/application/v1/types.go | 3 --- pkg/application/controller/app/action/pull.go | 8 -------- pkg/application/controller/app/app_controller.go | 2 -- 4 files changed, 16 deletions(-) diff --git a/api/application/types.go b/api/application/types.go index f11a79285..97668ca87 100644 --- a/api/application/types.go +++ b/api/application/types.go @@ -226,9 +226,6 @@ const ( type AppPhase string const ( - // ChartFetched means the chart to which the App refers - // has been fetched successfully - AppPhaseChartFetched AppPhase = "ChartFetched" // ChartFetchedFailed means the chart to which the App // refers could not be fetched. AppPhaseChartFetchFailed AppPhase = "ChartFetchFailed" diff --git a/api/application/v1/types.go b/api/application/v1/types.go index 189caaeca..18f1e6ba4 100644 --- a/api/application/v1/types.go +++ b/api/application/v1/types.go @@ -226,9 +226,6 @@ const ( type AppPhase string const ( - // ChartFetched means the chart to which the App refers - // has been fetched successfully - AppPhaseChartFetched AppPhase = "ChartFetched" // ChartFetchedFailed means the chart to which the App // refers could not be fetched. AppPhaseChartFetchFailed AppPhase = "ChartFetchFailed" diff --git a/pkg/application/controller/app/action/pull.go b/pkg/application/controller/app/action/pull.go index a3d01205d..8d3171d51 100644 --- a/pkg/application/controller/app/action/pull.go +++ b/pkg/application/controller/app/action/pull.go @@ -61,14 +61,6 @@ func Pull(ctx context.Context, updateStatusFunc(ctx, app, &app.Status, newStatus) return destfile, err } - newStatus.Phase = applicationv1.AppPhaseChartFetched - newStatus.Message = "" - newStatus.Reason = "" - newStatus.LastTransitionTime = metav1.Now() - _, err := updateStatusFunc(ctx, app, &app.Status, newStatus) - if err != nil { - return destfile, err - } } return destfile, err } diff --git a/pkg/application/controller/app/app_controller.go b/pkg/application/controller/app/app_controller.go index 2e8d37158..106693caa 100644 --- a/pkg/application/controller/app/app_controller.go +++ b/pkg/application/controller/app/app_controller.go @@ -341,8 +341,6 @@ func (c *Controller) handlePhase(ctx context.Context, key string, cachedApp *cac return c.syncAppFromRelease(ctx, cachedApp, app) case applicationv1.AppPhaseRollbackFailed: break - case applicationv1.AppPhaseChartFetched: - break case applicationv1.AppPhaseChartFetchFailed: break case applicationv1.AppPhaseSyncFailed: