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(deps): bump sigs.k8s.io/controller-runtime from 0.15.1 to 0.16.1 (backport of #7643) #7680

Merged
merged 2 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ require (
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9
k8s.io/kubectl v0.28.1
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/controller-runtime v0.15.1
sigs.k8s.io/controller-runtime v0.16.1
sigs.k8s.io/controller-tools v0.13.0
// When updating this also update version in: test/framework/k8s.go
sigs.k8s.io/gateway-api v0.8.0-rc1
Expand Down Expand Up @@ -203,7 +203,7 @@ require (
golang.org/x/sync v0.3.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/tools v0.12.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc=
gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0=
gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
Expand Down Expand Up @@ -1011,8 +1011,8 @@ k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c=
sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk=
sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0=
sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU=
sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI=
sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA=
sigs.k8s.io/gateway-api v0.8.0-rc1 h1:oRbzkElX4Ku/6FMslkIshAactoOn2nPSgU34hkvnnlw=
Expand Down
24 changes: 15 additions & 9 deletions pkg/plugins/bootstrap/k8s/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
kube_client "sigs.k8s.io/controller-runtime/pkg/client"
kube_manager "sigs.k8s.io/controller-runtime/pkg/manager"
kube_metrics "sigs.k8s.io/controller-runtime/pkg/metrics"
kube_metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
kube_webhook "sigs.k8s.io/controller-runtime/pkg/webhook"

config_core "github.com/kumahq/kuma/pkg/config/core"
"github.com/kumahq/kuma/pkg/core"
Expand Down Expand Up @@ -58,12 +60,14 @@ func (p *plugin) BeforeBootstrap(b *core_runtime.Builder, cfg core_plugins.Plugi
kube_ctrl.Options{
Scheme: scheme,
Cache: cache.Options{
UnsafeDisableDeepCopy: pointer.To(true),
DefaultUnsafeDisableDeepCopy: pointer.To(true),
},
// Admission WebHook Server
Host: b.Config().Runtime.Kubernetes.AdmissionServer.Address,
Port: int(b.Config().Runtime.Kubernetes.AdmissionServer.Port),
CertDir: b.Config().Runtime.Kubernetes.AdmissionServer.CertDir,
WebhookServer: kube_webhook.NewServer(kube_webhook.Options{
Host: b.Config().Runtime.Kubernetes.AdmissionServer.Address,
Port: int(b.Config().Runtime.Kubernetes.AdmissionServer.Port),
CertDir: b.Config().Runtime.Kubernetes.AdmissionServer.CertDir,
}),
LeaderElection: true,
LeaderElectionID: "cp-leader-lease",
LeaderElectionNamespace: systemNamespace,
Expand All @@ -72,7 +76,9 @@ func (p *plugin) BeforeBootstrap(b *core_runtime.Builder, cfg core_plugins.Plugi
RenewDeadline: &b.Config().Runtime.Kubernetes.LeaderElection.RenewDeadline.Duration,

// Disable metrics bind address as we use kube metrics registry directly.
MetricsBindAddress: "0",
Metrics: kube_metricsserver.Options{
BindAddress: "0",
},
},
)
if err != nil {
Expand Down Expand Up @@ -114,10 +120,10 @@ func (p *plugin) BeforeBootstrap(b *core_runtime.Builder, cfg core_plugins.Plugi
func createSecretClient(appCtx context.Context, scheme *kube_runtime.Scheme, systemNamespace string, config *rest.Config, restMapper meta.RESTMapper) (kube_client.Client, error) {
resyncPeriod := 10 * time.Hour // default resyncPeriod in Kubernetes
kubeCache, err := cache.New(config, cache.Options{
Scheme: scheme,
Mapper: restMapper,
SyncPeriod: &resyncPeriod,
Namespaces: []string{systemNamespace},
Scheme: scheme,
Mapper: restMapper,
SyncPeriod: &resyncPeriod,
DefaultNamespaces: map[string]cache.Config{systemNamespace: {}},
})
if err != nil {
return nil, err
Expand Down