Skip to content

Commit

Permalink
chore: move utils/wildcard in ext (kyverno#8772)
Browse files Browse the repository at this point in the history
Signed-off-by: Charles-Edouard Brétéché <[email protected]>
  • Loading branch information
eddycharly authored Oct 29, 2023
1 parent 32d1605 commit c96199d
Show file tree
Hide file tree
Showing 36 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion api/kyverno/v1/rule_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/json"
"fmt"

"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/pss/utils"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand Down
2 changes: 1 addition & 1 deletion api/kyverno/v2beta1/policy_exception_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
package v2beta1

import (
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/kubectl-kyverno/test/filter/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"github.com/kyverno/kyverno/cmd/cli/kubectl-kyverno/apis/v1alpha1"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
)

type Filter interface {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/clients/dclient/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"time"

openapiv2 "github.com/google/gnostic-models/openapiv2"
"github.com/kyverno/kyverno/ext/wildcard"
kubeutils "github.com/kyverno/kyverno/pkg/utils/kube"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/discovery"
Expand Down
2 changes: 1 addition & 1 deletion pkg/clients/dclient/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dclient
import (
"context"

"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sync"

valid "github.com/asaskevich/govalidator"
"github.com/kyverno/kyverno/ext/wildcard"
osutils "github.com/kyverno/kyverno/pkg/utils/os"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/webhook/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/go-logr/logr"
"github.com/kyverno/kyverno/api/kyverno"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/autogen"
"github.com/kyverno/kyverno/pkg/client/clientset/versioned"
kyvernov1informers "github.com/kyverno/kyverno/pkg/client/informers/externalversions/kyverno/v1"
Expand All @@ -21,7 +22,6 @@ import (
controllerutils "github.com/kyverno/kyverno/pkg/utils/controller"
kubeutils "github.com/kyverno/kyverno/pkg/utils/kube"
runtimeutils "github.com/kyverno/kyverno/pkg/utils/runtime"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
coordinationv1 "k8s.io/api/coordination/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/cosign/cosign.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (

"github.com/google/go-containerregistry/pkg/name"
"github.com/in-toto/in-toto-golang/in_toto"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/images"
"github.com/kyverno/kyverno/pkg/tracing"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/sigstore/cosign/v2/pkg/cosign"
"github.com/sigstore/cosign/v2/pkg/cosign/attestation"
"github.com/sigstore/cosign/v2/pkg/oci"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/api/engineresponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"

kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
utils "github.com/kyverno/kyverno/pkg/utils/match"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"gomodules.xyz/jsonpatch/v2"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/context/mock_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strings"
"sync"

"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/engine/jmespath"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
)

// MockContext is used for testing and validation of variables
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/handlers/mutation/load_targets.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
"github.com/kyverno/kyverno/pkg/engine/variables"
kubeutils "github.com/kyverno/kyverno/pkg/utils/kube"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"go.uber.org/multierr"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/internal/imageverifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/go-logr/logr"
"github.com/kyverno/kyverno/api/kyverno"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/config"
"github.com/kyverno/kyverno/pkg/cosign"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
Expand All @@ -22,7 +23,6 @@ import (
"github.com/kyverno/kyverno/pkg/notary"
apiutils "github.com/kyverno/kyverno/pkg/utils/api"
"github.com/kyverno/kyverno/pkg/utils/jsonpointer"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"go.uber.org/multierr"
"gomodules.xyz/jsonpatch/v2"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/jmespath/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
trunc "github.com/aquilax/truncate"
"github.com/blang/semver/v4"
gojmespath "github.com/kyverno/go-jmespath"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/config"
imageutils "github.com/kyverno/kyverno/pkg/utils/image"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
regen "github.com/zach-klippenstein/goregen"
"golang.org/x/crypto/cryptobyte"
cryptobyte_asn1 "golang.org/x/crypto/cryptobyte/asn1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/pattern/pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/go-logr/logr"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/operator"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
apiresource "k8s.io/apimachinery/pkg/api/resource"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/utils/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"github.com/go-logr/logr"
"github.com/kyverno/kyverno/api/kyverno"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/config"
engineapi "github.com/kyverno/kyverno/pkg/engine/api"
enginecontext "github.com/kyverno/kyverno/pkg/engine/context"
apiutils "github.com/kyverno/kyverno/pkg/utils/api"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/utils/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (

kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
kyvernov1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1"
"github.com/kyverno/kyverno/ext/wildcard"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
matchutils "github.com/kyverno/kyverno/pkg/utils/match"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
authenticationv1 "k8s.io/api/authentication/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/variables/operator/allin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"

"github.com/go-logr/logr"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/context"
"github.com/kyverno/kyverno/pkg/engine/operator"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
)

// NewAllInHandler returns handler to manage AllIn operations
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/variables/operator/anyin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"strings"

"github.com/go-logr/logr"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/context"
"github.com/kyverno/kyverno/pkg/engine/operator"
"github.com/kyverno/kyverno/pkg/engine/pattern"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
)

// NewAnyInHandler returns handler to manage AnyIn operations
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/variables/operator/equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strconv"

"github.com/go-logr/logr"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/context"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
"k8s.io/apimachinery/pkg/api/resource"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/variables/operator/in.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/go-logr/logr"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/context"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
)

// NewInHandler returns handler to manage In operations
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/variables/operator/notequal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strconv"

"github.com/go-logr/logr"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/context"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
"k8s.io/apimachinery/pkg/api/resource"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/wildcards/wildcards.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package wildcards
import (
"strings"

"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/engine/anchor"
wildcard "github.com/kyverno/kyverno/pkg/utils/wildcard"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/policy/generate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (

"github.com/go-logr/logr"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/clients/dclient"
"github.com/kyverno/kyverno/pkg/engine/variables/regex"
"github.com/kyverno/kyverno/pkg/policy/common"
kubeutils "github.com/kyverno/kyverno/pkg/utils/kube"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
)

// Generate provides implementation to validate 'generate' rule
Expand Down
2 changes: 1 addition & 1 deletion pkg/policycache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package policycache

import (
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/clients/dclient"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/pss/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
pssutils "github.com/kyverno/kyverno/pkg/pss/utils"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/pod-security-admission/api"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/kube/wildcard.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package kube

import (
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/match/annotations.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package match

import (
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
)

func CheckAnnotations(expected map[string]string, actual map[string]string) bool {
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/match/kind.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package match

import (
"github.com/kyverno/kyverno/ext/wildcard"
kubeutils "github.com/kyverno/kyverno/pkg/utils/kube"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"k8s.io/apimachinery/pkg/runtime/schema"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/match/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
kyvernov1beta1 "github.com/kyverno/kyverno/api/kyverno/v1beta1"
kyvernov2beta1 "github.com/kyverno/kyverno/api/kyverno/v2beta1"
"github.com/kyverno/kyverno/ext/wildcard"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"go.uber.org/multierr"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/match/name.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package match

import (
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
)

func CheckName(expected, actual string) bool {
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/match/subjects.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package match

import (
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"github.com/kyverno/kyverno/ext/wildcard"
authenticationv1 "k8s.io/api/authentication/v1"
rbacv1 "k8s.io/api/rbac/v1"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/validation/policy/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/kyverno/go-jmespath"
"github.com/kyverno/kyverno/api/kyverno"
kyvernov1 "github.com/kyverno/kyverno/api/kyverno/v1"
"github.com/kyverno/kyverno/ext/wildcard"
"github.com/kyverno/kyverno/pkg/autogen"
"github.com/kyverno/kyverno/pkg/clients/dclient"
enginecontext "github.com/kyverno/kyverno/pkg/engine/context"
Expand All @@ -25,7 +26,6 @@ import (
apiutils "github.com/kyverno/kyverno/pkg/utils/api"
datautils "github.com/kyverno/kyverno/pkg/utils/data"
kubeutils "github.com/kyverno/kyverno/pkg/utils/kube"
"github.com/kyverno/kyverno/pkg/utils/wildcard"
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/validation/field"
Expand Down

0 comments on commit c96199d

Please sign in to comment.