Skip to content

Commit ffa63d2

Browse files
authored
Merge pull request #12869 from sbueringer/pr-kal-doc
⚠️ Improve KAL config docs for forbidding OpenAPI defaulting
2 parents a86a82a + 98c4aa7 commit ffa63d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.golangci-kal.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ linters:
5555
description: "A field with a default value cannot be required"
5656
forbiddenmarkers:
5757
markers:
58+
# We don't want to do any defaulting (including OpenAPI) anymore on API fields because we prefer
59+
# to have a clear signal on user intent. This also allows us to easily change the default behavior if necessary.
5860
- identifier: "kubebuilder:default"
5961
- identifier: "default"
6062
conditions:
@@ -163,7 +165,6 @@ linters:
163165
- kubeapilinter
164166

165167
# Excludes for existing default markers
166-
# We don't want to use OpenAPI defaulting anymore.
167168
- path: "api/core/v1beta2/clusterclass_types.go"
168169
text: 'forbiddenmarkers: field Reason has forbidden marker "kubebuilder:default=FieldValueInvalid"'
169170
linters:

0 commit comments

Comments
 (0)