Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Adds an input recieveing option to recieve input for argoCD transformer namespace. #1070

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ const (
ConfigServicesDotNetChildProjectsNamesKey = ConfigServicesKey + d + "%s" + d + "childProjects" + d + Special + d + "enable"
// ConfigServicesChildModulesSpringProfilesKey is the list of spring profiles for this child module. 1st arg is service name and 2nd is child module name.
ConfigServicesChildModulesSpringProfilesKey = ConfigServicesKey + d + "%s" + d + "childModules" + d + "%s" + d + "springBootProfiles"
// ConfigTransformersKubernetesArgocdNamespaceKey represents namespace key for argocd transformer
ConfigTransformersKubernetesArgocdNamespaceKey = ConfigTransformersKey + d + "kubernetes" + d + "argocd" + d + "namespace"
//VCSKey represents version control system key
VCSKey = BaseKey + d + "vcs"
//GitKey represents git qa key
Expand Down
13 changes: 12 additions & 1 deletion transformer/kubernetes/argocdtransformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

"github.com/konveyor/move2kube/common"
"github.com/konveyor/move2kube/environment"
"github.com/konveyor/move2kube/qaengine"
"github.com/konveyor/move2kube/transformer/kubernetes/apiresource"
"github.com/konveyor/move2kube/transformer/kubernetes/irpreprocessor"
collecttypes "github.com/konveyor/move2kube/types/collection"
Expand Down Expand Up @@ -152,8 +153,18 @@ func (t *ArgoCD) setupEnhancedIR(oldir irtypes.IR, projectName string) irtypes.E
return common.MakeStringDNSSubdomainNameCompliant(fmt.Sprintf("%s-%s", projectName, baseName))
}
appName := p(baseAppName)
destNamespace := qaengine.FetchStringAnswer(
common.ConfigTransformersKubernetesArgocdNamespaceKey,
"Enter the namespace where argocd pipeline to be deployed",
[]string{"If this is not relevant to you then give an empty string to use the default value for it."},
"",
nil,
)
ir.ArgoCDResources = irtypes.ArgoCDResources{
Applications: []irtypes.Application{{Name: appName}},
Applications: []irtypes.Application{{
Name: appName,
DestNamespace: destNamespace,
}},
}
return ir
}