diff --git a/go.mod b/go.mod index e6df0f6..240c8e9 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.18 require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230302070146-e8e9cb3c3ae2 + github.com/KusionStack/krm-kcl v0.0.0-20230418113804-d36ac5ce2533 github.com/spf13/cobra v1.6.1 go.uber.org/zap v1.24.0 google.golang.org/grpc v1.50.1 gopkg.in/yaml.v2 v2.4.0 helm.sh/helm/v3 v3.11.2 k8s.io/helm v2.17.0+incompatible - kusionstack.io/kclvm-go v0.4.6 - kusionstack.io/kpt-kcl-sdk v0.1.1 + kusionstack.io/kclvm-go v0.4.7-0.20230418083154-e5ebe9811d76 sigs.k8s.io/yaml v1.3.0 ) @@ -118,12 +118,12 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/crypto v0.5.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/net v0.9.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sys v0.7.0 // indirect + golang.org/x/term v0.7.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71 // indirect @@ -141,7 +141,7 @@ require ( k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect k8s.io/kubectl v0.26.0 // indirect k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect - kusionstack.io/kclvm-artifact-go v0.4.6 // indirect + kusionstack.io/kclvm-artifact-go v0.4.7-0.20230418081720-4863d13f80d1 // indirect oras.land/oras-go v1.2.2 // indirect sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/kustomize/api v0.12.1 // indirect diff --git a/go.sum b/go.sum index db3b8ce..3ebe110 100644 --- a/go.sum +++ b/go.sum @@ -48,6 +48,8 @@ github.com/GoogleContainerTools/kpt-functions-sdk/go/api v0.0.0-20220720212527-1 github.com/GoogleContainerTools/kpt-functions-sdk/go/api v0.0.0-20220720212527-133180134b93/go.mod h1:gkK43tTaPXFNASpbIbQImzhmt1hdcdin++kvzTblykc= github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230302070146-e8e9cb3c3ae2 h1:GDUCDAY2ijsUjg70QPMvWKezRxGKKzU07ckVc5uTgZA= github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230302070146-e8e9cb3c3ae2/go.mod h1:Pnd3ImgaWS3OBVjztSiGMACMf+CDs20l5nT5Oljy/tA= +github.com/KusionStack/krm-kcl v0.0.0-20230418113804-d36ac5ce2533 h1:HIl/35Xz2CfGiXcHeXq/F/+hnUNWwL98Auco/eVkBWg= +github.com/KusionStack/krm-kcl v0.0.0-20230418113804-d36ac5ce2533/go.mod h1:V8b6lxmZTgmWPgC2uEtxB6sNqTyFVgN3VRBbmGGwYyI= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -749,8 +751,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -849,14 +851,14 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -868,8 +870,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1106,12 +1108,10 @@ k8s.io/kubectl v0.26.0 h1:xmrzoKR9CyNdzxBmXV7jW9Ln8WMrwRK6hGbbf69o4T0= k8s.io/kubectl v0.26.0/go.mod h1:eInP0b+U9XUJWSYeU9XZnTA+cVYuWyl3iYPGtru0qhQ= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -kusionstack.io/kclvm-artifact-go v0.4.6 h1:BqVreppjq6rQt2aSXGlmzlq8vKM5zCdIJTPog+ZG6pU= -kusionstack.io/kclvm-artifact-go v0.4.6/go.mod h1:WI+NvDeMqu1AduJT119X7q8KQdYmKfv4Nq4OvZ1tAsI= -kusionstack.io/kclvm-go v0.4.6 h1:EjdkN7AsL0envlWk83ecdbOguRwZZlpEqqFG2N4rtnw= -kusionstack.io/kclvm-go v0.4.6/go.mod h1:IJ/LzmAfDpn5X3X6ezLVia+zuXRDQmQdsR1yTinOUP0= -kusionstack.io/kpt-kcl-sdk v0.1.1 h1:uhIRgio3XdKxxLCmC/BRUhpt+Fwx2x4Bz75X37mw+S4= -kusionstack.io/kpt-kcl-sdk v0.1.1/go.mod h1:IR7Oji5vAitbmfgiUYX0PnlH8KurbTZokkpQUAOxak0= +kusionstack.io/kclvm-artifact-go v0.4.7-0.20230418081720-4863d13f80d1 h1:TYe0U0cQkO6fwTSkUkcMwSzgYObssxb/FSSJGKC87JE= +kusionstack.io/kclvm-artifact-go v0.4.7-0.20230418081720-4863d13f80d1/go.mod h1:WI+NvDeMqu1AduJT119X7q8KQdYmKfv4Nq4OvZ1tAsI= +kusionstack.io/kclvm-go v0.4.7-0.20230418083154-e5ebe9811d76 h1:ob+4gbT9ziDQ7jqbwtSkkoGJlzcLl7JDi2zqIyRsp60= +kusionstack.io/kclvm-go v0.4.7-0.20230418083154-e5ebe9811d76/go.mod h1:tqbM6l8zjA+Tet41/EsHqlGgUqIoHuGL8aGQDpIjIMQ= oras.land/oras-go v1.2.2 h1:0E9tOHUfrNH7TCDk5KU0jVBEzCqbfdyuVfGmJ7ZeRPE= oras.land/oras-go v1.2.2/go.mod h1:Apa81sKoZPpP7CDciE006tSZ0x3Q3+dOoBcMZ/aNxvw= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/main.go b/main.go index 2d32934..5e740cf 100644 --- a/main.go +++ b/main.go @@ -3,9 +3,9 @@ package main import ( "os" + _ "github.com/KusionStack/krm-kcl/pkg/config" "kusionstack.io/helm-kcl/cmd" _ "kusionstack.io/kclvm-go" - _ "kusionstack.io/kpt-kcl-sdk/pkg/config" ) func main() { diff --git a/pkg/app/app.go b/pkg/app/app.go index 9dce822..14d860f 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -8,11 +8,11 @@ import ( "path/filepath" "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" + "github.com/KusionStack/krm-kcl/pkg/process" "go.uber.org/zap" "helm.sh/helm/v3/pkg/chart" "kusionstack.io/helm-kcl/pkg/config" "kusionstack.io/helm-kcl/pkg/helm" - "kusionstack.io/kpt-kcl-sdk/pkg/process" ) // App is the main application object. diff --git a/pkg/config/kcl.go b/pkg/config/kcl.go index 59633f7..3afcd20 100644 --- a/pkg/config/kcl.go +++ b/pkg/config/kcl.go @@ -3,8 +3,8 @@ package config import ( "os" + "github.com/KusionStack/krm-kcl/pkg/config" "gopkg.in/yaml.v2" - "kusionstack.io/kpt-kcl-sdk/pkg/config" ) // KCLRun is a custom resource to provider Helm kcl config including KCL source and params.