From 7dfb9e045ad5cf309a1ba36641f932f3e6ab5336 Mon Sep 17 00:00:00 2001 From: Jason Deal Date: Mon, 6 Nov 2023 13:11:51 -0800 Subject: [PATCH] chore: updates for v0.27.7 release (#760) --- hack/toolchain.sh | 2 +- pkg/apis/crds/karpenter.sh_machines.yaml | 3 +-- pkg/apis/crds/karpenter.sh_provisioners.yaml | 3 +-- pkg/apis/settings/zz_generated.deepcopy.go | 1 - pkg/apis/v1alpha5/provisioner_validation.go | 2 +- pkg/apis/v1alpha5/zz_generated.deepcopy.go | 1 - pkg/controllers/deprovisioning/expiration.go | 2 +- pkg/controllers/node/drift.go | 2 +- pkg/webhooks/webhooks.go | 4 ++-- 9 files changed, 8 insertions(+), 12 deletions(-) diff --git a/hack/toolchain.sh b/hack/toolchain.sh index 7b45407d21..60deed7f1e 100755 --- a/hack/toolchain.sh +++ b/hack/toolchain.sh @@ -19,7 +19,7 @@ tools() { go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.3 go install github.com/sigstore/cosign/cmd/cosign@v1.10.0 go install github.com/gohugoio/hugo@v0.97.3+extended - go install golang.org/x/vuln/cmd/govulncheck@v0.0.0-20230215172424-8fb696828224 + go install golang.org/x/vuln/cmd/govulncheck@latest go install github.com/onsi/ginkgo/v2/ginkgo@latest if ! echo "$PATH" | grep -q "${GOPATH:-undefined}/bin\|$HOME/go/bin"; then diff --git a/pkg/apis/crds/karpenter.sh_machines.yaml b/pkg/apis/crds/karpenter.sh_machines.yaml index 5eabf22c13..64f6f1497e 100644 --- a/pkg/apis/crds/karpenter.sh_machines.yaml +++ b/pkg/apis/crds/karpenter.sh_machines.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: machines.karpenter.sh spec: group: karpenter.sh diff --git a/pkg/apis/crds/karpenter.sh_provisioners.yaml b/pkg/apis/crds/karpenter.sh_provisioners.yaml index 112cd62d2c..52e199648f 100644 --- a/pkg/apis/crds/karpenter.sh_provisioners.yaml +++ b/pkg/apis/crds/karpenter.sh_provisioners.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: provisioners.karpenter.sh spec: group: karpenter.sh diff --git a/pkg/apis/settings/zz_generated.deepcopy.go b/pkg/apis/settings/zz_generated.deepcopy.go index d73c49f129..4630de1b5f 100644 --- a/pkg/apis/settings/zz_generated.deepcopy.go +++ b/pkg/apis/settings/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/apis/v1alpha5/provisioner_validation.go b/pkg/apis/v1alpha5/provisioner_validation.go index 3e5a224dea..e1ac3a357b 100644 --- a/pkg/apis/v1alpha5/provisioner_validation.go +++ b/pkg/apis/v1alpha5/provisioner_validation.go @@ -104,7 +104,7 @@ func (s *ProvisionerSpec) validateTTLSecondsAfterEmpty() (errs *apis.FieldError) } // Validate the constraints -func (s *ProvisionerSpec) Validate(ctx context.Context) (errs *apis.FieldError) { +func (s *ProvisionerSpec) Validate(_ context.Context) (errs *apis.FieldError) { return errs.Also( s.validateProvider(), s.validateLabels(), diff --git a/pkg/apis/v1alpha5/zz_generated.deepcopy.go b/pkg/apis/v1alpha5/zz_generated.deepcopy.go index 6d09db443a..1b1a993118 100644 --- a/pkg/apis/v1alpha5/zz_generated.deepcopy.go +++ b/pkg/apis/v1alpha5/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/pkg/controllers/deprovisioning/expiration.go b/pkg/controllers/deprovisioning/expiration.go index 3a55c01b20..b59a05995e 100644 --- a/pkg/controllers/deprovisioning/expiration.go +++ b/pkg/controllers/deprovisioning/expiration.go @@ -56,7 +56,7 @@ func NewExpiration(clk clock.Clock, kubeClient client.Client, cluster *state.Clu } // ShouldDeprovision is a predicate used to filter deprovisionable nodes -func (e *Expiration) ShouldDeprovision(ctx context.Context, c *Candidate) bool { +func (e *Expiration) ShouldDeprovision(_ context.Context, c *Candidate) bool { // Filter out nodes without the TTL defined or expired. if c.provisioner == nil || c.provisioner.Spec.TTLSecondsUntilExpired == nil { return false diff --git a/pkg/controllers/node/drift.go b/pkg/controllers/node/drift.go index 5cb2e59f25..4d3bfbab2b 100644 --- a/pkg/controllers/node/drift.go +++ b/pkg/controllers/node/drift.go @@ -37,7 +37,7 @@ type Drift struct { cloudProvider cloudprovider.CloudProvider } -func (d *Drift) Reconcile(ctx context.Context, provisioner *v1alpha5.Provisioner, node *v1.Node) (reconcile.Result, error) { +func (d *Drift) Reconcile(ctx context.Context, _ *v1alpha5.Provisioner, node *v1.Node) (reconcile.Result, error) { // If the node is marked as voluntarily disrupted by another controller, do nothing. val, hasAnnotation := node.Annotations[v1alpha5.VoluntaryDisruptionAnnotationKey] if hasAnnotation && val != v1alpha5.VoluntaryDisruptionDriftedAnnotationValue { diff --git a/pkg/webhooks/webhooks.go b/pkg/webhooks/webhooks.go index 66d653deb2..f4d0e0dbd0 100644 --- a/pkg/webhooks/webhooks.go +++ b/pkg/webhooks/webhooks.go @@ -38,7 +38,7 @@ func NewWebhooks() []knativeinjection.ControllerConstructor { } } -func NewCRDValidationWebhook(ctx context.Context, w configmap.Watcher) *controller.Impl { +func NewCRDValidationWebhook(ctx context.Context, _ configmap.Watcher) *controller.Impl { return validation.NewAdmissionController(ctx, "validation.webhook.karpenter.sh", "/validate/karpenter.sh", @@ -48,7 +48,7 @@ func NewCRDValidationWebhook(ctx context.Context, w configmap.Watcher) *controll ) } -func NewConfigValidationWebhook(ctx context.Context, cmw configmap.Watcher) *controller.Impl { +func NewConfigValidationWebhook(ctx context.Context, _ configmap.Watcher) *controller.Impl { return configmaps.NewAdmissionController(ctx, "validation.webhook.config.karpenter.sh", "/validate/config.karpenter.sh",