Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .golangci-kal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ linters:
linters:
- kubeapilinter
- path: "api/addons/v1beta2|api/bootstrap/kubeadm/v1beta2|api/controlplane/kubeadm/v1beta2|api/core/v1beta2|api/ipam/v1beta2|api/runtime/v1beta2"
text: "ssatags: Conditions should have a listType marker for proper Server-Side Apply behavior"
text: "ssatags: .*Conditions should have a listType marker for proper Server-Side Apply behavior"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as an aside, why didn't we add list type atomic to these? Because it conflicts with the expectations of the conditions linter I expect?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for this exclude here we didn't want to take any risk making a change to the deprecated condition field at this point.

These fields will be removed in the foreseeable future anyway.

For the new condition fields we want to support co-ownership

linters:
- kubeapilinter
- path: "api/core/v1beta2"
text: "field Conditions type Conditions must have a maximum items, add kubebuilder:validation:MaxItems marker"
text: "field .*Conditions type Conditions must have a maximum items, add kubebuilder:validation:MaxItems marker"
linters:
- kubeapilinter
- path: "api/core/v1beta2/condition_types.go"
Expand All @@ -122,7 +122,7 @@ linters:
## Excludes for JSONSchemaProps
# We want to align to the JSON tags of the CustomResourceDefinition fields.
- path: "api/core/v1beta2/clusterclass_types"
text: "field (XPreserveUnknownFields|XPreserveUnknownFields|XValidations|XMetadata|XIntOrString) json tag does not match pattern"
text: "field JSONSchemaProps.(XPreserveUnknownFields|XPreserveUnknownFields|XValidations|XMetadata|XIntOrString) json tag does not match pattern"
linters:
- kubeapilinter
# We want to align Properties to the corresponding field in CustomResourceDefinitions.
Expand All @@ -145,7 +145,7 @@ linters:
## Excludes for kubeadm types
# We want to align the FeatureGates field to the FeatureGates field in kubeadm.
- path: "api/bootstrap/kubeadm/v1beta2/kubeadm_types.go"
text: "nomaps: FeatureGates should not use a map type, use a list type with a unique name/identifier instead"
text: "nomaps: ClusterConfiguration.FeatureGates should not use a map type, use a list type with a unique name/identifier instead"
linters:
- kubeapilinter

Expand All @@ -166,11 +166,11 @@ linters:

# Excludes for existing default markers
- path: "api/core/v1beta2/clusterclass_types.go"
text: 'forbiddenmarkers: field Reason has forbidden marker "kubebuilder:default=FieldValueInvalid"'
text: 'forbiddenmarkers: field ValidationRule.Reason has forbidden marker "kubebuilder:default=FieldValueInvalid"'
linters:
- kubeapilinter
- path: "api/core/v1beta2/clusterclass_types.go"
text: 'forbiddenmarkers: field Reason has forbidden marker "default=ref\(sigs.k8s.io/cluster-api/api/core/v1beta2.FieldValueInvalid\)"'
text: 'forbiddenmarkers: field ValidationRule.Reason has forbidden marker "default=ref\(sigs.k8s.io/cluster-api/api/core/v1beta2.FieldValueInvalid\)"'
linters:
- kubeapilinter

Expand Down
4 changes: 2 additions & 2 deletions hack/tools/.custom-gcl.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: v2.4.0
version: v2.5.0
name: golangci-lint-kube-api-linter
destination: ./bin
plugins:
- module: 'sigs.k8s.io/kube-api-linter'
version: v0.0.0-20250908163129-65a570bd22aa
version: v0.0.0-20251107220451-f87b38edda8c
Loading