1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Migrate flux events to Helm Source API v1

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2024-05-06 15:15:38 +03:00
parent 6baefa2586
commit 315c53a717
2 changed files with 5 additions and 5 deletions

View File

@@ -422,7 +422,7 @@ var fluxKindMap = refMap{
gvk: helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind),
crossNamespaced: true,
otherRefs: func(namespace, name string) []string {
return []string{fmt.Sprintf("%s/%s-%s", sourcev1b2.HelmChartKind, namespace, name)}
return []string{fmt.Sprintf("%s/%s-%s", sourcev1.HelmChartKind, namespace, name)}
},
field: []string{"spec", "chart", "spec", "sourceRef"},
},
@@ -440,15 +440,15 @@ var fluxKindMap = refMap{
crossNamespaced: true,
field: []string{"spec", "imageRepositoryRef"},
},
sourcev1b2.HelmChartKind: {
gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.HelmChartKind),
sourcev1.HelmChartKind: {
gvk: sourcev1.GroupVersion.WithKind(sourcev1.HelmChartKind),
crossNamespaced: true,
field: []string{"spec", "sourceRef"},
},
sourcev1.GitRepositoryKind: {gvk: sourcev1.GroupVersion.WithKind(sourcev1.GitRepositoryKind)},
sourcev1b2.OCIRepositoryKind: {gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.OCIRepositoryKind)},
sourcev1b2.BucketKind: {gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.BucketKind)},
sourcev1b2.HelmRepositoryKind: {gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.HelmRepositoryKind)},
sourcev1.HelmRepositoryKind: {gvk: sourcev1.GroupVersion.WithKind(sourcev1.HelmRepositoryKind)},
autov1.ImageUpdateAutomationKind: {gvk: autov1.GroupVersion.WithKind(autov1.ImageUpdateAutomationKind)},
imagev1.ImageRepositoryKind: {gvk: imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)},
}

View File

@@ -33,7 +33,7 @@ var reconcileSourceHelmChartCmd = &cobra.Command{
# Trigger a reconciliation of the HelmCharts's source and apply changes
flux reconcile helmchart podinfo --with-source`,
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1b2.HelmChartKind)),
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.HelmChartKind)),
RunE: reconcileWithSourceCommand{
apiType: helmChartType,
object: helmChartAdapter{&sourcev1.HelmChart{}},