From 896bac1ff2d30da0ba61ca0be3b353177196a8cc Mon Sep 17 00:00:00 2001 From: Waleed Hammam Date: Sat, 13 May 2023 19:17:46 +0300 Subject: [PATCH] update kustomization api to latest and fix build issues removed deprecated method https://github.com/kubernetes-sigs/kustomize/pull/4923 --- go.mod | 4 ++-- go.sum | 9 ++++----- internal/source/kustomize.go | 5 ----- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 43a0caa..5312140 100644 --- a/go.mod +++ b/go.mod @@ -12,8 +12,8 @@ require ( gitlab.com/gitlab-org/security-products/analyzers/report/v3 v3.12.0 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 helm.sh/helm/v3 v3.8.1 - sigs.k8s.io/kustomize/api v0.11.2 - sigs.k8s.io/kustomize/kyaml v0.14.1 + sigs.k8s.io/kustomize/api v0.13.4 + sigs.k8s.io/kustomize/kyaml v0.14.2 ) require ( diff --git a/go.sum b/go.sum index ce6cb8c..0a4e711 100644 --- a/go.sum +++ b/go.sum @@ -1825,14 +1825,13 @@ sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNza sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= -sigs.k8s.io/kustomize/api v0.11.2 h1:6YvCJHFDwsLwAX7zNHBxMZi3k7dGIXI8G9l0saYQI0E= -sigs.k8s.io/kustomize/api v0.11.2/go.mod h1:GZuhith5YcqxIDe0GnRJNx5xxPTjlwaLTt/e+ChUtJA= +sigs.k8s.io/kustomize/api v0.13.4 h1:E38Hfx0G9R9v7vRgKshviPotJQETG0S2gD3JdHLCAsI= +sigs.k8s.io/kustomize/api v0.13.4/go.mod h1:Bkaavz5RKK6ZzP0zgPrB7QbpbBJKiHuD3BB0KujY7Ls= sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFcTzudmAgDwPY1HQ= sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io= sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= -sigs.k8s.io/kustomize/kyaml v0.13.3/go.mod h1:/ya3Gk4diiQzlE4mBh7wykyLRFZNvqlbh+JnwQ9Vhrc= -sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= -sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= +sigs.k8s.io/kustomize/kyaml v0.14.2 h1:9WSwztbzwGszG1bZTziQUmVMrJccnyrLb5ZMKpJGvXw= +sigs.k8s.io/kustomize/kyaml v0.14.2/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/internal/source/kustomize.go b/internal/source/kustomize.go index ed9bb81..2ac52c7 100644 --- a/internal/source/kustomize.go +++ b/internal/source/kustomize.go @@ -161,11 +161,6 @@ func parseKustomizationFile(path string) (*KustomizationFile, error) { node := nodes[0] - in, err = ktypes.FixKustomizationPreUnmarshalling(in) - if err != nil { - return nil, err - } - var obj ktypes.Kustomization err = yaml.Unmarshal(in, &obj) if err != nil {