Skip to content

Commit c85bb9a

Browse files
author
Leonid Podolinskiy
authored
update dependencies (#20)
move k3s test to 1.28
1 parent 7f8c31a commit c85bb9a

File tree

6 files changed

+100
-190
lines changed

6 files changed

+100
-190
lines changed

.github/workflows/e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
./get_helm.sh
4949
5050
#Install k3s
51-
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_VERSION="v1.24.4+k3s1" sh -s - --docker
51+
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" INSTALL_K3S_VERSION="v1.28.5+k3s1" sh -s -
5252
5353
mkdir ~/.kube || echo "~/.kube already existed"
5454
sudo chmod 777 /etc/rancher/k3s/k3s.yaml

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ IMAGE_TAG_BASE ?= lightruncom/lightrun-k8s-operator
99
# Image URL to use all building/pushing image targets
1010
IMG ?= controller:latest
1111
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
12-
ENVTEST_K8S_VERSION = 1.27.1
12+
ENVTEST_K8S_VERSION = 1.28.0
1313

1414
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
1515
ifeq (,$(shell go env GOBIN))

cmd/main.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ import (
3232
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
3333
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
3434
ctrl "sigs.k8s.io/controller-runtime"
35+
"sigs.k8s.io/controller-runtime/pkg/cache"
3536
"sigs.k8s.io/controller-runtime/pkg/healthz"
3637
"sigs.k8s.io/controller-runtime/pkg/log/zap"
3738

3839
agentsv1beta "github.com/lightrun-platform/lightrun-k8s-operator/api/v1beta"
3940
"github.com/lightrun-platform/lightrun-k8s-operator/internal/controller"
41+
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
4042
//+kubebuilder:scaffold:imports
4143
)
4244

@@ -92,8 +94,7 @@ func main() {
9294

9395
options := ctrl.Options{
9496
Scheme: scheme,
95-
MetricsBindAddress: metricsAddr,
96-
Port: 9443,
97+
Metrics: metricsserver.Options{BindAddress: metricsAddr},
9798
HealthProbeBindAddress: probeAddr,
9899
LeaderElection: enableLeaderElection,
99100
LeaderElectionID: "5b425f09.lightrun.com",
@@ -116,7 +117,10 @@ func main() {
116117
setupLog.Info("Controller will watch and manage resources in all namespaces")
117118
} else {
118119
setupLog.Info("Controller will watch following namespaces", "namespaces", watchNamespaces)
119-
options.Cache.Namespaces = watchNamespaces
120+
options.Cache.DefaultNamespaces = make(map[string]cache.Config)
121+
for _, namespace := range watchNamespaces {
122+
options.Cache.DefaultNamespaces[namespace] = cache.Config{}
123+
}
120124
}
121125

122126
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), options)

go.mod

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,34 @@ go 1.20
44

55
require (
66
github.com/go-logr/logr v1.2.4
7-
github.com/onsi/ginkgo/v2 v2.9.5
8-
github.com/onsi/gomega v1.27.7
9-
go.uber.org/zap v1.24.0
10-
k8s.io/api v0.27.2
11-
k8s.io/apimachinery v0.27.2
12-
k8s.io/client-go v0.27.2
13-
k8s.io/utils v0.0.0-20230209194617-a36077c30491
14-
sigs.k8s.io/controller-runtime v0.15.0
7+
github.com/onsi/ginkgo/v2 v2.11.0
8+
github.com/onsi/gomega v1.27.10
9+
go.uber.org/zap v1.25.0
10+
k8s.io/api v0.28.3
11+
k8s.io/apimachinery v0.28.3
12+
k8s.io/client-go v0.28.3
13+
// k8s.io/utils v0.0.0-20230209194617-a36077c30491
14+
sigs.k8s.io/controller-runtime v0.16.3
1515
)
1616

17+
require k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
18+
1719
require (
1820
github.com/beorn7/perks v1.0.1 // indirect
1921
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2022
github.com/davecgh/go-spew v1.1.1 // indirect
21-
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
23+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
2224
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
2325
github.com/fsnotify/fsnotify v1.6.0 // indirect
2426
github.com/go-logr/zapr v1.2.4 // indirect
2527
github.com/go-openapi/jsonpointer v0.19.6 // indirect
26-
github.com/go-openapi/jsonreference v0.20.1 // indirect
28+
github.com/go-openapi/jsonreference v0.20.2 // indirect
2729
github.com/go-openapi/swag v0.22.3 // indirect
2830
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
2931
github.com/gogo/protobuf v1.3.2 // indirect
3032
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3133
github.com/golang/protobuf v1.5.3 // indirect
32-
github.com/google/gnostic v0.6.9 // indirect
34+
github.com/google/gnostic-models v0.6.8 // indirect
3335
github.com/google/go-cmp v0.5.9 // indirect
3436
github.com/google/gofuzz v1.2.0 // indirect
3537
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
@@ -43,30 +45,30 @@ require (
4345
github.com/modern-go/reflect2 v1.0.2 // indirect
4446
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4547
github.com/pkg/errors v0.9.1 // indirect
46-
github.com/prometheus/client_golang v1.15.1 // indirect
48+
github.com/prometheus/client_golang v1.16.0 // indirect
4749
github.com/prometheus/client_model v0.4.0 // indirect
48-
github.com/prometheus/common v0.42.0 // indirect
49-
github.com/prometheus/procfs v0.9.0 // indirect
50+
github.com/prometheus/common v0.44.0 // indirect
51+
github.com/prometheus/procfs v0.10.1 // indirect
5052
github.com/spf13/pflag v1.0.5 // indirect
51-
go.uber.org/atomic v1.7.0 // indirect
52-
go.uber.org/multierr v1.6.0 // indirect
53-
golang.org/x/net v0.10.0 // indirect
54-
golang.org/x/oauth2 v0.5.0 // indirect
55-
golang.org/x/sys v0.8.0 // indirect
56-
golang.org/x/term v0.8.0 // indirect
57-
golang.org/x/text v0.9.0 // indirect
53+
go.uber.org/multierr v1.11.0 // indirect
54+
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
55+
golang.org/x/net v0.17.0 // indirect
56+
golang.org/x/oauth2 v0.8.0 // indirect
57+
golang.org/x/sys v0.13.0 // indirect
58+
golang.org/x/term v0.13.0 // indirect
59+
golang.org/x/text v0.13.0 // indirect
5860
golang.org/x/time v0.3.0 // indirect
59-
golang.org/x/tools v0.9.1 // indirect
60-
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
61+
golang.org/x/tools v0.9.3 // indirect
62+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
6163
google.golang.org/appengine v1.6.7 // indirect
6264
google.golang.org/protobuf v1.30.0 // indirect
6365
gopkg.in/inf.v0 v0.9.1 // indirect
6466
gopkg.in/yaml.v2 v2.4.0 // indirect
6567
gopkg.in/yaml.v3 v3.0.1 // indirect
66-
k8s.io/apiextensions-apiserver v0.27.2 // indirect
67-
k8s.io/component-base v0.27.2 // indirect
68-
k8s.io/klog/v2 v2.90.1 // indirect
69-
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
68+
k8s.io/apiextensions-apiserver v0.28.3 // indirect
69+
k8s.io/component-base v0.28.3 // indirect
70+
k8s.io/klog/v2 v2.100.1 // indirect
71+
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
7072
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
7173
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
7274
sigs.k8s.io/yaml v1.3.0 // indirect

0 commit comments

Comments
 (0)