From 7ebae7573bc78e994af07791265b006a3088bec3 Mon Sep 17 00:00:00 2001 From: Quentin Bisson Date: Thu, 28 Nov 2024 13:00:27 +0100 Subject: [PATCH 1/5] refactor and simplify code (#283) --- .../observability_bundle_configmap.go | 74 +++++++++----- pkg/resource/agents-toggle/reconciler.go | 98 ++++--------------- 2 files changed, 68 insertions(+), 104 deletions(-) diff --git a/pkg/resource/agents-toggle/observability_bundle_configmap.go b/pkg/resource/agents-toggle/observability_bundle_configmap.go index 49a80184..62d59c1d 100644 --- a/pkg/resource/agents-toggle/observability_bundle_configmap.go +++ b/pkg/resource/agents-toggle/observability_bundle_configmap.go @@ -5,7 +5,6 @@ import ( "github.com/blang/semver" "github.com/pkg/errors" - v1 "k8s.io/api/core/v1" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/yaml" @@ -13,7 +12,14 @@ import ( loggedcluster "github.com/giantswarm/logging-operator/pkg/logged-cluster" ) -type Values struct { +var ( + supportAlloyEvents = semver.MustParse("1.9.0") + supportAlloyLogs = semver.MustParse("1.6.0") + supportGrafanaAgent = semver.MustParse("0.9.0") + useLegacyPromtailApp = semver.MustParse("1.0.0") +) + +type values struct { Apps map[string]app `yaml:"apps" json:"apps"` } @@ -22,19 +28,41 @@ type app struct { Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"` } -// GenerateObservabilityBundleConfigMap returns a configmap for +// generateObservabilityBundleConfig returns a configmap for // the observabilitybundle application to enable logging agents and events-loggers. -func GenerateObservabilityBundleConfigMap(ctx context.Context, lc loggedcluster.Interface, observabilityBundleVersion semver.Version) (v1.ConfigMap, error) { +func generateObservabilityBundleConfig(ctx context.Context, lc loggedcluster.Interface, observabilityBundleVersion semver.Version) (string, error) { appsToEnable := map[string]app{} + if err := toggleLogAgent(ctx, lc, observabilityBundleVersion, appsToEnable); err != nil { + return "", errors.WithStack(err) + } + + if err := toggleKubeEventsLogger(ctx, lc, observabilityBundleVersion, appsToEnable); err != nil { + return "", errors.WithStack(err) + } + + values := values{ + Apps: appsToEnable, + } + + v, err := yaml.Marshal(values) + if err != nil { + return "", errors.WithStack(err) + } + + return string(v), nil +} + +// toggleLogAgent toggles the logging agent based on the observability bundle version. +func toggleLogAgent(ctx context.Context, lc loggedcluster.Interface, observabilityBundleVersion semver.Version, appsToEnable map[string]app) error { + logger := log.FromContext(ctx) promtailAppName := common.PromtailObservabilityBundleAppName - if observabilityBundleVersion.LT(semver.MustParse("1.0.0")) { + if observabilityBundleVersion.LT(useLegacyPromtailApp) { promtailAppName = common.PromtailObservabilityBundleLegacyAppName } // Enforce promtail as logging agent when observability-bundle version < 1.6.0 because this needs alloy 0.4.0. - if observabilityBundleVersion.LT(semver.MustParse("1.6.0")) && lc.GetLoggingAgent() == common.LoggingAgentAlloy { - logger := log.FromContext(ctx) + if observabilityBundleVersion.LT(supportAlloyLogs) && lc.GetLoggingAgent() == common.LoggingAgentAlloy { logger.Info("Alloy logging agent is not supported by observability bundle, using promtail instead.", "observability-bundle-version", observabilityBundleVersion, "logging-agent", lc.GetLoggingAgent()) lc.SetLoggingAgent(common.LoggingAgentPromtail) } @@ -56,14 +84,20 @@ func GenerateObservabilityBundleConfigMap(ctx context.Context, lc loggedcluster. Enabled: false, } default: - return v1.ConfigMap{}, errors.Errorf("unsupported logging agent %q", lc.GetLoggingAgent()) + return errors.Errorf("unsupported logging agent %q", lc.GetLoggingAgent()) } + return nil +} + +// toggleKubeEventsLogger toggles the kube-events-logger based on the observability bundle version. +func toggleKubeEventsLogger(ctx context.Context, lc loggedcluster.Interface, observabilityBundleVersion semver.Version, appsToEnable map[string]app) error { + logger := log.FromContext(ctx) + // If observability-bundle version >= 0.9.0, events loggers can be enabled. - if observabilityBundleVersion.GT(semver.MustParse("0.9.0")) { + if observabilityBundleVersion.GT(supportGrafanaAgent) { // Enforce grafana-agent as events logger when observability-bundle version < 1.9.0 because this needs alloy 0.7.0. - if observabilityBundleVersion.LT(semver.MustParse("1.9.0")) && lc.GetKubeEventsLogger() == common.EventsLoggerAlloy { - logger := log.FromContext(ctx) + if observabilityBundleVersion.LT(supportAlloyEvents) && lc.GetKubeEventsLogger() == common.EventsLoggerAlloy { logger.Info("Alloy events logger is not supported by observability bundle, using grafana-agent instead.", "observability-bundle-version", observabilityBundleVersion, "events-logger", lc.GetKubeEventsLogger()) lc.SetKubeEventsLogger(common.EventsLoggerGrafanaAgent) } @@ -84,23 +118,9 @@ func GenerateObservabilityBundleConfigMap(ctx context.Context, lc loggedcluster. Enabled: true, } default: - return v1.ConfigMap{}, errors.Errorf("unsupported events logger %q", lc.GetKubeEventsLogger()) + return errors.Errorf("unsupported events logger %q", lc.GetKubeEventsLogger()) } } - values := Values{ - Apps: appsToEnable, - } - - v, err := yaml.Marshal(values) - if err != nil { - return v1.ConfigMap{}, errors.WithStack(err) - } - - configmap := v1.ConfigMap{ - ObjectMeta: common.ObservabilityBundleConfigMapMeta(lc), - Data: map[string]string{"values": string(v)}, - } - - return configmap, nil + return nil } diff --git a/pkg/resource/agents-toggle/reconciler.go b/pkg/resource/agents-toggle/reconciler.go index dbb666a8..7ed1b487 100644 --- a/pkg/resource/agents-toggle/reconciler.go +++ b/pkg/resource/agents-toggle/reconciler.go @@ -2,22 +2,19 @@ package agentstoggle import ( "context" - "reflect" "time" - "github.com/blang/semver" - appv1 "github.com/giantswarm/apiextensions-application/api/v1alpha1" "github.com/pkg/errors" v1 "k8s.io/api/core/v1" apimachineryerrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" "github.com/giantswarm/logging-operator/pkg/common" loggedcluster "github.com/giantswarm/logging-operator/pkg/logged-cluster" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/log" ) @@ -44,97 +41,44 @@ func (r *Reconciler) ReconcileCreate(ctx context.Context, lc loggedcluster.Inter return ctrl.Result{}, errors.WithStack(err) } - // Get desired configmap to enable logging agents and events loggers. - desiredConfigMap, err := GenerateObservabilityBundleConfigMap(ctx, lc, observabilityBundleVersion) - if err != nil { - return ctrl.Result{}, errors.WithStack(err) + desiredConfigMap := v1.ConfigMap{ + ObjectMeta: common.ObservabilityBundleConfigMapMeta(lc), } - // Check if configmap is already installed. - logger.Info("agents toggle checking", "namespace", desiredConfigMap.GetNamespace(), "name", desiredConfigMap.GetName()) - var currentConfigMap v1.ConfigMap - err = r.Client.Get(ctx, types.NamespacedName{Name: desiredConfigMap.GetName(), Namespace: desiredConfigMap.GetNamespace()}, ¤tConfigMap) - if err != nil { - if apimachineryerrors.IsNotFound(err) { - // Install configmap. - logger.Info("agents toggle not found, creating") - err = r.Client.Create(ctx, &desiredConfigMap) - } + _, err = controllerutil.CreateOrUpdate(ctx, r.Client, &desiredConfigMap, func() error { + config, err := generateObservabilityBundleConfig(ctx, lc, observabilityBundleVersion) if err != nil { - return ctrl.Result{}, errors.WithStack(err) + return errors.WithStack(err) } - } - if needUpdate(currentConfigMap, desiredConfigMap) { - logger.Info("agents toggle updating") - // Update configmap - // Configmap is installed and need to be updated. - err := r.Client.Update(ctx, &desiredConfigMap) - if err != nil { - return ctrl.Result{}, errors.WithStack(err) - } - } else { - logger.Info("agents toggle up to date") + desiredConfigMap.Data = map[string]string{"values": config} + return nil + }) + if err != nil { + logger.Error(err, "failed to toggle logging agents") + return ctrl.Result{}, errors.WithStack(err) } + logger.Info("agents toggle up to date") + return ctrl.Result{}, nil } // ReconcileDelete ensure logging agents and events loggers are disabled for the given cluster. func (r *Reconciler) ReconcileDelete(ctx context.Context, lc loggedcluster.Interface) (ctrl.Result, error) { logger := log.FromContext(ctx) - logger.Info("agents toggle delete") - - // Get observability bundle app metadata. - appMeta := common.ObservabilityBundleAppMeta(lc) - // Retrieve the app. - var currentApp appv1.App - err := r.Client.Get(ctx, types.NamespacedName{Name: appMeta.GetName(), Namespace: appMeta.GetNamespace()}, ¤tApp) - if err != nil { - // Handle case where the app is not found. - if apimachineryerrors.IsNotFound(err) { - logger.Info("agents-toggle - observability bundle app not found, skipping deletion") - // If the app is not found we ignore the error and return, as this means the app was already deleted. - return ctrl.Result{}, nil - } - return ctrl.Result{}, errors.WithStack(err) - } - - observabilityBundleVersion, err := semver.Parse(currentApp.Spec.Version) - if err != nil { - return ctrl.Result{}, errors.WithStack(err) - } + logger.Info("delete agents toggle config") - // If the observability-bundle version is too old, we don't need to do anything. - if observabilityBundleVersion.LT(semver.MustParse("0.9.0")) { - return ctrl.Result{}, nil + desiredConfigMap := v1.ConfigMap{ + ObjectMeta: common.ObservabilityBundleConfigMapMeta(lc), } - // Get expected configmap. - desiredConfigMap, err := GenerateObservabilityBundleConfigMap(ctx, lc, observabilityBundleVersion) - if err != nil { + logger.Info("deleting agents toggle config") + err := r.Client.Delete(ctx, &desiredConfigMap) + if client.IgnoreNotFound(err) != nil { return ctrl.Result{}, errors.WithStack(err) } - - // Delete configmap. - logger.Info("agents toggle deleting", "namespace", desiredConfigMap.GetNamespace(), "name", desiredConfigMap.GetName()) - err = r.Client.Delete(ctx, &desiredConfigMap) - if err != nil { - if apimachineryerrors.IsNotFound(err) { - // Do no throw error in case it was not found, as this means - // it was already deleted. - logger.Info("agents toggle already deleted") - } else if err != nil { - return ctrl.Result{}, errors.WithStack(err) - } - } else { - logger.Info("agents toggle deleted") - } + logger.Info("agents toggle config deleted") return ctrl.Result{}, nil } - -// needUpdate return true if current.Data and desired.Data do not match. -func needUpdate(current, desired v1.ConfigMap) bool { - return !reflect.DeepEqual(current.Data, desired.Data) || !reflect.DeepEqual(current.ObjectMeta.Labels, desired.ObjectMeta.Labels) -} From dd714d49e0c3396c27693feed69d728ed0c76775 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:19:51 +0100 Subject: [PATCH 2/5] chore(deps): update dependency architect to v5.11.2 (#286) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f2c874cf..8024c1e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - architect: giantswarm/architect@5.11.1 + architect: giantswarm/architect@5.11.2 jobs: template-chart: From c014c83bdbe31f5165780df850b1c1c21e596386 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:32:08 +0100 Subject: [PATCH 3/5] chore(deps): update dependency go to v1.23.4 (#285) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 8a0042fc..53692571 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/giantswarm/logging-operator go 1.23 -toolchain go1.23.3 +toolchain go1.23.4 require ( github.com/Masterminds/sprig/v3 v3.3.0 From 4b96f2a7472a44a3c7a997ef25cd3f2d9dde48a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:52:24 +0100 Subject: [PATCH 4/5] fix(deps): update module sigs.k8s.io/controller-runtime to v0.19.3 (#284) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 3 +-- go.sum | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 53692571..a0187748 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( k8s.io/apimachinery v0.31.3 k8s.io/client-go v0.31.3 sigs.k8s.io/cluster-api v1.8.5 - sigs.k8s.io/controller-runtime v0.19.2 + sigs.k8s.io/controller-runtime v0.19.3 sigs.k8s.io/yaml v1.4.0 ) @@ -33,7 +33,6 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/giantswarm/k8smetadata v0.25.0 // indirect github.com/go-logr/logr v1.4.2 // indirect diff --git a/go.sum b/go.sum index cdbf1c53..48da511e 100644 --- a/go.sum +++ b/go.sum @@ -42,8 +42,6 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/giantswarm/apiextensions-application v0.6.2 h1:XL86OrpprWl5Wp38EUvUXt3ztTo25+V63oDVlFwDpNg= @@ -285,8 +283,8 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsA sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/cluster-api v1.8.5 h1:lNA2fPN4fkXEs+oOQlnwxT/4VwRFBpv5kkSoJG8nqBA= sigs.k8s.io/cluster-api v1.8.5/go.mod h1:pXv5LqLxuIbhGIXykyNKiJh+KrLweSBajVHHitPLyoY= -sigs.k8s.io/controller-runtime v0.19.2 h1:3sPrF58XQEPzbE8T81TN6selQIMGbtYwuaJ6eDssDF8= -sigs.k8s.io/controller-runtime v0.19.2/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= +sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= From 023f6edc71ffea8e24c73adc8294b761eaa4b8c0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:45:49 +0100 Subject: [PATCH 5/5] fix(deps): update k8s modules to v0.32.0 (#289) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- go.mod | 22 ++++++++++------------ go.sum | 37 ++++++++++++++++--------------------- 2 files changed, 26 insertions(+), 33 deletions(-) diff --git a/go.mod b/go.mod index a0187748..cb2b72bb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/giantswarm/logging-operator -go 1.23 +go 1.23.0 toolchain go1.23.4 @@ -15,9 +15,9 @@ require ( github.com/pkg/errors v0.9.1 golang.org/x/mod v0.22.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.31.3 - k8s.io/apimachinery v0.31.3 - k8s.io/client-go v0.31.3 + k8s.io/api v0.32.0 + k8s.io/apimachinery v0.32.0 + k8s.io/client-go v0.32.0 sigs.k8s.io/cluster-api v1.8.5 sigs.k8s.io/controller-runtime v0.19.3 sigs.k8s.io/yaml v1.4.0 @@ -43,14 +43,12 @@ require ( github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect github.com/google/uuid v1.6.0 // indirect github.com/huandu/xstrings v1.5.0 // indirect - github.com/imdario/mergo v1.0.1 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.9 // indirect @@ -77,18 +75,18 @@ require ( golang.org/x/sys v0.26.0 // indirect golang.org/x/term v0.25.0 // indirect golang.org/x/text v0.19.0 // indirect - golang.org/x/time v0.6.0 // indirect + golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.26.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/apiextensions-apiserver v0.31.1 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect - k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect ) replace ( diff --git a/go.sum b/go.sum index 48da511e..c8d7a7ab 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,6 @@ github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= @@ -91,8 +89,6 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1 github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= -github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -223,8 +219,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -253,41 +249,40 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= -k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= +k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= -k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= -k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= +k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= -k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= -k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= +k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= +k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= k8s.io/cluster-bootstrap v0.30.3 h1:MgxyxMkpaC6mu0BKWJ8985XCOnKU+eH3Iy+biwtDXRk= k8s.io/cluster-bootstrap v0.30.3/go.mod h1:h8BoLDfdD7XEEIXy7Bx9FcMzxHwz29jsYYi34bM5DKU= k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= -k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 h1:b2FmK8YH+QEwq/Sy2uAEhmqL5nPfGYbJOcaqjeYYZoA= -k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/cluster-api v1.8.5 h1:lNA2fPN4fkXEs+oOQlnwxT/4VwRFBpv5kkSoJG8nqBA= sigs.k8s.io/cluster-api v1.8.5/go.mod h1:pXv5LqLxuIbhGIXykyNKiJh+KrLweSBajVHHitPLyoY= sigs.k8s.io/controller-runtime v0.19.3 h1:XO2GvC9OPftRst6xWCpTgBZO04S2cbp0Qqkj8bX1sPw= sigs.k8s.io/controller-runtime v0.19.3/go.mod h1:j4j87DqtsThvwTv5/Tc5NFRyyF/RF0ip4+62tbTSIUM= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=