diff --git a/go.mod b/go.mod index 0b2e6ca8..94a15a20 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/statnett/image-scanner-operator -go 1.22.0 +go 1.23.0 require ( github.com/distribution/reference v0.6.0 diff --git a/internal/client/applyconfiguration/internal/internal.go b/internal/client/applyconfiguration/internal/internal.go index 47f29e51..8a377a46 100644 --- a/internal/client/applyconfiguration/internal/internal.go +++ b/internal/client/applyconfiguration/internal/internal.go @@ -1,46 +1,3 @@ // Code generated by applyconfiguration-gen. DO NOT EDIT. package internal - -import ( - "fmt" - "sync" - - typed "sigs.k8s.io/structured-merge-diff/v4/typed" -) - -func Parser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) diff --git a/internal/client/applyconfiguration/utils.go b/internal/client/applyconfiguration/utils.go index 8366417a..ef650382 100644 --- a/internal/client/applyconfiguration/utils.go +++ b/internal/client/applyconfiguration/utils.go @@ -1,44 +1,3 @@ // Code generated by applyconfiguration-gen. DO NOT EDIT. package applyconfiguration - -import ( - v1alpha1 "github.com/statnett/image-scanner-operator/api/stas/v1alpha1" - internal "github.com/statnett/image-scanner-operator/internal/client/applyconfiguration/internal" - stasv1alpha1 "github.com/statnett/image-scanner-operator/internal/client/applyconfiguration/stas/v1alpha1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" -) - -// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no -// apply configuration type exists for the given GroupVersionKind. -func ForKind(kind schema.GroupVersionKind) interface{} { - switch kind { - // Group=stas.statnett.no, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithKind("ContainerImageScan"): - return &stasv1alpha1.ContainerImageScanApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("ContainerImageScanSpec"): - return &stasv1alpha1.ContainerImageScanSpecApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("ContainerImageScanStatus"): - return &stasv1alpha1.ContainerImageScanStatusApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("Image"): - return &stasv1alpha1.ImageApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("ImageScanSpec"): - return &stasv1alpha1.ImageScanSpecApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("ScanConfig"): - return &stasv1alpha1.ScanConfigApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("Vulnerability"): - return &stasv1alpha1.VulnerabilityApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("VulnerabilitySummary"): - return &stasv1alpha1.VulnerabilitySummaryApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("Workload"): - return &stasv1alpha1.WorkloadApplyConfiguration{} - - } - return nil -} - -func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter { - return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()} -}