Skip to content
Draft
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
23 changes: 21 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ linters:
settings:
linters:
disable:
# NOTE: conflicts with the lack of validation in the Status structs
- arrayofstruct
# NOTE: The following checks are currently failing
- optionalfields
enable:
- commentstart
- conditions
- defaults
- duplicatemarkers
- integers
- jsontags
Expand All @@ -48,6 +52,7 @@ linters:
- nodurations
- nofloats
- nomaps
- nonpointerstructs
- nonullable
- notimestamp
- nophase
Expand All @@ -62,11 +67,14 @@ linters:
isFirstField: Warn
usePatchStrategy: Ignore
useProtobuf: Forbid
defaults:
# Let's use `+kubebuilder:default` until elastic/crd-ref-docs supports `+default`
preferredDefaultMarker: "kubebuilder:default"
requiredfields:
omitempty:
policy: Ignore
exclusions:
generated: lax
generated: disable
rules:
- linters:
- lll
Expand All @@ -75,13 +83,22 @@ linters:
- dupl
- lll
path: internal/*
- linters:
- dupl
- goimports
- unparam
path: zz_generated
- linters:
- kubeapilinter
path-except: api/*
path-except: ^api/*
paths:
- third_party$
- builtin$
- examples$
- applyconfiguration/*
- clientset/*
- informers/*
- listers/*
formatters:
enable:
- gofmt
Expand All @@ -92,3 +109,5 @@ formatters:
- third_party$
- builtin$
- examples$
issues:
exclude-generated: disable
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ KUSTOMIZE_VERSION ?= v5.6.0
CONTROLLER_TOOLS_VERSION ?= v0.17.1
ENVTEST_VERSION ?= release-0.22
GOLANGCI_LINT_VERSION ?= v2.7.2
KAL_VERSION ?= v0.0.0-20250924094418-502783c08f9d
KAL_VERSION ?= v0.0.0-20260114104534-18147eee9c49
MOCKGEN_VERSION ?= v0.5.0
KUTTL_VERSION ?= v0.24.0
GOVULNCHECK_VERSION ?= v1.1.4
Expand Down
3 changes: 1 addition & 2 deletions api/v1alpha1/image_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ type ImageContent struct {
// download describes how to obtain image data by downloading it from a URL.
// Must be set when creating a managed image.
// +required
//nolint:kubeapilinter
Download *ImageContentSourceDownload `json:"download"`
Download *ImageContentSourceDownload `json:"download,omitempty"`
}

type ImageContentSourceDownload struct {
Expand Down
4 changes: 2 additions & 2 deletions api/v1alpha1/router_interface_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ type RouterInterface struct {
metav1.ObjectMeta `json:"metadata,omitempty"`

// spec specifies the desired state of the resource.
// +optional
Spec RouterInterfaceSpec `json:"spec,omitempty"`
// +required
Spec RouterInterfaceSpec `json:"spec,omitzero"`

// status defines the observed state of the resource.
// +optional
Expand Down
10 changes: 6 additions & 4 deletions api/v1alpha1/zz_generated.domain-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions api/v1alpha1/zz_generated.flavor-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions api/v1alpha1/zz_generated.floatingip-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions api/v1alpha1/zz_generated.group-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions api/v1alpha1/zz_generated.image-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions api/v1alpha1/zz_generated.keypair-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions api/v1alpha1/zz_generated.network-resource.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading