Skip to content

Commit ad27688

Browse files
Bump github.com/fluxcd/pkg/runtime from 0.112.0 to 0.114.0 (#586)
* Bump github.com/fluxcd/pkg/runtime from 0.112.0 to 0.114.0 Bumps [github.com/fluxcd/pkg/runtime](https://github.com/fluxcd/pkg) from 0.112.0 to 0.114.0. - [Commits](fluxcd/pkg@runtime/v0.112.0...runtime/v0.114.0) --- updated-dependencies: - dependency-name: github.com/fluxcd/pkg/runtime dependency-version: 0.114.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update for the newest version. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kevin McDermott <bigkevmcd@gmail.com>
1 parent e5b3c59 commit ad27688

6 files changed

Lines changed: 123 additions & 117 deletions

File tree

‎controllers/gitopsset_controller.go‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const (
5252
)
5353

5454
type eventRecorder interface {
55-
Event(object runtime.Object, eventType, reason, message string)
55+
Eventf(object runtime.Object, related runtime.Object, eventtype, reason string, action string, messageFmt string, args ...any)
5656
}
5757

5858
// GitOpsSetReconciler reconciles a GitOpsSet object
@@ -70,7 +70,7 @@ type GitOpsSetReconciler struct {
7070
}
7171

7272
// event emits a Kubernetes event using EventRecorder
73-
func (r *GitOpsSetReconciler) event(obj *templatesv1.GitOpsSet, severity, msg string) {
73+
func (r *GitOpsSetReconciler) event(obj *templatesv1.GitOpsSet, severity, msg string, args ...any) {
7474
reason := conditions.GetReason(obj, fluxMeta.ReadyCondition)
7575
if reason == "" {
7676
reason = severity
@@ -81,7 +81,7 @@ func (r *GitOpsSetReconciler) event(obj *templatesv1.GitOpsSet, severity, msg st
8181
eventType = corev1.EventTypeWarning
8282
}
8383

84-
r.EventRecorder.Event(obj, eventType, reason, msg)
84+
r.EventRecorder.Eventf(obj, nil, eventType, reason, "", msg, args...)
8585
}
8686

8787
//+kubebuilder:rbac:groups=sets.gitops.pro,resources=gitopssets,verbs=get;list;watch;create;update;patch;delete
@@ -160,9 +160,9 @@ func (r *GitOpsSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
160160

161161
// Log and emit success event.
162162
if r.EventRecorder != nil && templatesv1.GetGitOpsSetReadiness(&gitOpsSet) == metav1.ConditionTrue {
163-
msg := fmt.Sprintf("Reconciliation finished in %s",
163+
r.event(&gitOpsSet, eventv1.EventSeverityInfo, "Reconciliation finished in %s",
164164
time.Since(reconcileStart).String())
165-
r.event(&gitOpsSet, eventv1.EventSeverityInfo, msg)
165+
166166
}
167167
}()
168168

@@ -184,8 +184,7 @@ func (r *GitOpsSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
184184
if err := r.patchStatus(ctx, req, gitOpsSet.Status); err != nil {
185185
logger.Error(err, "failed to reconcile")
186186
}
187-
msg := fmt.Sprintf("Reconciliation failed after %s", time.Since(reconcileStart).String())
188-
r.event(&gitOpsSet, eventv1.EventSeverityError, msg)
187+
r.event(&gitOpsSet, eventv1.EventSeverityError, "Reconciliation failed after %s", time.Since(reconcileStart).String())
189188

190189
return ctrl.Result{}, err
191190
}
@@ -197,8 +196,7 @@ func (r *GitOpsSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
197196
if err := r.patchStatus(ctx, req, gitOpsSet.Status); err != nil {
198197
logger.Error(err, "failed to reconcile")
199198
templatesv1.SetGitOpsSetReadiness(&gitOpsSet, inventory, metav1.ConditionFalse, templatesv1.ReconciliationFailedReason, err.Error())
200-
msg := "Status and inventory update failed after reconciliation"
201-
r.event(&gitOpsSet, eventv1.EventSeverityError, msg)
199+
r.event(&gitOpsSet, eventv1.EventSeverityError, "Status and inventory update failed after reconciliation")
202200

203201
return ctrl.Result{}, fmt.Errorf("failed to update status and inventory: %w", err)
204202
}

‎go.mod‎

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/fluxcd/pkg/apis/event v0.29.0
1212
github.com/fluxcd/pkg/apis/meta v1.32.0
1313
github.com/fluxcd/pkg/http/fetch v0.26.0
14-
github.com/fluxcd/pkg/runtime v0.112.0
14+
github.com/fluxcd/pkg/runtime v0.114.0
1515
github.com/fluxcd/pkg/tar v1.2.0
1616
github.com/fluxcd/source-controller/api v1.9.5
1717
github.com/gitops-tools/pkg v0.2.0
@@ -26,7 +26,7 @@ require (
2626
github.com/stretchr/testify v1.12.1
2727
github.com/weaveworks/cluster-controller v1.6.0
2828
go.uber.org/zap v1.28.0
29-
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f
29+
golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa
3030
k8s.io/api v0.37.1
3131
k8s.io/apiextensions-apiserver v0.37.1
3232
k8s.io/apimachinery v0.37.1
@@ -54,29 +54,29 @@ require (
5454
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
5555
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
5656
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
57-
github.com/fluxcd/cli-utils v1.2.2 // indirect
58-
github.com/fluxcd/pkg/apis/acl v0.10.0 // indirect
59-
github.com/fluxcd/pkg/apis/kustomize v1.20.0 // indirect
60-
github.com/fsnotify/fsnotify v1.9.0 // indirect
61-
github.com/fxamacker/cbor/v2 v2.9.2 // indirect
57+
github.com/fluxcd/cli-utils v1.3.0 // indirect
58+
github.com/fluxcd/pkg/apis/acl v0.11.0 // indirect
59+
github.com/fluxcd/pkg/apis/kustomize v1.21.0 // indirect
60+
github.com/fsnotify/fsnotify v1.10.1 // indirect
61+
github.com/fxamacker/cbor/v2 v2.9.3 // indirect
6262
github.com/go-errors/errors v1.5.1 // indirect
6363
github.com/go-fed/httpsig v1.1.0 // indirect
6464
github.com/go-openapi/jsonpointer v1.0.0 // indirect
65-
github.com/go-openapi/jsonreference v1.0.0 // indirect
66-
github.com/go-openapi/swag v0.27.1 // indirect
67-
github.com/go-openapi/swag/cmdutils v0.27.1 // indirect
68-
github.com/go-openapi/swag/conv v0.27.1 // indirect
69-
github.com/go-openapi/swag/fileutils v0.27.1 // indirect
70-
github.com/go-openapi/swag/jsonutils v0.27.1 // indirect
71-
github.com/go-openapi/swag/loading v0.27.1 // indirect
72-
github.com/go-openapi/swag/mangling v0.27.1 // indirect
73-
github.com/go-openapi/swag/netutils v0.27.1 // indirect
74-
github.com/go-openapi/swag/pools v0.27.1 // indirect
75-
github.com/go-openapi/swag/stringutils v0.27.1 // indirect
76-
github.com/go-openapi/swag/typeutils v0.27.1 // indirect
77-
github.com/go-openapi/swag/yamlutils v0.27.1 // indirect
65+
github.com/go-openapi/jsonreference v1.0.1 // indirect
66+
github.com/go-openapi/swag v0.29.1 // indirect
67+
github.com/go-openapi/swag/cmdutils v0.29.1 // indirect
68+
github.com/go-openapi/swag/conv v0.29.1 // indirect
69+
github.com/go-openapi/swag/fileutils v0.29.1 // indirect
70+
github.com/go-openapi/swag/jsonutils v0.29.1 // indirect
71+
github.com/go-openapi/swag/loading v0.29.1 // indirect
72+
github.com/go-openapi/swag/mangling v0.29.1 // indirect
73+
github.com/go-openapi/swag/netutils v0.29.1 // indirect
74+
github.com/go-openapi/swag/pools v0.29.1 // indirect
75+
github.com/go-openapi/swag/stringutils v0.29.1 // indirect
76+
github.com/go-openapi/swag/typeutils v0.29.1 // indirect
77+
github.com/go-openapi/swag/yamlutils v0.29.1 // indirect
7878
github.com/google/btree v1.1.3 // indirect
79-
github.com/google/gnostic-models v0.7.0 // indirect
79+
github.com/google/gnostic-models v0.7.1 // indirect
8080
github.com/google/uuid v1.6.0 // indirect
8181
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
8282
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
@@ -99,10 +99,10 @@ require (
9999
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
100100
github.com/pkg/errors v0.9.1 // indirect
101101
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
102-
github.com/prometheus/client_golang v1.24.0 // indirect
103-
github.com/prometheus/client_model v0.6.2 // indirect
104-
github.com/prometheus/common v0.70.0 // indirect
105-
github.com/prometheus/procfs v0.21.1 // indirect
102+
github.com/prometheus/client_golang v1.24.1 // indirect
103+
github.com/prometheus/client_model v0.6.3 // indirect
104+
github.com/prometheus/common v0.71.0 // indirect
105+
github.com/prometheus/procfs v0.22.0 // indirect
106106
github.com/russross/blackfriday/v2 v2.1.0 // indirect
107107
github.com/shopspring/decimal v1.4.0 // indirect
108108
github.com/shurcooL/githubv4 v0.0.0-20190718010115-4ba037080260 // indirect
@@ -124,15 +124,15 @@ require (
124124
golang.org/x/text v0.41.0 // indirect
125125
golang.org/x/time v0.15.0 // indirect
126126
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
127-
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect
127+
google.golang.org/protobuf v1.36.12 // indirect
128128
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
129129
gopkg.in/inf.v0 v0.9.1 // indirect
130-
k8s.io/cli-runtime v0.36.2 // indirect
130+
k8s.io/cli-runtime v0.37.0 // indirect
131131
k8s.io/component-base v0.37.1 // indirect
132132
k8s.io/klog/v2 v2.140.0 // indirect
133-
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect
134-
k8s.io/kubectl v0.36.2 // indirect
135-
k8s.io/utils v0.0.0-20260626114624-be93311217bd // indirect
133+
k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 // indirect
134+
k8s.io/kubectl v0.37.0 // indirect
135+
k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 // indirect
136136
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
137137
sigs.k8s.io/kustomize/api v0.21.1 // indirect
138138
sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect

0 commit comments

Comments
 (0)