Migrate flux trace to Helm Source API v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -388,10 +388,10 @@ func traceHelm(ctx context.Context, kubeClient client.Client, hrName types.Names
|
||||
}
|
||||
hrReady := meta.FindStatusCondition(hr.Status.Conditions, fluxmeta.ReadyCondition)
|
||||
|
||||
var hrChart *sourcev1b2.HelmChart
|
||||
var hrChart *sourcev1.HelmChart
|
||||
var hrChartReady *metav1.Condition
|
||||
if chart := hr.Status.HelmChart; chart != "" {
|
||||
hrChart = &sourcev1b2.HelmChart{}
|
||||
hrChart = &sourcev1.HelmChart{}
|
||||
err = kubeClient.Get(ctx, utils.ParseNamespacedName(chart), hrChart)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to find HelmChart: %w", err)
|
||||
@@ -417,10 +417,10 @@ func traceHelm(ctx context.Context, kubeClient client.Client, hrName types.Names
|
||||
hrGitRepositoryReady = meta.FindStatusCondition(hrGitRepository.Status.Conditions, fluxmeta.ReadyCondition)
|
||||
}
|
||||
|
||||
var hrHelmRepository *sourcev1b2.HelmRepository
|
||||
var hrHelmRepository *sourcev1.HelmRepository
|
||||
var hrHelmRepositoryReady *metav1.Condition
|
||||
if hr.Spec.Chart.Spec.SourceRef.Kind == sourcev1b2.HelmRepositoryKind {
|
||||
hrHelmRepository = &sourcev1b2.HelmRepository{}
|
||||
if hr.Spec.Chart.Spec.SourceRef.Kind == sourcev1.HelmRepositoryKind {
|
||||
hrHelmRepository = &sourcev1.HelmRepository{}
|
||||
sourceNamespace := hr.Namespace
|
||||
if hr.Spec.Chart.Spec.SourceRef.Namespace != "" {
|
||||
sourceNamespace = hr.Spec.Chart.Spec.SourceRef.Namespace
|
||||
@@ -522,11 +522,11 @@ Status: Unknown
|
||||
ObjectNamespace string
|
||||
HelmRelease *helmv2.HelmRelease
|
||||
HelmReleaseReady *metav1.Condition
|
||||
HelmChart *sourcev1b2.HelmChart
|
||||
HelmChart *sourcev1.HelmChart
|
||||
HelmChartReady *metav1.Condition
|
||||
GitRepository *sourcev1.GitRepository
|
||||
GitRepositoryReady *metav1.Condition
|
||||
HelmRepository *sourcev1b2.HelmRepository
|
||||
HelmRepository *sourcev1.HelmRepository
|
||||
HelmRepositoryReady *metav1.Condition
|
||||
}{
|
||||
ObjectName: obj.GetKind() + "/" + obj.GetName(),
|
||||
|
||||
Reference in New Issue
Block a user