Skip to content

Commit

Permalink
Update controller-runtime to 0.12.1
Browse files Browse the repository at this point in the history
- refactor code wherever needed
- recreate generated files
- book: document dependency updates and field removals

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
  • Loading branch information
palnabarun committed Jun 6, 2022
1 parent d468add commit 1167c97
Show file tree
Hide file tree
Showing 18 changed files with 343 additions and 299 deletions.
2 changes: 1 addition & 1 deletion bootstrap/kubeadm/main.go
Expand Up @@ -145,7 +145,7 @@ func main() {
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

if err := logOptions.ValidateAndApply(); err != nil {
if err := logOptions.ValidateAndApply(nil); err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
Expand Down
5 changes: 4 additions & 1 deletion config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
Expand Up @@ -272,7 +272,10 @@ spec:
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from the
key-value store until this reference is removed. Defaults
key-value store until this reference is removed. See
https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
for how the garbage collector interacts with this
field and enforces the foreground deletion. Defaults
to false. To set this field, a user needs "delete"
permission of the owner, otherwise 422 (Unprocessable
Entity) will be returned.
Expand Down
5 changes: 4 additions & 1 deletion config/crd/bases/cluster.x-k8s.io_machinepools.yaml
Expand Up @@ -214,7 +214,10 @@ spec:
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from the
key-value store until this reference is removed. Defaults
key-value store until this reference is removed. See
https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
for how the garbage collector interacts with this
field and enforces the foreground deletion. Defaults
to false. To set this field, a user needs "delete"
permission of the owner, otherwise 422 (Unprocessable
Entity) will be returned.
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/cluster.x-k8s.io_machines.yaml
Expand Up @@ -647,7 +647,7 @@ spec:
type: string
containerRuntimeVersion:
description: ContainerRuntime Version reported by the node through
runtime remote API (e.g. docker://1.5.0).
runtime remote API (e.g. containerd://1.4.2).
type: string
kernelVersion:
description: Kernel Version reported by the node from 'uname -r'
Expand Down Expand Up @@ -1044,7 +1044,7 @@ spec:
type: string
containerRuntimeVersion:
description: ContainerRuntime Version reported by the node through
runtime remote API (e.g. docker://1.5.0).
runtime remote API (e.g. containerd://1.4.2).
type: string
kernelVersion:
description: Kernel Version reported by the node from 'uname -r'
Expand Down
5 changes: 4 additions & 1 deletion config/crd/bases/cluster.x-k8s.io_machinesets.yaml
Expand Up @@ -210,7 +210,10 @@ spec:
blockOwnerDeletion:
description: If true, AND if the owner has the "foregroundDeletion"
finalizer, then the owner cannot be deleted from the
key-value store until this reference is removed. Defaults
key-value store until this reference is removed. See
https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion
for how the garbage collector interacts with this
field and enforces the foreground deletion. Defaults
to false. To set this field, a user needs "delete"
permission of the owner, otherwise 422 (Unprocessable
Entity) will be returned.
Expand Down
2 changes: 1 addition & 1 deletion controlplane/kubeadm/main.go
Expand Up @@ -148,7 +148,7 @@ func main() {
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()

if err := logOptions.ValidateAndApply(); err != nil {
if err := logOptions.ValidateAndApply(nil); err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
Expand Down
7 changes: 5 additions & 2 deletions docs/book/src/developer/providers/v1.1-to-v1.2.md
Expand Up @@ -13,6 +13,9 @@ maintainers of providers and consumers of our Go API.
in ClusterAPI are kept in sync with the versions used by `sigs.k8s.io/controller-runtime`.

- sigs.k8s.io/kind: v0.11.x => v0.14.x
- k8s.io/*: v0.23.x => v0.24.x (derived from controller-runtime)
- github.com/onsi/gomega: v0.17.0 => v0.18.1 (derived from controller-runtime)
- k8s.io/kubectl: v0.23.5 => 0.24.0

## Changes by Kind

Expand All @@ -21,11 +24,11 @@ in ClusterAPI are kept in sync with the versions used by `sigs.k8s.io/controller
* `util.MachinesByCreationTimestamp` has been deprecated and will be removed in a future release.

### Removals
* The `third_party/kubernetes-drain` package has been removed, as we're now using `k8s.io/kubectl/pkg/drain` instead ([PR](https://github.com/kubernetes-sigs/cluster-api/pull/5440)).
* The `third_party/kubernetes-drain` package has been removed, as we're now using `k8s.io/kubectl/pkg/drain` instead ([PR](https://github.com/kubernetes-sigs/cluster-api/pull/5440)).
* `util/version.CompareWithBuildIdentifiers` has been removed, please use `util/version.Compare(a, b, WithBuildTags())` instead.
* The functions `annotations.HasPausedAnnotation` and `annotations.HasSkipRemediationAnnotation` have been removed, please use
`annotations.HasPaused` and `annotations.HasSkipRemediation` respectively instead.
-
* `ObjectMeta.ClusterName` has been removed from `k8s.io/apimachinery/pkg/apis/meta/v1`.

### API Changes

Expand Down
61 changes: 32 additions & 29 deletions go.mod
Expand Up @@ -21,28 +21,28 @@ require (
github.com/google/gofuzz v1.2.0
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/onsi/gomega v1.18.1
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.10.1
github.com/valyala/fastjson v1.6.3
go.etcd.io/etcd/api/v3 v3.5.3
go.etcd.io/etcd/client/v3 v3.5.3
golang.org/x/net v0.0.0-20211209124913-491a49abca63
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
google.golang.org/grpc v1.43.0
k8s.io/api v0.23.5
k8s.io/apiextensions-apiserver v0.23.5
k8s.io/apimachinery v0.23.5
k8s.io/apiserver v0.23.5
k8s.io/client-go v0.23.5
k8s.io/api v0.24.0
k8s.io/apiextensions-apiserver v0.24.0
k8s.io/apimachinery v0.24.0
k8s.io/apiserver v0.24.0
k8s.io/client-go v0.24.0
k8s.io/cluster-bootstrap v0.23.0
k8s.io/component-base v0.23.5
k8s.io/klog/v2 v2.30.0
k8s.io/kubectl v0.23.0
k8s.io/utils v0.0.0-20211116205334-6203023598ed
sigs.k8s.io/controller-runtime v0.11.2
k8s.io/component-base v0.24.0
k8s.io/klog/v2 v2.60.1
k8s.io/kubectl v0.24.0
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
sigs.k8s.io/controller-runtime v0.12.1
sigs.k8s.io/yaml v1.3.0
)

Expand Down Expand Up @@ -83,11 +83,10 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/cel-go v0.9.0 // indirect
github.com/google/cel-go v0.10.1 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
Expand All @@ -106,7 +105,7 @@ require (
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
Expand All @@ -116,10 +115,10 @@ require (
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.1 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.28.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday v1.5.2 // indirect
github.com/shopspring/decimal v1.2.0 // indirect
Expand All @@ -137,26 +136,30 @@ require (
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.1 // indirect
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
golang.org/x/sys v0.0.0-20211210111614-af8b64212486 // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/cli-runtime v0.23.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/kustomize/api v0.10.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
k8s.io/cli-runtime v0.24.0 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/kustomize/api v0.11.4 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
)

require github.com/emicklei/go-restful v2.15.0+incompatible // indirect
require (
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
)

0 comments on commit 1167c97

Please sign in to comment.