Skip to content

Commit

Permalink
Merge pull request #211 from yevgeny-shnaidman/yevgeny/controller-run…
Browse files Browse the repository at this point in the history
…time-v0.17.0

controller-runtime package update
  • Loading branch information
k8s-ci-robot authored Feb 13, 2024
2 parents a06b242 + 3d2e8e9 commit 22f0fa2
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 600 deletions.
38 changes: 19 additions & 19 deletions controllers/nodefeaturediscovery_finalizers.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
// If NFD-Topology-Updater was requested
if instance.Spec.TopologyUpdater {
// Attempt to delete Topology DaemonSet
err := wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteDaemonSet(ctx, instance.ObjectMeta.Namespace, nfdTopologyUpdaterApp)
if err != nil {
return false, interpretError(err, "Topology DaemonSet")
Expand All @@ -134,7 +134,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
return err
}
// Attempt to delete the ClusterRole
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteClusterRole(ctx, instance.ObjectMeta.Namespace, nfdTopologyUpdaterApp)
if err != nil {
return false, interpretError(err, "nfd-Topology-Updater ClusterRole")
Expand All @@ -146,7 +146,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
return err
}
// Attempt to delete the ClusterRoleBinding
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteClusterRoleBinding(ctx, instance.ObjectMeta.Namespace, nfdTopologyUpdaterApp)
if err != nil {
return false, interpretError(err, "ClusterRoleBinding")
Expand All @@ -158,7 +158,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
return err
}
// Attempt to delete the Worker ServiceAccount
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteServiceAccount(ctx, instance.ObjectMeta.Namespace, nfdTopologyUpdaterApp)
if err != nil {
return false, interpretError(err, "worker ServiceAccount")
Expand All @@ -172,7 +172,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete worker DaemonSet
err := wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteDaemonSet(ctx, instance.ObjectMeta.Namespace, nfdWorkerApp)
if err != nil {
return false, interpretError(err, "worker DaemonSet")
Expand All @@ -185,7 +185,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete master Deployment
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteDeployment(ctx, instance.ObjectMeta.Namespace, nfdMasterApp)
if err != nil {
return false, interpretError(err, "master Deployment")
Expand All @@ -198,7 +198,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the Service
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteService(ctx, instance.ObjectMeta.Namespace, nfdMasterApp)
if err != nil {
return false, interpretError(err, "nfd-master Service")
Expand All @@ -211,7 +211,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the Role
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteRole(ctx, instance.ObjectMeta.Namespace, nfdWorkerApp)
if err != nil {
return false, interpretError(err, "nfd-worker Role")
Expand All @@ -224,7 +224,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the ClusterRole
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteClusterRole(ctx, instance.ObjectMeta.Namespace, nfdMasterApp)
if err != nil {
return false, interpretError(err, "nfd-master ClusterRole")
Expand All @@ -237,7 +237,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the RoleBinding
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteRoleBinding(ctx, instance.ObjectMeta.Namespace, nfdWorkerApp)
if err != nil {
return false, interpretError(err, "nfd-worker RoleBinding")
Expand All @@ -250,7 +250,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the ClusterRoleBinding
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteClusterRoleBinding(ctx, instance.ObjectMeta.Namespace, nfdMasterApp)
if err != nil {
return false, interpretError(err, "ClusterRoleBinding")
Expand All @@ -263,7 +263,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the Worker ServiceAccount
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteServiceAccount(ctx, instance.ObjectMeta.Namespace, nfdWorkerApp)
if err != nil {
return false, interpretError(err, "worker ServiceAccount")
Expand All @@ -276,7 +276,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the Master ServiceAccount
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteServiceAccount(ctx, instance.ObjectMeta.Namespace, nfdMasterApp)
if err != nil {
return false, interpretError(err, "master ServiceAccount")
Expand All @@ -289,7 +289,7 @@ func (r *NodeFeatureDiscoveryReconciler) deleteComponents(ctx context.Context, i
}

// Attempt to delete the Worker config map
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteConfigMap(ctx, instance.ObjectMeta.Namespace, nfdWorkerApp)
if err != nil {
return false, interpretError(err, "nfd-worker config map")
Expand Down Expand Up @@ -398,7 +398,7 @@ func deployPrune(ctx context.Context, r *NodeFeatureDiscoveryReconciler, instanc
}

// wait until job is finished and then delete it
err := wait.Poll(RetryInterval, time.Minute*3, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(ctx, RetryInterval, time.Minute*3, false, func(ctx context.Context) (done bool, err error) {
job, err := r.getJob(ctx, instance.ObjectMeta.Namespace, nfdPruneApp)
if err != nil {
return false, err
Expand All @@ -414,7 +414,7 @@ func deployPrune(ctx context.Context, r *NodeFeatureDiscoveryReconciler, instanc

// delete job and RBAC objects
// Attempt to delete the Job
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteJob(ctx, instance.ObjectMeta.Namespace, nfdPruneApp)
if err != nil {
return false, interpretError(err, "Prune Job")
Expand All @@ -426,7 +426,7 @@ func deployPrune(ctx context.Context, r *NodeFeatureDiscoveryReconciler, instanc
return err
}
// Attempt to delete the ServiceAccount
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteServiceAccount(ctx, instance.ObjectMeta.Namespace, nfdPruneApp)
if err != nil {
return false, interpretError(err, "Prune ServiceAccount")
Expand All @@ -439,7 +439,7 @@ func deployPrune(ctx context.Context, r *NodeFeatureDiscoveryReconciler, instanc
}

// Attempt to delete the ClusterRole
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteClusterRole(ctx, instance.ObjectMeta.Namespace, nfdPruneApp)
if err != nil {
return false, interpretError(err, "Prune ClusterRole")
Expand All @@ -452,7 +452,7 @@ func deployPrune(ctx context.Context, r *NodeFeatureDiscoveryReconciler, instanc
}

// Attempt to delete the ClusterRoleBinding
err = wait.Poll(RetryInterval, Timeout, func() (done bool, err error) {
err = wait.PollUntilContextTimeout(ctx, RetryInterval, Timeout, false, func(ctx context.Context) (done bool, err error) {
err = r.deleteClusterRoleBinding(ctx, instance.ObjectMeta.Namespace, nfdPruneApp)
if err != nil {
return false, interpretError(err, "Prune ClusterRoleBinding")
Expand Down
94 changes: 48 additions & 46 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,70 +3,72 @@ module sigs.k8s.io/node-feature-discovery-operator
go 1.21

require (
github.com/onsi/ginkgo/v2 v2.6.0
github.com/onsi/gomega v1.24.1
k8s.io/api v0.26.9
k8s.io/apimachinery v0.26.9
k8s.io/client-go v0.26.9
k8s.io/klog/v2 v2.80.1
github.com/onsi/ginkgo/v2 v2.14.0
github.com/onsi/gomega v1.30.0
k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.1
k8s.io/client-go v0.29.1
k8s.io/klog/v2 v2.120.1
k8s.io/kubectl v0.26.9
sigs.k8s.io/controller-runtime v0.14.6
sigs.k8s.io/controller-runtime v0.17.1
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/golang/protobuf v1.5.3 // 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/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.26.9 // indirect
k8s.io/component-base v0.26.9 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
k8s.io/apiextensions-apiserver v0.29.1 // indirect
k8s.io/component-base v0.29.1 // indirect
k8s.io/kube-openapi v0.0.0-20240209001042-7a0d5b415232 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 22f0fa2

Please sign in to comment.