Skip to content

Commit 68ee70a

Browse files
authored
Merge pull request #375 from gianlucam76/sveltos-applier
(chore) advance clusterapi to v1.12.2
2 parents c3d8a3f + 51a9674 commit 68ee70a

File tree

6 files changed

+34
-11
lines changed

6 files changed

+34
-11
lines changed

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func main() {
143143
d := deployer.GetClient(ctx, ctrl.Log.WithName("deployer"), mgr.GetClient(), workers)
144144
controllers.RegisterFeatures(d, setupLog)
145145

146-
controllers.SetManagementRecorder(mgr.GetEventRecorderFor("notification-recorder"))
146+
controllers.SetManagementRecorder(mgr.GetEventRecorder("notification-recorder"))
147147

148148
var clusterHealthCheckController controller.Controller
149149
clusterHealthCheckReconciler := getClusterHealthCheckReconciler(mgr)

controllers/notification.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ func sendKubernetesNotification(clusterNamespace, clusterName string,
113113
}
114114

115115
r := getManagementRecorder()
116-
r.Eventf(chc, eventType, "ClusterHealthCheck", message)
117-
118-
r.Event(chc, eventType, "ClusterHealthCheck", message)
116+
r.Eventf(chc, nil, eventType, "ClusterHealthCheck", "LivenessChecks", message)
119117
}
120118

