From e758c7d1a73c2f3f8fe5ec5716e84c0c0f4e691c Mon Sep 17 00:00:00 2001 From: Robert Graeff Date: Mon, 4 Nov 2024 08:48:04 +0100 Subject: [PATCH] Unmarshal yaml (run-int-tests) --- pkg/utils/clusters/shoot_client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/utils/clusters/shoot_client.go b/pkg/utils/clusters/shoot_client.go index 16ba5dbec..b44dc12cb 100644 --- a/pkg/utils/clusters/shoot_client.go +++ b/pkg/utils/clusters/shoot_client.go @@ -6,7 +6,6 @@ package clusters import ( "context" - "encoding/json" "fmt" apierrors "k8s.io/apimachinery/pkg/api/errors" @@ -15,6 +14,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/dynamic" "k8s.io/client-go/tools/clientcmd" + "sigs.k8s.io/yaml" "github.com/gardener/landscaper/apis/core/v1alpha1" "github.com/gardener/landscaper/apis/core/v1alpha1/targettypes" @@ -56,7 +56,7 @@ func NewShootClientFromTarget(ctx context.Context, gardenTarget *v1alpha1.Target } targetConfig := &targettypes.KubernetesClusterTargetConfig{} - err = json.Unmarshal([]byte(resolvedTarget.Content), targetConfig) + err = yaml.Unmarshal([]byte(resolvedTarget.Content), targetConfig) if err != nil { return nil, fmt.Errorf("shoot client: failed to unmarshal target config: %w", err) }