Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Aug 22, 2024
1 parent dae31ad commit 18adc3f
Show file tree
Hide file tree
Showing 12 changed files with 745 additions and 546 deletions.
3 changes: 3 additions & 0 deletions api/v1beta1/condition_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ const (
// DrainingReason (Severity=Info) documents a machine node being drained.
DrainingReason = "Draining"

// DrainingNotCompletedReason (Severity=Info) documents if a machine node drain is not completed yet.
DrainingNotCompletedReason = "DrainingNotCompleted"

// DrainingFailedReason (Severity=Warning) documents a machine node drain operation failed.
DrainingFailedReason = "DrainingFailed"

Expand Down
13 changes: 4 additions & 9 deletions controllers/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package controllers

import (
"context"
"time"

ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -65,18 +64,14 @@ type MachineReconciler struct {

// WatchFilterValue is the label value used to filter events prior to reconciliation.
WatchFilterValue string

// NodeDrainClientTimeout timeout of the client used for draining nodes.
NodeDrainClientTimeout time.Duration
}

func (r *MachineReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error {
return (&machinecontroller.Reconciler{
Client: r.Client,
APIReader: r.APIReader,
Tracker: r.Tracker,
WatchFilterValue: r.WatchFilterValue,
NodeDrainClientTimeout: r.NodeDrainClientTimeout,
Client: r.Client,
APIReader: r.APIReader,
Tracker: r.Tracker,
WatchFilterValue: r.WatchFilterValue,
}).SetupWithManager(ctx, mgr, options)
}

Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ require (
github.com/valyala/fastjson v1.6.4
go.etcd.io/etcd/api/v3 v3.5.15
go.etcd.io/etcd/client/v3 v3.5.15
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/oauth2 v0.22.0
golang.org/x/text v0.17.0
gomodules.xyz/jsonpatch/v2 v2.4.0
Expand All @@ -52,8 +53,6 @@ require (
sigs.k8s.io/yaml v1.4.0
)

require k8s.io/cli-runtime v0.31.0

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
Expand Down Expand Up @@ -158,7 +157,6 @@ require (
go.uber.org/zap v1.27.0 // indirect
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
Expand All @@ -173,6 +171,7 @@ require (
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cli-runtime v0.31.0 // indirect
k8s.io/component-helpers v0.31.0 // indirect
k8s.io/metrics v0.31.0 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect
Expand Down
41 changes: 0 additions & 41 deletions internal/controllers/machine/drain/cordon.go

This file was deleted.

73 changes: 0 additions & 73 deletions internal/controllers/machine/drain/cordon_test.go

This file was deleted.

Loading

0 comments on commit 18adc3f

Please sign in to comment.