121119
func sendSlackNotification(ctx context.Context, c client.Client, clusterNamespace, clusterName string,

controllers/recorder.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ limitations under the License.
1717
package controllers
1818

1919
import (
20-
"k8s.io/client-go/tools/record"
20+
"k8s.io/client-go/tools/events"
2121
)
2222

2323
var (
24-
managementRecorder record.EventRecorder
24+
managementRecorder events.EventRecorder
2525
)
2626

27-
func SetManagementRecorder(r record.EventRecorder) {
27+
func SetManagementRecorder(r events.EventRecorder) {
2828
managementRecorder = r
2929
}
3030

31-
func getManagementRecorder() record.EventRecorder {
31+
func getManagementRecorder() events.EventRecorder {
3232
return managementRecorder
3333
}

go.mod

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@ require (
2626
k8s.io/component-base v0.35.0
2727
k8s.io/klog/v2 v2.130.1
2828
k8s.io/utils v0.0.0-20260108192941-914a6e750570
29-
sigs.k8s.io/cluster-api v1.12.1
30-
sigs.k8s.io/controller-runtime v0.22.4
29+
sigs.k8s.io/cluster-api v1.12.2
30+
sigs.k8s.io/controller-runtime v0.23.0
3131
)
3232

3333
require (
3434
cel.dev/expr v0.25.1 // indirect
35+
dario.cat/mergo v1.0.2 // indirect
36+
github.com/MakeNowJust/heredoc v1.0.0 // indirect
37+
github.com/Masterminds/goutils v1.1.1 // indirect
3538
github.com/Masterminds/semver/v3 v3.4.0 // indirect
39+
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
40+
github.com/NYTimes/gziphandler v1.1.1 // indirect
3641
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
3742
github.com/beorn7/perks v1.0.1 // indirect
3843
github.com/blang/semver/v4 v4.0.0 // indirect
@@ -46,6 +51,7 @@ require (
4651
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
4752
github.com/go-errors/errors v1.5.1 // indirect
4853
github.com/go-logr/stdr v1.2.2 // indirect
54+
github.com/go-logr/zapr v1.3.0 // indirect
4955
github.com/go-openapi/jsonpointer v0.21.0 // indirect
5056
github.com/go-openapi/jsonreference v0.21.0 // indirect
5157
github.com/go-openapi/swag v0.23.0 // indirect
@@ -62,10 +68,14 @@ require (
6268
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
6369
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
6470
github.com/hexops/gotextdiff v1.0.3 // indirect
71+
github.com/huandu/xstrings v1.5.0 // indirect
6572
github.com/inconshreveable/mousetrap v1.1.0 // indirect
6673
github.com/josharian/intern v1.0.0 // indirect
6774
github.com/json-iterator/go v1.1.12 // indirect
75+
github.com/kylelemons/godebug v1.1.0 // indirect
6876
github.com/mailru/easyjson v0.7.7 // indirect
77+
github.com/mitchellh/copystructure v1.2.0 // indirect
78+
github.com/mitchellh/reflectwalk v1.0.2 // indirect
6979
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7080
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
7181
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
@@ -75,8 +85,11 @@ require (
7585
github.com/prometheus/client_model v0.6.2 // indirect
7686
github.com/prometheus/common v0.66.1 // indirect
7787
github.com/prometheus/procfs v0.16.1 // indirect
88+
github.com/shopspring/decimal v1.4.0 // indirect
89+
github.com/spf13/cast v1.10.0 // indirect
7890
github.com/spf13/cobra v1.10.1 // indirect
7991
github.com/stoewer/go-strcase v1.3.0 // indirect
92+
github.com/valyala/fastjson v1.6.4 // indirect
8093
github.com/x448/float16 v0.8.4 // indirect
8194
github.com/xlab/treeprint v1.2.0 // indirect
8295
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
@@ -88,6 +101,8 @@ require (
88101
go.opentelemetry.io/otel/sdk v1.36.0 // indirect
89102
go.opentelemetry.io/otel/trace v1.36.0 // indirect
90103
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
104+
go.uber.org/multierr v1.11.0 // indirect
105+
go.uber.org/zap v1.27.1 // indirect
91106
go.yaml.in/yaml/v2 v2.4.3 // indirect
92107
go.yaml.in/yaml/v3 v3.0.4 // indirect
93108
golang.org/x/crypto v0.46.0 // indirect

go.sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1
1010
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
1111
github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
1212
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
13+
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
14+
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
1315
github.com/TwiN/go-color v1.4.1 h1:mqG0P/KBgHKVqmtL5ye7K0/Gr4l6hTksPgTgMk3mUzc=
1416
github.com/TwiN/go-color v1.4.1/go.mod h1:WcPf/jtiW95WBIsEeY1Lc/b8aaWoiqQpu5cf8WFxu+s=
1517
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
@@ -221,6 +223,8 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
221223
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
222224
github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
223225
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
226+
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
227+
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
224228
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
225229
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
226230
github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ=
@@ -391,8 +395,14 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUo
391395
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
392396
sigs.k8s.io/cluster-api v1.12.1 h1:s3DivSZjXdu2HPyOtV/n6XwSZBaIycZdKNs4y8X+3lY=
393397
sigs.k8s.io/cluster-api v1.12.1/go.mod h1:+S6WJdi8UPdqv5q9nka5al3ed/Qa0zAcSBgzTaa9VKA=
398+
sigs.k8s.io/cluster-api v1.12.2 h1:+b+M2IygfvFZJq7bsaloNakimMEVNf81zkGR1IiuxXs=
399+
sigs.k8s.io/cluster-api v1.12.2/go.mod h1:2XuF/dmN3c/1VITb6DB44N5+Ecvsvd5KOWqrY9Q53nU=
394400
sigs.k8s.io/controller-runtime v0.22.4 h1:GEjV7KV3TY8e+tJ2LCTxUTanW4z/FmNB7l327UfMq9A=
395401
sigs.k8s.io/controller-runtime v0.22.4/go.mod h1:+QX1XUpTXN4mLoblf4tqr5CQcyHPAki2HLXqQMY6vh8=
402+
sigs.k8s.io/controller-runtime v0.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE=
403+
sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI=
404+
sigs.k8s.io/controller-runtime v0.23.0 h1:Ubi7klJWiwEWqDY+odSVZiFA0aDSevOCXpa38yCSYu8=
405+
sigs.k8s.io/controller-runtime v0.23.0/go.mod h1:DBOIr9NsprUqCZ1ZhsuJ0wAnQSIxY/C6VjZbmLgw0j0=
396406
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
397407
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
398408
sigs.k8s.io/kustomize/api v0.21.0 h1:I7nry5p8iDJbuRdYS7ez8MUvw7XVNPcIP5GkzzuXIIQ=

test/pullmode-sveltosapplier.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
valueFrom:
100100
fieldRef:
101101
fieldPath: metadata.namespace
102-
image: docker.io/projectsveltos/sveltos-applier@sha256:398c67e7ab2cb35950cb30c8ada29778e820c164379fab8130054c4cb2d7d8b0
102+
image: docker.io/projectsveltos/sveltos-applier@sha256:63f1b91a85a285d07e220fd083d10eb38aff976516a486becd9842a34fbef50a
103103
livenessProbe:
104104
failureThreshold: 3
105105
httpGet:

0 commit comments

Comments
 (0)