@@ -1053,15 +1053,6 @@ func sanitizeRepoName(repoName string) string {
1053
1053
return strings .ReplaceAll (repoName , "/" , "-" )
1054
1054
}
1055
1055
1056
- func repoExists (repo string , repos []* v1alpha1.Repository ) bool {
1057
- for _ , r := range repos {
1058
- if strings .TrimPrefix (repo , ociPrefix ) == strings .TrimPrefix (r .Repo , ociPrefix ) {
1059
- return true
1060
- }
1061
- }
1062
- return false
1063
- }
1064
-
1065
1056
func isConcurrencyAllowed (appPath string ) bool {
1066
1057
if _ , err := os .Stat (path .Join (appPath , allowConcurrencyFile )); err == nil {
1067
1058
return true
@@ -1097,32 +1088,6 @@ func runHelmBuild(appPath string, h helm.Helm) error {
1097
1088
return os .WriteFile (markerFile , []byte ("marker" ), 0644 )
1098
1089
}
1099
1090
1100
- func populateRequestRepos (appPath string , q * apiclient.ManifestRequest ) error {
1101
- repos , err := getHelmDependencyRepos (appPath )
1102
- if err != nil {
1103
- return err
1104
- }
1105
-
1106
- for _ , r := range repos {
1107
- if ! repoExists (r .Repo , q .Repos ) {
1108
- repositoryCredential := getRepoCredential (q .HelmRepoCreds , r .Repo )
1109
- if repositoryCredential != nil {
1110
- if repositoryCredential .EnableOCI {
1111
- r .Repo = strings .TrimPrefix (r .Repo , ociPrefix )
1112
- }
1113
- r .EnableOCI = repositoryCredential .EnableOCI
1114
- r .Password = repositoryCredential .Password
1115
- r .Username = repositoryCredential .Username
1116
- r .SSHPrivateKey = repositoryCredential .SSHPrivateKey
1117
- r .TLSClientCertData = repositoryCredential .TLSClientCertData
1118
- r .TLSClientCertKey = repositoryCredential .TLSClientCertKey
1119
- }
1120
- q .Repos = append (q .Repos , r )
1121
- }
1122
- }
1123
- return nil
1124
- }
1125
-
1126
1091
func helmTemplate (appPath string , repoRoot string , env * v1alpha1.Env , q * apiclient.ManifestRequest , isLocal bool , gitRepoPaths io.TempPaths ) ([]manifest , error ) {
1127
1092
concurrencyAllowed := isConcurrencyAllowed (appPath )
1128
1093
if ! concurrencyAllowed {
@@ -1402,28 +1367,15 @@ func GenerateManifests(ctx context.Context, appPath, repoRoot, revision string,
1402
1367
case v1alpha1 .ApplicationSourceTypeKustomize :
1403
1368
manifests , err = kustomizeBuild (repoURL , repoRoot , appPath , q .Repo .GetGitCreds (gitCredsStore ), q .ApplicationSource .Kustomize , q .KustomizeOptions , env , q .Namespace )
1404
1369
case v1alpha1 .ApplicationSourceTypePlugin :
1405
- var plugin * v1alpha1.ConfigManagementPlugin
1406
- if q .ApplicationSource .Plugin != nil && q .ApplicationSource .Plugin .Name != "" {
1407
- plugin = findPlugin (q .Plugins , q .ApplicationSource .Plugin .Name )
1370
+ // if the named plugin was not found in argocd-cm try sidecar plugin
1371
+ pluginName := ""
1372
+ if q .ApplicationSource .Plugin != nil {
1373
+ pluginName = q .ApplicationSource .Plugin .Name
1408
1374
}
1409
- if plugin != nil {
1410
- // argocd-cm deprecated plugin is being used
1411
- manifests , err = runConfigManagementPlugin (appPath , repoRoot , env , q , q .Repo .GetGitCreds (gitCredsStore ), plugin )
1412
- log .WithFields (map [string ]interface {}{
1413
- "application" : q .AppName ,
1414
- "plugin" : q .ApplicationSource .Plugin .Name ,
1415
- }).Warnf (common .ConfigMapPluginDeprecationWarning )
1416
- } else {
1417
- // if the named plugin was not found in argocd-cm try sidecar plugin
1418
- pluginName := ""
1419
- if q .ApplicationSource .Plugin != nil {
1420
- pluginName = q .ApplicationSource .Plugin .Name
1421
- }
1422
- // if pluginName is provided it has to be `<metadata.name>-<spec.version>` or just `<metadata.name>` if plugin version is empty
1423
- manifests , err = runConfigManagementPluginSidecars (ctx , appPath , repoRoot , pluginName , env , q , q .Repo .GetGitCreds (gitCredsStore ), opt .cmpTarDoneCh , opt .cmpTarExcludedGlobs )
1424
- if err != nil {
1425
- err = fmt .Errorf ("plugin sidecar failed. %s" , err .Error ())
1426
- }
1375
+ // if pluginName is provided it has to be `<metadata.name>-<spec.version>` or just `<metadata.name>` if plugin version is empty
1376
+ manifests , err = runConfigManagementPluginSidecars (ctx , appPath , repoRoot , pluginName , env , q , q .Repo .GetGitCreds (gitCredsStore ), opt .cmpTarDoneCh , opt .cmpTarExcludedGlobs )
1377
+ if err != nil {
1378
+ err = fmt .Errorf ("plugin sidecar failed. %s" , err .Error ())
1427
1379
}
1428
1380
case v1alpha1 .ApplicationSourceTypeDirectory :
1429
1381
var directory * v1alpha1.ApplicationSourceDirectory
0 commit comments