Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update sigs.k8s.io/karpenter to v1.1.1 #601

Draft
wants to merge 26 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9f750dc
chore: update sigs.k8s.io/karpenter to v1.1.0
tallaxes Dec 3, 2024
a53cdd9
chore: update main and alt operator
tallaxes Dec 3, 2024
abc9807
chore: remove webhooks wiring
tallaxes Dec 3, 2024
74ea94d
chore: update operator
tallaxes Dec 3, 2024
0a00360
chore: update cloudprovider
tallaxes Dec 3, 2024
ec6baf7
chore: fix tests and update expectation helpers
tallaxes Dec 3, 2024
71158c9
chore: add repair policy test
tallaxes Dec 3, 2024
f4fbb63
chore: add node repair feature gate
tallaxes Dec 3, 2024
31d672d
chore: fix install-deps action and dependabot config
tallaxes Dec 3, 2024
38fde87
Merge branch 'tallaxes/update-action-dependabot' into tallaxes/karpen…
tallaxes Dec 3, 2024
67b61d7
chore: remove go toolchain
tallaxes Dec 4, 2024
7374529
chore: fix ci
tallaxes Dec 4, 2024
5b9ade8
Merge branch 'main' into tallaxes/karpenter-bump-1.1.0
tallaxes Dec 4, 2024
17c854a
chore: update Makefile
tallaxes Dec 4, 2024
c370ef2
fix: skip debug controller name validation
tallaxes Dec 4, 2024
35cdaba
fix: skip debug controller name validation
tallaxes Dec 4, 2024
0256ea0
Merge branch 'main' into tallaxes/karpenter-bump-1.1.0
tallaxes Dec 10, 2024
444283a
Merge branch 'main' into tallaxes/karpenter-bump-1.1.0
tallaxes Dec 17, 2024
b0184a5
Merge branch 'main' into tallaxes/karpenter-bump-1.1.0
tallaxes Jan 8, 2025
ca7d505
chore: remove comment
tallaxes Jan 8, 2025
1596609
chore: update sig.k8s.io/karpenter to v1.1.1
tallaxes Jan 8, 2025
011ed1b
chore: update comment
tallaxes Jan 8, 2025
6e66e9a
fix: allow nodeclass label
tallaxes Jan 8, 2025
c795497
chore: regen CRDs
tallaxes Jan 8, 2025
237e559
Merge branch 'main' into tallaxes/karpenter-bump-1.1.0
tallaxes Jan 9, 2025
9e7c4e4
Merge branch 'main' into tallaxes/karpenter-bump-1.1.0
tallaxes Jan 14, 2025
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
445 changes: 10 additions & 435 deletions charts/karpenter-crd/templates/karpenter.sh_nodeclaims.yaml

Large diffs are not rendered by default.

580 changes: 16 additions & 564 deletions charts/karpenter-crd/templates/karpenter.sh_nodepools.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions charts/karpenter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ spec:
divisor: "0"
resource: limits.memory
- name: FEATURE_GATES
value: "SpotToSpotConsolidation={{ .Values.settings.featureGates.spotToSpotConsolidation }}"
{{- with .Values.settings.batchMaxDuration }}
value: "SpotToSpotConsolidation={{ .Values.settings.featureGates.spotToSpotConsolidation }},NodeRepair={{ .Values.settings.featureGates.nodeRepair }}" {{- with .Values.settings.batchMaxDuration }}
- name: BATCH_MAX_DURATION
value: "{{ . }}"
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/karpenter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,6 @@ settings:
# -- spotToSpotConsolidation is ALPHA and is disabled by default.
# Setting this to true will enable spot replacement consolidation for both single and multi-node consolidation.
spotToSpotConsolidation: false
# -- nodeRepair is ALPHA and is disabled by default.
# Setting this to true will enable node repair.
nodeRepair: false
5 changes: 1 addition & 4 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"sigs.k8s.io/karpenter/pkg/cloudprovider/metrics"
corecontrollers "sigs.k8s.io/karpenter/pkg/controllers"
coreoperator "sigs.k8s.io/karpenter/pkg/operator"
corewebhooks "sigs.k8s.io/karpenter/pkg/webhooks"
)

func main() {
Expand All @@ -53,7 +52,6 @@ func main() {
op.EventRecorder,
cloudProvider,
)...).
WithWebhooks(ctx, corewebhooks.NewWebhooks()...).
WithControllers(ctx, controllers.NewControllers(
ctx,
op.Manager,
Expand All @@ -62,6 +60,5 @@ func main() {
aksCloudProvider,
op.InstanceProvider,
)...).
//WithWebhooks(ctx, webhooks.NewWebhooks()...).
Start(ctx, cloudProvider)
Start(ctx)
}
40 changes: 1 addition & 39 deletions cmd/controller/main_ccp.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,18 @@ limitations under the License.
package main

