Migrate flux events to Helm Source API v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -422,7 +422,7 @@ var fluxKindMap = refMap{
|
|||||||
gvk: helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind),
|
gvk: helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind),
|
||||||
crossNamespaced: true,
|
crossNamespaced: true,
|
||||||
otherRefs: func(namespace, name string) []string {
|
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"},
|
field: []string{"spec", "chart", "spec", "sourceRef"},
|
||||||
},
|
},
|
||||||
@@ -440,15 +440,15 @@ var fluxKindMap = refMap{
|
|||||||
crossNamespaced: true,
|
crossNamespaced: true,
|
||||||
field: []string{"spec", "imageRepositoryRef"},
|
field: []string{"spec", "imageRepositoryRef"},
|
||||||
},
|
},
|
||||||
sourcev1b2.HelmChartKind: {
|
sourcev1.HelmChartKind: {
|
||||||
gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.HelmChartKind),
|
gvk: sourcev1.GroupVersion.WithKind(sourcev1.HelmChartKind),
|
||||||
crossNamespaced: true,
|
crossNamespaced: true,
|
||||||
field: []string{"spec", "sourceRef"},
|
field: []string{"spec", "sourceRef"},
|
||||||
},
|
},
|
||||||
sourcev1.GitRepositoryKind: {gvk: sourcev1.GroupVersion.WithKind(sourcev1.GitRepositoryKind)},
|
sourcev1.GitRepositoryKind: {gvk: sourcev1.GroupVersion.WithKind(sourcev1.GitRepositoryKind)},
|
||||||
sourcev1b2.OCIRepositoryKind: {gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.OCIRepositoryKind)},
|
sourcev1b2.OCIRepositoryKind: {gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.OCIRepositoryKind)},
|
||||||
sourcev1b2.BucketKind: {gvk: sourcev1b2.GroupVersion.WithKind(sourcev1b2.BucketKind)},
|
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)},
|
autov1.ImageUpdateAutomationKind: {gvk: autov1.GroupVersion.WithKind(autov1.ImageUpdateAutomationKind)},
|
||||||
imagev1.ImageRepositoryKind: {gvk: imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)},
|
imagev1.ImageRepositoryKind: {gvk: imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ var reconcileSourceHelmChartCmd = &cobra.Command{
|
|||||||
|
|
||||||
# Trigger a reconciliation of the HelmCharts's source and apply changes
|
# Trigger a reconciliation of the HelmCharts's source and apply changes
|
||||||
flux reconcile helmchart podinfo --with-source`,
|
flux reconcile helmchart podinfo --with-source`,
|
||||||
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1b2.HelmChartKind)),
|
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.HelmChartKind)),
|
||||||
RunE: reconcileWithSourceCommand{
|
RunE: reconcileWithSourceCommand{
|
||||||
apiType: helmChartType,
|
apiType: helmChartType,
|
||||||
object: helmChartAdapter{&sourcev1.HelmChart{}},
|
object: helmChartAdapter{&sourcev1.HelmChart{}},
|
||||||
|
|||||||
Reference in New Issue
Block a user