mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-21 15:11:47 +00:00
trace: fix lint warning
Signed-off-by: Jakob Schrettenbrunner <jakob.schrettenbrunner@telekom.de>
This commit is contained in:
parent
b10eee87ee
commit
d3c56eb3d3
1 changed files with 3 additions and 5 deletions
|
|
@ -201,7 +201,7 @@ func getObjectDynamic(args []string) ([]*unstructured.Unstructured, error) {
|
||||||
|
|
||||||
objects := []*unstructured.Unstructured{}
|
objects := []*unstructured.Unstructured{}
|
||||||
for _, info := range infos {
|
for _, info := range infos {
|
||||||
obj := &unstructured.Unstructured{}
|
obj := &unstructured.Unstructured{}
|
||||||
obj.Object, err = runtime.DefaultUnstructuredConverter.ToUnstructured(info.Object)
|
obj.Object, err = runtime.DefaultUnstructuredConverter.ToUnstructured(info.Object)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return objects, err
|
return objects, err
|
||||||
|
|
@ -213,12 +213,11 @@ func getObjectDynamic(args []string) ([]*unstructured.Unstructured, error) {
|
||||||
|
|
||||||
func traceKustomization(ctx context.Context, kubeClient client.Client, ksName types.NamespacedName, obj *unstructured.Unstructured) (string, error) {
|
func traceKustomization(ctx context.Context, kubeClient client.Client, ksName types.NamespacedName, obj *unstructured.Unstructured) (string, error) {
|
||||||
ks := &kustomizev1.Kustomization{}
|
ks := &kustomizev1.Kustomization{}
|
||||||
ksReady := &metav1.Condition{}
|
|
||||||
err := kubeClient.Get(ctx, ksName, ks)
|
err := kubeClient.Get(ctx, ksName, ks)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to find kustomization: %w", err)
|
return "", fmt.Errorf("failed to find kustomization: %w", err)
|
||||||
}
|
}
|
||||||
ksReady = meta.FindStatusCondition(ks.Status.Conditions, fluxmeta.ReadyCondition)
|
ksReady := meta.FindStatusCondition(ks.Status.Conditions, fluxmeta.ReadyCondition)
|
||||||
|
|
||||||
var ksRepository *sourcev1.GitRepository
|
var ksRepository *sourcev1.GitRepository
|
||||||
var ksRepositoryReady *metav1.Condition
|
var ksRepositoryReady *metav1.Condition
|
||||||
|
|
@ -326,12 +325,11 @@ Status: Unknown
|
||||||
|
|
||||||
func traceHelm(ctx context.Context, kubeClient client.Client, hrName types.NamespacedName, obj *unstructured.Unstructured) (string, error) {
|
func traceHelm(ctx context.Context, kubeClient client.Client, hrName types.NamespacedName, obj *unstructured.Unstructured) (string, error) {
|
||||||
hr := &helmv2.HelmRelease{}
|
hr := &helmv2.HelmRelease{}
|
||||||
hrReady := &metav1.Condition{}
|
|
||||||
err := kubeClient.Get(ctx, hrName, hr)
|
err := kubeClient.Get(ctx, hrName, hr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to find HelmRelease: %w", err)
|
return "", fmt.Errorf("failed to find HelmRelease: %w", err)
|
||||||
}
|
}
|
||||||
hrReady = meta.FindStatusCondition(hr.Status.Conditions, fluxmeta.ReadyCondition)
|
hrReady := meta.FindStatusCondition(hr.Status.Conditions, fluxmeta.ReadyCondition)
|
||||||
|
|
||||||
var hrChart *sourcev1.HelmChart
|
var hrChart *sourcev1.HelmChart
|
||||||
var hrChartReady *metav1.Condition
|
var hrChartReady *metav1.Condition
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue