From ea2bb2a3747d6f4e124d5cb1b617bdaefb080cee Mon Sep 17 00:00:00 2001 From: Tariq Ibrahim Date: Fri, 22 Nov 2024 14:13:19 -0800 Subject: [PATCH] use apimachinery/pkg/util/json instead of sigs.k8s.io/json Signed-off-by: Tariq Ibrahim --- cmd/gpuop-cfg/validate/csv/alm-examples.go | 4 ++-- go.mod | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/gpuop-cfg/validate/csv/alm-examples.go b/cmd/gpuop-cfg/validate/csv/alm-examples.go index e637998f4..d853a470f 100644 --- a/cmd/gpuop-cfg/validate/csv/alm-examples.go +++ b/cmd/gpuop-cfg/validate/csv/alm-examples.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/operator-framework/api/pkg/operators/v1alpha1" - "sigs.k8s.io/json" + "k8s.io/apimachinery/pkg/util/json" v1 "github.com/NVIDIA/gpu-operator/api/nvidia/v1" ) @@ -28,7 +28,7 @@ import ( func validateALMExample(csv *v1alpha1.ClusterServiceVersion) error { cpList := []v1.ClusterPolicy{} example := csv.Annotations["alm-examples"] - err := json.UnmarshalCaseSensitivePreserveInts([]byte(example), &cpList) + err := json.Unmarshal([]byte(example), &cpList) if err != nil { return err } diff --git a/go.mod b/go.mod index bdb30869c..c306ecd65 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,6 @@ require ( k8s.io/client-go v0.31.2 k8s.io/klog/v2 v2.130.1 sigs.k8s.io/controller-runtime v0.19.1 - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd sigs.k8s.io/yaml v1.4.0 ) @@ -176,6 +175,7 @@ require ( k8s.io/kubectl v0.31.0 // indirect k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect oras.land/oras-go v1.2.5 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.17.2 // indirect sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect