Skip to content

Commit 4dc1caf

Browse files
committed
Disable schema checker overlap with KAL
1 parent 3663a85 commit 4dc1caf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/codegen/pkg/schemacheck/generator.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import (
1717
kyaml "sigs.k8s.io/yaml"
1818

1919
kerrors "k8s.io/apimachinery/pkg/util/errors"
20+
"k8s.io/apimachinery/pkg/util/sets"
2021
"k8s.io/klog/v2"
2122
)
2223

@@ -95,6 +96,13 @@ func (g *generator) GenGroup(groupCtx generation.APIGroupContext) ([]generation.
9596
errs := []error{}
9697

9798
comparatorOptions := options.NewComparatorOptions()
99+
100+
// Remove specific comparators from the default enabled list.
101+
// These are all enabled by KAL now.
102+
toRemove := []string{"NoBools", "NoFloats", "NoUints", "NoMaps", "ConditionsMustHaveProperSSATags"}
103+
defaultSet := sets.NewString(comparatorOptions.DefaultEnabledComparators...)
104+
comparatorOptions.DefaultEnabledComparators = defaultSet.Delete(toRemove...).List()
105+
98106
comparatorOptions.EnabledComparators = g.enabledComparators
99107
comparatorOptions.DisabledComparators = g.disabledComparators
100108

0 commit comments

Comments
 (0)