import (
"context"

"github.com/samber/lo"
"go.uber.org/zap"
"knative.dev/pkg/logging"

// Injection stuff
kubeclientinjection "knative.dev/pkg/client/injection/kube/client"
"knative.dev/pkg/configmap"
"knative.dev/pkg/controller"
knativeinjection "knative.dev/pkg/injection"
secretinformer "knative.dev/pkg/injection/clients/namespacedkube/informers/core/v1/secret"
kubeinformerfactory "knative.dev/pkg/injection/clients/namespacedkube/informers/factory"
"knative.dev/pkg/webhook/certificates"

altOperator "github.com/Azure/karpenter-provider-azure/pkg/alt/karpenter-core/pkg/operator"
altwebhooks "github.com/Azure/karpenter-provider-azure/pkg/alt/karpenter-core/pkg/webhooks"
"github.com/Azure/karpenter-provider-azure/pkg/cloudprovider"
controllers "github.com/Azure/karpenter-provider-azure/pkg/controllers"
"github.com/Azure/karpenter-provider-azure/pkg/operator"
"sigs.k8s.io/karpenter/pkg/cloudprovider/metrics"
corecontrollers "sigs.k8s.io/karpenter/pkg/controllers"
)

func newWebhooks(ctx context.Context) []knativeinjection.ControllerConstructor {
client := altOperator.GetCCPClient(ctx)
ccpInformerFactory := kubeinformerfactory.Get(ctx)

secretInformer := ccpInformerFactory.Core().V1().Secrets()
ctx = context.WithValue(ctx, secretinformer.Key{}, secretInformer)

logging.FromContext(ctx).Info("Starting horrible CCP informer")
if err := controller.StartInformers(ctx.Done(), secretInformer.Informer()); err != nil {
logging.FromContext(ctx).Fatalw("Failed to start horrible CCP informer", zap.Error(err))
}

return []knativeinjection.ControllerConstructor{
func(ctx context.Context, watcher configmap.Watcher) *controller.Impl {
ctx = context.WithValue(ctx, secretinformer.Key{}, secretInformer)
ctx = context.WithValue(ctx, kubeclientinjection.Key{}, client)
return certificates.NewController(ctx, watcher)
},
func(ctx context.Context, watcher configmap.Watcher) *controller.Impl {
ctx = context.WithValue(ctx, secretinformer.Key{}, secretInformer)
return altwebhooks.NewCRDConversionWebhook(ctx, watcher)
},
}
}

func main() {
//ctx, op := operator.NewOperator(coreoperator.NewOperator())
ctx, op := operator.NewOperator(altOperator.NewOperator())
Expand All @@ -91,7 +54,6 @@ func main() {
op.EventRecorder,
cloudProvider,
)...).
WithWebhooks(ctx, newWebhooks(ctx)...).
WithControllers(ctx, controllers.NewControllers(
ctx,
op.Manager,
Expand All @@ -100,5 +62,5 @@ func main() {
aksCloudProvider,
op.InstanceProvider,
)...).
Start(ctx, cloudProvider)
Start(ctx)
}
51 changes: 25 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/karpenter-provider-azure

go 1.23.0
go 1.23.2

require (
github.com/Azure/azure-kusto-go v0.16.1
Expand All @@ -17,17 +17,15 @@ require (
github.com/Azure/skewer v0.0.19
github.com/Pallinder/go-randomdata v1.2.0
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
github.com/awslabs/operatorpkg v0.0.0-20240805231134-67d0acfb6306
github.com/awslabs/operatorpkg v0.0.0-20241205163410-0fff9f28d115
github.com/blang/semver/v4 v4.0.0
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/go-openapi/errors v0.22.0
github.com/go-openapi/runtime v0.28.0
github.com/go-openapi/strfmt v0.23.0
github.com/go-openapi/swag v0.23.0
github.com/go-openapi/validate v0.24.0
github.com/go-playground/validator/v10 v10.23.0
github.com/google/go-cmp v0.6.0
github.com/imdario/mergo v0.3.16
github.com/jongio/azidext/go/azidext v0.5.0
github.com/mitchellh/hashstructure/v2 v2.0.2
Expand All @@ -39,18 +37,17 @@ require (
github.com/stretchr/testify v1.10.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/sync v0.10.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.30.3
k8s.io/apiextensions-apiserver v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/client-go v0.30.3
k8s.io/api v0.31.3
k8s.io/apiextensions-apiserver v0.31.3
k8s.io/apimachinery v0.31.3
k8s.io/client-go v0.31.3
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
knative.dev/pkg v0.0.0-20240910170930-fdbc0b5adde7
sigs.k8s.io/cloud-provider-azure v1.29.3
sigs.k8s.io/controller-runtime v0.18.4
sigs.k8s.io/karpenter v1.0.5
sigs.k8s.io/controller-runtime v0.19.3
sigs.k8s.io/karpenter v1.1.1
)

require (
Expand Down Expand Up @@ -80,15 +77,15 @@ require (
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
Expand All @@ -104,6 +101,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -125,31 +123,32 @@ require (
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prometheus/statsd_exporter v0.24.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.28.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.183.0 // indirect
Expand All @@ -160,10 +159,10 @@ require (
gopkg.in/dnaeon/go-vcr.v3 v3.2.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cloud-provider v0.30.3 // indirect
k8s.io/component-base v0.30.3 // indirect
k8s.io/component-helpers v0.30.3 // indirect
k8s.io/csi-translation-lib v0.30.3 // indirect
k8s.io/cloud-provider v0.31.3 // indirect
k8s.io/component-base v0.31.3 // indirect
k8s.io/component-helpers v0.31.3 // indirect
k8s.io/csi-translation-lib v0.31.3 // indirect
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.26 // indirect
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.1 // indirect
Expand Down
Loading
Loading