Skip to content

Commit 240b4f5

Browse files
committed
git repo name fix
1 parent 08aeb44 commit 240b4f5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

client/fluxcd/fluxDeploymentService.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ func (impl *DeploymentServiceImpl) UpdateHelmRelease(ctx context.Context, fluxCd
317317
key := types.NamespacedName{Name: name, Namespace: namespace}
318318
existing := &helmv2.HelmRelease{}
319319

320+
gitRepositoryName, gitRepositoryNamespace := fluxCdSpec.GitRepositoryName, fluxCdSpec.GitRepositoryNamespace
321+
320322
err := apiClient.Get(ctx, key, existing)
321323
if err != nil {
322324
impl.logger.Errorw("error in getting helm release", "name", name, "namespace", namespace, "err", err)
@@ -333,8 +335,8 @@ func (impl *DeploymentServiceImpl) UpdateHelmRelease(ctx context.Context, fluxCd
333335
Version: fluxCdSpec.ChartVersion,
334336
SourceRef: helmv2.CrossNamespaceObjectReference{
335337
Kind: sourcev1.GitRepositoryKind,
336-
Name: name,
337-
Namespace: namespace,
338+
Name: gitRepositoryName,
339+
Namespace: gitRepositoryNamespace,
338340
},
339341
ValuesFiles: fluxCdSpec.GetFinalValuesFilePathArray(),
340342
},

0 commit comments

Comments
 (0)