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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.64
version: v2.1
48 changes: 31 additions & 17 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
run:
timeout: 5m

version: "2"
linters:
enable:
- revive
- ineffassign
- misspell
- goimports
- ginkgolinter
- importas

- misspell
- revive
settings:
revive:
severity: error
rules:
- name: exported
- name: if-return
disabled: true
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
severity:
default-severity: error

linters-settings:
revive:
severity: error
rules:
- name: exported
- name: if-return
disabled: true
default: error
formatters:
enable:
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
3 changes: 1 addition & 2 deletions pkg/controller/infrastructure/actuator_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ package infrastructure
import (
"context"

"github.com/gardener/gardener/extensions/pkg/controller"
extensionscontroller "github.com/gardener/gardener/extensions/pkg/controller"
extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1"
"github.com/go-logr/logr"
)

// Delete implements infrastructure.Actuator.
func (a *actuator) Delete(ctx context.Context, log logr.Logger, infra *extensionsv1alpha1.Infrastructure, cluster *controller.Cluster) error {
func (a *actuator) Delete(ctx context.Context, log logr.Logger, infra *extensionsv1alpha1.Infrastructure, cluster *extensionscontroller.Cluster) error {
return nil
}

Expand Down
17 changes: 8 additions & 9 deletions pkg/controller/worker/machines_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
genericworkeractuator "github.com/gardener/gardener/extensions/pkg/controller/worker/genericactuator"
v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants"
machinecontrollerv1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1"
machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -150,10 +149,10 @@ var _ = Describe("Machines", func() {
SecretName: className1,
Minimum: worker.DistributeOverZones(0, pool.Minimum, 2),
Maximum: worker.DistributeOverZones(0, pool.Maximum, 2),
Strategy: machinev1alpha1.MachineDeploymentStrategy{
Type: machinev1alpha1.RollingUpdateMachineDeploymentStrategyType,
RollingUpdate: &machinev1alpha1.RollingUpdateMachineDeployment{
UpdateConfiguration: machinev1alpha1.UpdateConfiguration{
Strategy: machinecontrollerv1alpha1.MachineDeploymentStrategy{
Type: machinecontrollerv1alpha1.RollingUpdateMachineDeploymentStrategyType,
RollingUpdate: &machinecontrollerv1alpha1.RollingUpdateMachineDeployment{
UpdateConfiguration: machinecontrollerv1alpha1.UpdateConfiguration{
MaxSurge: ptr.To(worker.DistributePositiveIntOrPercent(0, pool.MaxSurge, 2, pool.Maximum)),
MaxUnavailable: ptr.To(worker.DistributePositiveIntOrPercent(0, pool.MaxUnavailable, 2, pool.Minimum)),
},
Expand All @@ -170,10 +169,10 @@ var _ = Describe("Machines", func() {
SecretName: className2,
Minimum: worker.DistributeOverZones(1, pool.Minimum, 2),
Maximum: worker.DistributeOverZones(1, pool.Maximum, 2),
Strategy: machinev1alpha1.MachineDeploymentStrategy{
Type: machinev1alpha1.RollingUpdateMachineDeploymentStrategyType,
RollingUpdate: &machinev1alpha1.RollingUpdateMachineDeployment{
UpdateConfiguration: machinev1alpha1.UpdateConfiguration{
Strategy: machinecontrollerv1alpha1.MachineDeploymentStrategy{
Type: machinecontrollerv1alpha1.RollingUpdateMachineDeploymentStrategyType,
RollingUpdate: &machinecontrollerv1alpha1.RollingUpdateMachineDeployment{
UpdateConfiguration: machinecontrollerv1alpha1.UpdateConfiguration{
MaxSurge: ptr.To(worker.DistributePositiveIntOrPercent(1, pool.MaxSurge, 2, pool.Maximum)),
MaxUnavailable: ptr.To(worker.DistributePositiveIntOrPercent(1, pool.MaxUnavailable, 2, pool.Minimum)),
},
Expand Down
5 changes: 2 additions & 3 deletions pkg/webhook/controlplane/ensurer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
apiruntime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/ptr"

Expand Down Expand Up @@ -90,7 +89,7 @@ var _ = Describe("Ensurer", func() {
Shoot: &gardencorev1beta1.Shoot{
Spec: gardencorev1beta1.ShootSpec{
Provider: gardencorev1beta1.Provider{
ControlPlaneConfig: &apiruntime.RawExtension{Raw: controlPlaneConfigRaw},
ControlPlaneConfig: &runtime.RawExtension{Raw: controlPlaneConfigRaw},
},
Kubernetes: gardencorev1beta1.Kubernetes{
Version: "1.26.0",
Expand All @@ -114,7 +113,7 @@ var _ = Describe("Ensurer", func() {
IPFamilies: []gardencorev1beta1.IPFamily{gardencorev1beta1.IPFamilyIPv6},
},
Provider: gardencorev1beta1.Provider{
ControlPlaneConfig: &apiruntime.RawExtension{Raw: controlPlaneConfigRaw},
ControlPlaneConfig: &runtime.RawExtension{Raw: controlPlaneConfigRaw},
},
Kubernetes: gardencorev1beta1.Kubernetes{
Version: "1.26.0",
Expand Down
Loading