Skip to content

Commit 4d108cf

Browse files
committed
updated feature flag name
1 parent a74e685 commit 4d108cf

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

pkg/commonService/CommonBaseService.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ func NewCommonBaseServiceImpl(logger *zap.SugaredLogger, envVariables *util.Envi
4444

4545
func (impl *CommonBaseServiceImpl) isGitOpsEnable() (*FeatureGitOpsVariables, error) {
4646
featureGitOpsFlags := &FeatureGitOpsVariables{
47-
IsFeatureArgoCdMigrationEnabled: impl.globalEnvVariables.DeploymentServiceTypeConfig.EnableMigrateArgoCdApplication,
47+
IsFeatureArgoCdMigrationEnabled: impl.globalEnvVariables.DeploymentServiceTypeConfig.IsFeatureMigrateArgoCdApplicationEnable(),
4848
}
4949
argoModule, err := impl.moduleReadService.GetModuleInfoByName(bean.ModuleNameArgoCd)
5050
if err != nil && !errors.Is(err, moduleErr.ModuleNotFoundError) {
5151
impl.logger.Errorw("error in getting argo module", "error", err)
5252
return featureGitOpsFlags, err
5353
}
54-
if !impl.globalEnvVariables.DeploymentServiceTypeConfig.EnableMigrateArgoCdApplication {
54+
if !impl.globalEnvVariables.DeploymentServiceTypeConfig.IsFeatureMigrateArgoCdApplicationEnable() {
5555
featureGitOpsFlags.IsFeatureGitOpsEnabled = argoModule.IsInstalled()
5656
featureGitOpsFlags.IsFeatureUserDefinedGitOpsEnabled = argoModule.IsInstalled()
5757
return featureGitOpsFlags, nil

util/GlobalConfig.go

+11-6
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ type EnvironmentVariables struct {
2929
InternalEnvVariables *InternalEnvVariables
3030
}
3131

32+
// CATEGORY=CD
3233
type DeploymentServiceTypeConfig struct {
33-
ExternallyManagedDeploymentType bool `env:"IS_INTERNAL_USE" envDefault:"false"`
34-
HelmInstallASyncMode bool `env:"RUN_HELM_INSTALL_IN_ASYNC_MODE_HELM_APPS" envDefault:"false"`
35-
UseDeploymentConfigData bool `env:"USE_DEPLOYMENT_CONFIG_DATA" envDefault:"false"`
36-
MigrateDeploymentConfigData bool `json:"MIGRATE_DEPLOYMENT_CONFIG_DATA" envDefault:"false" description:"migrate deployment config data from charts table to deployment_config table" deprecated:"false"`
37-
EnableMigrateArgoCdApplication bool `env:"ENABLE_MIGRATE_ARGOCD_APPLICATION" envDefault:"false" description:"enable migration of external argocd application to devtron pipeline" deprecated:"false"`
38-
ShouldCheckNamespaceOnClone bool `env:"SHOULD_CHECK_NAMESPACE_ON_CLONE" envDefault:"false" description:"should we check if namespace exists or not while cloning app" deprecated:"false"`
34+
ExternallyManagedDeploymentType bool `env:"IS_INTERNAL_USE" envDefault:"false"`
35+
HelmInstallASyncMode bool `env:"RUN_HELM_INSTALL_IN_ASYNC_MODE_HELM_APPS" envDefault:"false"`
36+
UseDeploymentConfigData bool `env:"USE_DEPLOYMENT_CONFIG_DATA" envDefault:"false"`
37+
MigrateDeploymentConfigData bool `env:"MIGRATE_DEPLOYMENT_CONFIG_DATA" envDefault:"false" description:"migrate deployment config data from charts table to deployment_config table" deprecated:"false"`
38+
FeatureMigrateArgoCdApplicationEnable bool `env:"FEATURE_MIGRATE_ARGOCD_APPLICATION_ENABLE" envDefault:"false" description:"enable migration of external argocd application to devtron pipeline" deprecated:"false"`
39+
ShouldCheckNamespaceOnClone bool `env:"SHOULD_CHECK_NAMESPACE_ON_CLONE" envDefault:"false" description:"should we check if namespace exists or not while cloning app" deprecated:"false"`
40+
}
41+
42+
func (d *DeploymentServiceTypeConfig) IsFeatureMigrateArgoCdApplicationEnable() bool {
43+
return false
3944
}
4045

4146
type GlobalEnvVariables struct {

0 commit comments

Comments
 (0)