From 4e68169acb83454609287a8895fd2143a891fb53 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Mon, 1 Jul 2024 17:19:18 +0200 Subject: [PATCH 1/8] Bump helm/wrangler/controller-runtime (#2565) * Bump helm, wrangler/v2, controller-runtim * Bump to wrangler/v3 --- charts/fleet-crd/templates/crds.yaml | 398 +++++++++++++++++- cmd/codegen/cleanup/main.go | 2 +- cmd/codegen/main.go | 6 +- cmd/fleetagent/main.go | 2 +- cmd/fleetcli/main.go | 10 +- cmd/fleetcontroller/main.go | 6 +- e2e/single-cluster/gitrepo_test.go | 2 +- go.mod | 61 +-- go.sum | 110 ++--- integrationtests/agent/suite_test.go | 2 +- .../cli/apply/apply_online_test.go | 2 +- integrationtests/cli/cleanup/suite_test.go | 4 +- .../gitjob/controller/controller_test.go | 2 +- internal/bundlereader/read.go | 2 +- internal/bundlereader/resources.go | 2 +- internal/client/client.go | 12 +- internal/cmd/agent/clusterstatus.go | 8 +- internal/cmd/agent/clusterstatus/ticker.go | 4 +- .../cmd/agent/clusterstatus/ticker_test.go | 2 +- .../controller/bundledeployment_controller.go | 2 +- .../cmd/agent/deployer/applied/applied.go | 4 +- internal/cmd/agent/deployer/applied/diff.go | 6 +- .../cmd/agent/deployer/cleanup/cleanup.go | 4 +- internal/cmd/agent/deployer/deployer.go | 4 +- .../agent/deployer/monitor/updatestatus.go | 8 +- .../agent/deployer/normalizers/jsonpatch.go | 2 +- .../deployer/normalizers/mutatingwebhook.go | 2 +- .../cmd/agent/deployer/normalizers/norm.go | 2 +- .../deployer/normalizers/validatingwebhook.go | 2 +- internal/cmd/agent/register.go | 2 +- internal/cmd/agent/register/register.go | 8 +- internal/cmd/agent/register/register_test.go | 4 +- internal/cmd/agent/trigger/watcher.go | 2 +- internal/cmd/cli/apply/apply.go | 2 +- internal/cmd/cli/deploy.go | 2 +- internal/cmd/cli/match/match.go | 2 +- .../agentmanagement/agent/manifest.go | 2 +- .../controllers/bootstrap/bootstrap.go | 4 +- .../controllers/cluster/controller.go | 8 +- .../controllers/cluster/import.go | 10 +- .../clusterregistration/controller.go | 12 +- .../clusterregistration/controller_test.go | 4 +- .../clusterregistrationtoken/handler.go | 8 +- .../controllers/config/controller.go | 2 +- .../controllers/controllers.go | 14 +- .../controllers/manageagent/manageagent.go | 10 +- .../manageagent/manageagent_test.go | 2 +- .../controllers/resources/data.go | 2 +- .../controller/agentmanagement/secret/util.go | 2 +- .../cmd/controller/agentmanagement/start.go | 8 +- .../cmd/controller/cleanup/content/purge.go | 6 +- .../cleanup/controllers/cleanup/controller.go | 6 +- .../cleanup/controllers/controllers.go | 14 +- internal/cmd/controller/cleanup/start.go | 6 +- .../gitops/reconciler/gitjob_controller.go | 2 +- internal/cmd/controller/grutil/status.go | 4 +- internal/cmd/controller/grutil/targetsyaml.go | 2 +- .../cmd/controller/imagescan/gitcommit_job.go | 4 +- .../cmd/controller/imagescan/tagscan_job.go | 4 +- internal/cmd/controller/options/calculate.go | 2 +- .../reconciler/bundledeployment_controller.go | 2 +- .../reconciler/cluster_controller.go | 2 +- .../reconciler/clustergroup_controller.go | 2 +- internal/cmd/controller/summary/summary.go | 4 +- internal/cmd/controller/target/builder.go | 2 +- internal/cmd/controller/target/target.go | 2 +- internal/config/config.go | 2 +- internal/helmdeployer/delete.go | 2 +- internal/helmdeployer/history.go | 4 +- internal/helmdeployer/impersonate.go | 2 +- internal/helmdeployer/kustomize/kstatus.go | 4 +- internal/helmdeployer/kustomize/kustomize.go | 4 +- internal/helmdeployer/postrender.go | 2 +- internal/helmdeployer/postrender_test.go | 2 +- internal/helmdeployer/rawyaml/resources.go | 2 +- internal/helmdeployer/render/helm.go | 2 +- internal/helmdeployer/render/patch/patch.go | 2 +- .../fleet.cattle.io/v1alpha1/bundle_types.go | 2 +- .../v1alpha1/bundledeployment_types.go | 4 +- .../fleet.cattle.io/v1alpha1/cluster_types.go | 2 +- .../v1alpha1/clustergroup_types.go | 2 +- .../fleet.cattle.io/v1alpha1/gitrepo_types.go | 2 +- .../v1alpha1/imagescan_types.go | 2 +- .../v1alpha1/zz_generated.deepcopy.go | 2 +- pkg/apis/go.mod | 18 +- pkg/apis/go.sum | 35 +- .../controllers/fleet.cattle.io/factory.go | 2 +- .../fleet.cattle.io/v1alpha1/bundle.go | 8 +- .../v1alpha1/bundledeployment.go | 8 +- .../v1alpha1/bundlenamespacemapping.go | 2 +- .../fleet.cattle.io/v1alpha1/cluster.go | 8 +- .../fleet.cattle.io/v1alpha1/clustergroup.go | 8 +- .../v1alpha1/clusterregistration.go | 8 +- .../v1alpha1/clusterregistrationtoken.go | 8 +- .../fleet.cattle.io/v1alpha1/content.go | 2 +- .../fleet.cattle.io/v1alpha1/gitrepo.go | 8 +- .../v1alpha1/gitreporestriction.go | 2 +- .../fleet.cattle.io/v1alpha1/imagescan.go | 8 +- .../fleet.cattle.io/v1alpha1/interface.go | 4 +- 99 files changed, 693 insertions(+), 327 deletions(-) diff --git a/charts/fleet-crd/templates/crds.yaml b/charts/fleet-crd/templates/crds.yaml index c26473db6a..25d3730b46 100644 --- a/charts/fleet-crd/templates/crds.yaml +++ b/charts/fleet-crd/templates/crds.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: bundledeployments.fleet.cattle.io spec: group: fleet.cattle.io @@ -134,11 +134,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1017,7 +1019,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: bundlenamespacemappings.fleet.cattle.io spec: group: fleet.cattle.io @@ -1087,11 +1089,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1164,11 +1168,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1193,7 +1199,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: bundles.fleet.cattle.io spec: group: fleet.cattle.io @@ -1351,11 +1357,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1758,11 +1766,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1820,11 +1830,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1920,11 +1932,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1985,11 +1999,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2063,11 +2079,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -2138,11 +2156,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3044,7 +3064,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: clustergroups.fleet.cattle.io spec: group: fleet.cattle.io @@ -3138,11 +3158,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -3459,7 +3481,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: clusterregistrations.fleet.cattle.io spec: group: fleet.cattle.io @@ -3563,7 +3585,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: clusterregistrationtokens.fleet.cattle.io spec: group: fleet.cattle.io @@ -3642,7 +3664,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: clusters.fleet.cattle.io spec: group: fleet.cattle.io @@ -3790,11 +3812,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: description: A list of node selector requirements by node's fields. @@ -3834,11 +3858,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic weight: @@ -3851,6 +3877,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: description: 'If the affinity requirements specified by this field are not met at @@ -3918,11 +3945,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchFields: description: A list of node selector requirements by node's fields. @@ -3962,14 +3991,17 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic type: object x-kubernetes-map-type: atomic type: array + x-kubernetes-list-type: atomic required: - nodeSelectorTerms type: object @@ -4015,8 +4047,11 @@ spec: with the corresponding weight. properties: labelSelector: - description: A label query over a set of resources, + description: 'A label query over a set of resources, in this case pods. + + If it''s null, this PodAffinityTerm matches + with no Pods.' properties: matchExpressions: description: matchExpressions is a list of @@ -4055,11 +4090,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4074,6 +4111,69 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: 'MatchLabelKeys is a set of pod label + keys to select which pods will + + be taken into consideration. The keys are used + to lookup values from the + + incoming pod labels, those key-value labels + are merged with `labelSelector` as `key in (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. + Keys that don''t exist in the incoming + + pod labels will be ignored. The default value + is empty. + + The same key is forbidden to exist in both matchLabelKeys + and labelSelector. + + Also, matchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: 'MismatchLabelKeys is a set of pod + label keys to select which pods will + + be taken into consideration. The keys are used + to lookup values from the + + incoming pod labels, those key-value labels + are merged with `labelSelector` as `key notin + (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. + Keys that don''t exist in the incoming + + pod labels will be ignored. The default value + is empty. + + The same key is forbidden to exist in both mismatchLabelKeys + and labelSelector. + + Also, mismatchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: 'A label query over the set of namespaces that the term applies to. @@ -4125,11 +4225,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4158,6 +4260,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods @@ -4189,6 +4292,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: description: 'If the affinity requirements specified by this field are not met at @@ -4229,8 +4333,11 @@ spec: a pod of the set of pods is running' properties: labelSelector: - description: A label query over a set of resources, + description: 'A label query over a set of resources, in this case pods. + + If it''s null, this PodAffinityTerm matches with + no Pods.' properties: matchExpressions: description: matchExpressions is a list of label @@ -4268,11 +4375,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4287,6 +4396,68 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: 'MatchLabelKeys is a set of pod label + keys to select which pods will + + be taken into consideration. The keys are used to + lookup values from the + + incoming pod labels, those key-value labels are + merged with `labelSelector` as `key in (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. Keys + that don''t exist in the incoming + + pod labels will be ignored. The default value is + empty. + + The same key is forbidden to exist in both matchLabelKeys + and labelSelector. + + Also, matchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling MatchLabelKeysInPodAffinity + feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: 'MismatchLabelKeys is a set of pod label + keys to select which pods will + + be taken into consideration. The keys are used to + lookup values from the + + incoming pod labels, those key-value labels are + merged with `labelSelector` as `key notin (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. Keys + that don''t exist in the incoming + + pod labels will be ignored. The default value is + empty. + + The same key is forbidden to exist in both mismatchLabelKeys + and labelSelector. + + Also, mismatchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling MatchLabelKeysInPodAffinity + feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: 'A label query over the set of namespaces that the term applies to. @@ -4337,11 +4508,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4370,6 +4543,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods @@ -4389,6 +4563,7 @@ spec: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object podAntiAffinity: description: Describes pod anti-affinity scheduling rules (e.g. @@ -4431,8 +4606,11 @@ spec: with the corresponding weight. properties: labelSelector: - description: A label query over a set of resources, + description: 'A label query over a set of resources, in this case pods. + + If it''s null, this PodAffinityTerm matches + with no Pods.' properties: matchExpressions: description: matchExpressions is a list of @@ -4471,11 +4649,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4490,6 +4670,69 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: 'MatchLabelKeys is a set of pod label + keys to select which pods will + + be taken into consideration. The keys are used + to lookup values from the + + incoming pod labels, those key-value labels + are merged with `labelSelector` as `key in (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. + Keys that don''t exist in the incoming + + pod labels will be ignored. The default value + is empty. + + The same key is forbidden to exist in both matchLabelKeys + and labelSelector. + + Also, matchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: 'MismatchLabelKeys is a set of pod + label keys to select which pods will + + be taken into consideration. The keys are used + to lookup values from the + + incoming pod labels, those key-value labels + are merged with `labelSelector` as `key notin + (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. + Keys that don''t exist in the incoming + + pod labels will be ignored. The default value + is empty. + + The same key is forbidden to exist in both mismatchLabelKeys + and labelSelector. + + Also, mismatchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling + MatchLabelKeysInPodAffinity feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: 'A label query over the set of namespaces that the term applies to. @@ -4541,11 +4784,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4574,6 +4819,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods @@ -4605,6 +4851,7 @@ spec: - weight type: object type: array + x-kubernetes-list-type: atomic requiredDuringSchedulingIgnoredDuringExecution: description: 'If the anti-affinity requirements specified by this field are not met at @@ -4645,8 +4892,11 @@ spec: a pod of the set of pods is running' properties: labelSelector: - description: A label query over a set of resources, + description: 'A label query over a set of resources, in this case pods. + + If it''s null, this PodAffinityTerm matches with + no Pods.' properties: matchExpressions: description: matchExpressions is a list of label @@ -4684,11 +4934,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4703,6 +4955,68 @@ spec: type: object type: object x-kubernetes-map-type: atomic + matchLabelKeys: + description: 'MatchLabelKeys is a set of pod label + keys to select which pods will + + be taken into consideration. The keys are used to + lookup values from the + + incoming pod labels, those key-value labels are + merged with `labelSelector` as `key in (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. Keys + that don''t exist in the incoming + + pod labels will be ignored. The default value is + empty. + + The same key is forbidden to exist in both matchLabelKeys + and labelSelector. + + Also, matchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling MatchLabelKeysInPodAffinity + feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + description: 'MismatchLabelKeys is a set of pod label + keys to select which pods will + + be taken into consideration. The keys are used to + lookup values from the + + incoming pod labels, those key-value labels are + merged with `labelSelector` as `key notin (value)` + + to select the group of existing pods which pods + will be taken into consideration + + for the incoming pod''s pod (anti) affinity. Keys + that don''t exist in the incoming + + pod labels will be ignored. The default value is + empty. + + The same key is forbidden to exist in both mismatchLabelKeys + and labelSelector. + + Also, mismatchLabelKeys cannot be set when labelSelector + isn''t set. + + This is an alpha field and requires enabling MatchLabelKeysInPodAffinity + feature gate.' + items: + type: string + type: array + x-kubernetes-list-type: atomic namespaceSelector: description: 'A label query over the set of namespaces that the term applies to. @@ -4753,11 +5067,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -4786,6 +5102,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic topologyKey: description: 'This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods @@ -4805,6 +5122,7 @@ spec: - topologyKey type: object type: array + x-kubernetes-list-type: atomic type: object type: object agentEnvVars: @@ -4852,12 +5170,24 @@ spec: description: The key to select. type: string name: + default: '' description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + This field is effectively required, but due to backwards + compatibility is + + allowed to be empty. Instances of this type with + an empty value here are + + almost certainly wrong. TODO: Add other useful fields. apiVersion, kind, - uid?' + uid? + + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + TODO: Drop `kubebuilder:default` when controller-gen + doesn''t need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.' type: string optional: description: Specify whether the ConfigMap or its @@ -4921,12 +5251,24 @@ spec: be a valid secret key. type: string name: + default: '' description: 'Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + This field is effectively required, but due to backwards + compatibility is + + allowed to be empty. Instances of this type with + an empty value here are + + almost certainly wrong. TODO: Add other useful fields. apiVersion, kind, - uid?' + uid? + + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + + TODO: Drop `kubebuilder:default` when controller-gen + doesn''t need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.' type: string optional: description: Specify whether the Secret or its key @@ -5509,7 +5851,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: contents.fleet.cattle.io spec: group: fleet.cattle.io @@ -5577,7 +5919,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: gitreporestrictions.fleet.cattle.io spec: group: fleet.cattle.io @@ -5683,7 +6025,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: gitrepos.fleet.cattle.io spec: group: fleet.cattle.io @@ -5961,11 +6303,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6022,11 +6366,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -6452,7 +6798,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: imagescans.fleet.cattle.io spec: group: fleet.cattle.io @@ -6567,11 +6913,23 @@ spec: nullable: true properties: name: + default: '' description: 'Name of the referent. + This field is effectively required, but due to backwards compatibility + is + + allowed to be empty. Instances of this type with an empty + value here are + + almost certainly wrong. + + TODO: Add other useful fields. apiVersion, kind, uid? + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' + TODO: Drop `kubebuilder:default` when controller-gen doesn''t + need it https://github.com/kubernetes-sigs/kubebuilder/issues/3896.' type: string type: object x-kubernetes-map-type: atomic diff --git a/cmd/codegen/cleanup/main.go b/cmd/codegen/cleanup/main.go index 603afbdea1..0dec28cfa9 100644 --- a/cmd/codegen/cleanup/main.go +++ b/cmd/codegen/cleanup/main.go @@ -5,7 +5,7 @@ import ( "github.com/sirupsen/logrus" - "github.com/rancher/wrangler/v2/pkg/cleanup" + "github.com/rancher/wrangler/v3/pkg/cleanup" ) func main() { diff --git a/cmd/codegen/main.go b/cmd/codegen/main.go index c3def293a4..54152f4426 100644 --- a/cmd/codegen/main.go +++ b/cmd/codegen/main.go @@ -3,11 +3,11 @@ package main import ( "os" - controllergen "github.com/rancher/wrangler/v2/pkg/controller-gen" - "github.com/rancher/wrangler/v2/pkg/controller-gen/args" + controllergen "github.com/rancher/wrangler/v3/pkg/controller-gen" + "github.com/rancher/wrangler/v3/pkg/controller-gen/args" // Ensure gvk gets loaded in wrangler/pkg/gvk cache - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io/v1" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/apiextensions.k8s.io/v1" // To keep the dependency in go.mod _ "sigs.k8s.io/controller-tools/pkg/crd" diff --git a/cmd/fleetagent/main.go b/cmd/fleetagent/main.go index 778648d756..d57ce33d1c 100644 --- a/cmd/fleetagent/main.go +++ b/cmd/fleetagent/main.go @@ -6,7 +6,7 @@ import ( "github.com/rancher/fleet/internal/cmd/agent" - "github.com/rancher/wrangler/v2/pkg/signals" + "github.com/rancher/wrangler/v3/pkg/signals" "github.com/sirupsen/logrus" ) diff --git a/cmd/fleetcli/main.go b/cmd/fleetcli/main.go index eecc0e10c0..2200f8724d 100644 --- a/cmd/fleetcli/main.go +++ b/cmd/fleetcli/main.go @@ -4,15 +4,15 @@ package main import ( // Ensure GVKs are registered _ "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io" - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io" - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/apps" - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/apiextensions.k8s.io" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/apps" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac" // Add non-default auth providers _ "k8s.io/client-go/plugin/pkg/client/auth" - "github.com/rancher/wrangler/v2/pkg/signals" + "github.com/rancher/wrangler/v3/pkg/signals" "github.com/sirupsen/logrus" cmds "github.com/rancher/fleet/internal/cmd/cli" diff --git a/cmd/fleetcontroller/main.go b/cmd/fleetcontroller/main.go index 613c35e08c..e0b6008326 100644 --- a/cmd/fleetcontroller/main.go +++ b/cmd/fleetcontroller/main.go @@ -4,9 +4,9 @@ package main import ( _ "net/http/pprof" - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/apiextensions.k8s.io" - _ "github.com/rancher/wrangler/v2/pkg/generated/controllers/networking.k8s.io" - "github.com/rancher/wrangler/v2/pkg/signals" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/apiextensions.k8s.io" + _ "github.com/rancher/wrangler/v3/pkg/generated/controllers/networking.k8s.io" + "github.com/rancher/wrangler/v3/pkg/signals" "github.com/sirupsen/logrus" "github.com/rancher/fleet/internal/cmd/controller" diff --git a/e2e/single-cluster/gitrepo_test.go b/e2e/single-cluster/gitrepo_test.go index 5c9792c257..f843f09fea 100644 --- a/e2e/single-cluster/gitrepo_test.go +++ b/e2e/single-cluster/gitrepo_test.go @@ -22,7 +22,7 @@ import ( "github.com/rancher/fleet/e2e/testenv/githelper" "github.com/rancher/fleet/e2e/testenv/kubectl" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" ) const ( diff --git a/go.mod b/go.mod index 1436f660d2..7678574a8d 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,13 @@ module github.com/rancher/fleet -go 1.22 +go 1.22.0 + +toolchain go1.22.3 replace ( github.com/imdario/mergo => github.com/imdario/mergo v0.3.16 github.com/rancher/fleet/pkg/apis => ./pkg/apis - helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.14.4-fleet.0 + helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.15.2-fleet.0 ) require ( @@ -36,9 +38,9 @@ require ( github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.55.0 - github.com/rancher/fleet/pkg/apis v0.10.0-rc.16 - github.com/rancher/lasso v0.0.0-20240424194130-d87ec407d941 - github.com/rancher/wrangler/v2 v2.1.4 + github.com/rancher/fleet/pkg/apis v0.10.0-rc.18 + github.com/rancher/lasso v0.0.0-20240430201833-6f3def65ffc5 + github.com/rancher/wrangler/v3 v3.0.0-rc2 github.com/reugn/go-quartz v0.11.2 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.1 @@ -51,20 +53,20 @@ require ( gopkg.in/yaml.v2 v2.4.0 gotest.tools v2.2.0+incompatible helm.sh/helm/v3 v3.15.2 - k8s.io/api v0.29.4 - k8s.io/apiextensions-apiserver v0.29.4 - k8s.io/apimachinery v0.29.4 - k8s.io/cli-runtime v0.29.4 - k8s.io/client-go v0.29.4 + k8s.io/api v0.30.2 + k8s.io/apiextensions-apiserver v0.30.2 + k8s.io/apimachinery v0.30.2 + k8s.io/cli-runtime v0.30.2 + k8s.io/client-go v0.30.2 k8s.io/klog/v2 v2.130.1 k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b - k8s.io/kubectl v0.29.4 - k8s.io/kubernetes v1.29.4 - k8s.io/utils v0.0.0-20240102154912-e7106e64919e + k8s.io/kubectl v0.30.2 + k8s.io/kubernetes v1.30.2 + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 oras.land/oras-go/v2 v2.5.0 - sigs.k8s.io/cli-utils v0.34.0 - sigs.k8s.io/controller-runtime v0.17.2 - sigs.k8s.io/controller-tools v0.14.0 + sigs.k8s.io/cli-utils v0.35.0 + sigs.k8s.io/controller-runtime v0.18.4 + sigs.k8s.io/controller-tools v0.15.0 sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 sigs.k8s.io/yaml v1.4.0 @@ -91,7 +93,7 @@ require ( github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/containerd v1.7.15 // indirect @@ -107,7 +109,7 @@ require ( github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/emicklei/go-restful/v3 v3.11.3 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect @@ -121,9 +123,9 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/jsonreference v0.20.4 // indirect - github.com/go-openapi/swag v0.22.9 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect 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 @@ -133,7 +135,7 @@ require ( github.com/google/btree v1.1.2 // 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-20240424215950-a892ee059fd6 // indirect + github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect @@ -219,15 +221,15 @@ require ( go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect - golang.org/x/mod v0.17.0 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect + golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/term v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/tools v0.22.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.126.0 // indirect @@ -240,10 +242,11 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.29.4 // indirect - k8s.io/code-generator v0.29.4 // indirect - k8s.io/component-base v0.29.4 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect + k8s.io/apiserver v0.30.2 // indirect + k8s.io/code-generator v0.30.2 // indirect + k8s.io/component-base v0.30.2 // indirect + k8s.io/gengo v0.0.0-20240310015720-9cff6334dab4 // indirect + k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect oras.land/oras-go v1.2.5 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index caa1f7f751..ecd02708a4 100644 --- a/go.sum +++ b/go.sum @@ -250,8 +250,8 @@ github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= @@ -319,8 +319,8 @@ github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arX github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= -github.com/emicklei/go-restful/v3 v3.11.3 h1:yagOQz/38xJmcNeZJtrUcKjkHRltIaIFXKWeG1SkWGE= -github.com/emicklei/go-restful/v3 v3.11.3/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -383,12 +383,12 @@ github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= -github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= -github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= -github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-playground/webhooks/v6 v6.3.0 h1:zBLUxK1Scxwi97TmZt5j/B/rLlard2zY7P77FHg58FE= github.com/go-playground/webhooks/v6 v6.3.0/go.mod h1:GCocmfMtpJdkEOM1uG9p2nXzg1kY5X/LtvQgtPHUaaA= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= @@ -500,8 +500,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0 h1:e+8XbKB6IMn8A4OAyZccO4pYfB3s7bt6azNIPE7AnPg= +github.com/google/pprof v0.0.0-20240625030939-27f56978b8b0/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -742,12 +742,12 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/rancher/helm/v3 v3.14.4-fleet.0 h1:fMyGOkEc6laHsr/kZn4GaZ37//pGBNioP9Kkf5+phB8= -github.com/rancher/helm/v3 v3.14.4-fleet.0/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= -github.com/rancher/lasso v0.0.0-20240424194130-d87ec407d941 h1:1SvuoeyfANRvKVJUSzHWa1P781iuH8ktUjW9cPOxAAk= -github.com/rancher/lasso v0.0.0-20240424194130-d87ec407d941/go.mod h1:pYKOe2r/5O0w3ypoc7xHQF8LvWCp5PsNRea1Jpq3vBU= -github.com/rancher/wrangler/v2 v2.1.4 h1:ohov0i6A9dJHHO6sjfsH4Dqv93ZTdm5lIJVJdPzVdQc= -github.com/rancher/wrangler/v2 v2.1.4/go.mod h1:af5OaGU/COgreQh1mRbKiUI64draT2NN34uk+PALFY8= +github.com/rancher/helm/v3 v3.15.2-fleet.0 h1:6vv9lmCnHAgkMgcZaNjrFmSyE1c4bOZbWt/qVvGgPK8= +github.com/rancher/helm/v3 v3.15.2-fleet.0/go.mod h1:FzSIP8jDQaa6WAVg9F+OkKz7J0ZmAga4MABtTbsb9WQ= +github.com/rancher/lasso v0.0.0-20240430201833-6f3def65ffc5 h1:6K4RhfmCy7uxaw9OzCljNLfFcgD/q7SeF+/2gCQ3Tvw= +github.com/rancher/lasso v0.0.0-20240430201833-6f3def65ffc5/go.mod h1:7WkdfPEvWAdnHVioMUkhpZkshJzjDY62ocHVhcbw89M= +github.com/rancher/wrangler/v3 v3.0.0-rc2 h1:XGSPPp6GXELqlLvwJp5MsdqyCPu6SCA4UKJ7rQJzE40= +github.com/rancher/wrangler/v3 v3.0.0-rc2/go.mod h1:f54hh7gFkwwbjsieT2b63FowzTU8FvrBonPe//0CIXo= github.com/reugn/go-quartz v0.11.2 h1:+jc54Ji06n/D/endEPmc+CuG/Jc8466nda1oxtFRrks= github.com/reugn/go-quartz v0.11.2/go.mod h1:no4ktgYbAAuY0E1SchR8cTx1LF4jYIzdgaQhzRPSkpk= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -899,8 +899,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -928,8 +928,8 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= +golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1197,8 +1197,8 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= +golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= @@ -1467,35 +1467,37 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.29.4 h1:WEnF/XdxuCxdG3ayHNRR8yH3cI1B/llkWBma6bq4R3w= -k8s.io/api v0.29.4/go.mod h1:DetSv0t4FBTcEpfA84NJV3g9a7+rSzlUHk5ADAYHUv0= -k8s.io/apiextensions-apiserver v0.29.4 h1:M7hbuHU/ckbibR7yPbe6DyNWgTFKNmZDbdZKD8q1Smk= -k8s.io/apiextensions-apiserver v0.29.4/go.mod h1:TTDC9fB+0kHY2rogf5hgBR03KBKCwED+GHUsXGpR7SM= -k8s.io/apimachinery v0.29.4 h1:RaFdJiDmuKs/8cm1M6Dh1Kvyh59YQFDcFuFTSmXes6Q= -k8s.io/apimachinery v0.29.4/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= -k8s.io/apiserver v0.29.4 h1:wPwGOO58GQOpRiZu59P5eRoDcB7QtV+QBglkRiXwCiM= -k8s.io/apiserver v0.29.4/go.mod h1:VqTF9t98HVfhKZVRohCPezsdUt9u2g3bHKftxGcXoRo= -k8s.io/cli-runtime v0.29.4 h1:QvUrddBxVX6XFJ6z64cGpEk7e4bQduKweqbqq+qBd9g= -k8s.io/cli-runtime v0.29.4/go.mod h1:NmklYuZ4DLfOr2XEIT8Nzl883KMZUCv7KMj3wMHayCA= -k8s.io/client-go v0.29.4 h1:79ytIedxVfyXV8rpH3jCBW0u+un0fxHDwX5F9K8dPR8= -k8s.io/client-go v0.29.4/go.mod h1:kC1thZQ4zQWYwldsfI088BbK6RkxK+aF5ebV8y9Q4tk= -k8s.io/code-generator v0.29.4 h1:8ESudFNbY5/9BzB8KOEFG2uV9Q0AQxkc4mrQESr30Ks= -k8s.io/code-generator v0.29.4/go.mod h1:7TYnI0dYItL2cKuhhgPSuF3WED9uMdELgbVXFfn/joE= -k8s.io/component-base v0.29.4 h1:xeKzuuHI/1tjleu5jycDAcYbhAxeGHCQBZUY2eRIkOo= -k8s.io/component-base v0.29.4/go.mod h1:pYjt+oEZP9gtmwSikwAJgfSBikqKX2gOqRat0QjmQt0= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= +k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= +k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= +k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= +k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= +k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw= +k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8= +k8s.io/cli-runtime v0.30.2 h1:ooM40eEJusbgHNEqnHziN9ZpLN5U4WcQGsdLKVxpkKE= +k8s.io/cli-runtime v0.30.2/go.mod h1:Y4g/2XezFyTATQUbvV5WaChoUGhojv/jZAtdp5Zkm0A= +k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= +k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= +k8s.io/code-generator v0.30.2 h1:ZY1+aGkqZVwKIyGsOzquaeZ5rSfE6wZHur8z3jQAaiw= +k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA= +k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII= +k8s.io/component-base v0.30.2/go.mod h1:yQLkQDrkK8J6NtP+MGJOws+/PPeEXNpwFixsUI7h/OE= +k8s.io/gengo v0.0.0-20240310015720-9cff6334dab4 h1:v8TcVKY4HxDaiNH8xnHEEGfx80twQJL9cOQuhd55fcY= +k8s.io/gengo v0.0.0-20240310015720-9cff6334dab4/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= +k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= 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-20240620174524-b456828f718b h1:Q9xmGWBvOGd8UJyccgpYlLosk/JlfP3xQLNkQlHJeXw= k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= -k8s.io/kubectl v0.29.4 h1:2LFrAznoDZjN8JFMSUcuhER5o+yjTLzWWbOiDzVjmd8= -k8s.io/kubectl v0.29.4/go.mod h1:YTKRF9y1/ccqZ2bnpOWaJD8V7johKqZR/qOMq+0pfxU= -k8s.io/kubernetes v1.29.4 h1:n4VCbX9cUhxHI+zw+m2iZlzT73/mrEJBHIMeauh9g4U= -k8s.io/kubernetes v1.29.4/go.mod h1:28sDhcb87LX5z3GWAKYmLrhrifxi4W9bEWua4DRTIvk= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= -k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kubectl v0.30.2 h1:cgKNIvsOiufgcs4yjvgkK0+aPCfa8pUwzXdJtkbhsH8= +k8s.io/kubectl v0.30.2/go.mod h1:rz7GHXaxwnigrqob0lJsiA07Df8RE3n1TSaC2CTeuB4= +k8s.io/kubernetes v1.30.2 h1:11WhS78OYX/lnSy6TXxPO6Hk+E5K9ZNrEsk9JgMSX8I= +k8s.io/kubernetes v1.30.2/go.mod h1:yPbIk3MhmhGigX62FLJm+CphNtjxqCvAIFQXup6RKS0= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo= oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo= oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c= @@ -1503,12 +1505,12 @@ oras.land/oras-go/v2 v2.5.0/go.mod h1:z4eisnLP530vwIOUOJeBIj0aGI0L1C3d53atvCBqZH 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/cli-utils v0.34.0 h1:zCUitt54f0/MYj/ajVFnG6XSXMhpZ72O/3RewIchW8w= -sigs.k8s.io/cli-utils v0.34.0/go.mod h1:EXyMwPMu9OL+LRnj0JEMsGG/fRvbgFadcVlSnE8RhFs= -sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= -sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= -sigs.k8s.io/controller-tools v0.14.0 h1:rnNoCC5wSXlrNoBKKzL70LNJKIQKEzT6lloG6/LF73A= -sigs.k8s.io/controller-tools v0.14.0/go.mod h1:TV7uOtNNnnR72SpzhStvPkoS/U5ir0nMudrkrC4M9Sc= +sigs.k8s.io/cli-utils v0.35.0 h1:dfSJaF1W0frW74PtjwiyoB4cwdRygbHnC7qe7HF0g/Y= +sigs.k8s.io/cli-utils v0.35.0/go.mod h1:ITitykCJxP1vaj1Cew/FZEaVJ2YsTN9Q71m02jebkoE= +sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= +sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +sigs.k8s.io/controller-tools v0.15.0 h1:4dxdABXGDhIa68Fiwaif0vcu32xfwmgQ+w8p+5CxoAI= +sigs.k8s.io/controller-tools v0.15.0/go.mod h1:8zUSS2T8Hx0APCNRhJWbS3CAQEbIxLa07khzh7pZmXM= 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/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= diff --git a/integrationtests/agent/suite_test.go b/integrationtests/agent/suite_test.go index 0e8ca09666..f7e5195a73 100644 --- a/integrationtests/agent/suite_test.go +++ b/integrationtests/agent/suite_test.go @@ -19,7 +19,7 @@ import ( "github.com/rancher/fleet/internal/manifest" "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/integrationtests/cli/apply/apply_online_test.go b/integrationtests/cli/apply/apply_online_test.go index ce2fed3d4b..d0b3475263 100644 --- a/integrationtests/cli/apply/apply_online_test.go +++ b/integrationtests/cli/apply/apply_online_test.go @@ -15,7 +15,7 @@ import ( "github.com/rancher/fleet/internal/cmd/cli/apply" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/generic/fake" + "github.com/rancher/wrangler/v3/pkg/generic/fake" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/integrationtests/cli/cleanup/suite_test.go b/integrationtests/cli/cleanup/suite_test.go index 81c398b1a5..4ee053a6af 100644 --- a/integrationtests/cli/cleanup/suite_test.go +++ b/integrationtests/cli/cleanup/suite_test.go @@ -10,8 +10,8 @@ import ( cliclient "github.com/rancher/fleet/internal/client" "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/integrationtests/gitjob/controller/controller_test.go b/integrationtests/gitjob/controller/controller_test.go index 94d7961891..7c73fe2305 100644 --- a/integrationtests/gitjob/controller/controller_test.go +++ b/integrationtests/gitjob/controller/controller_test.go @@ -13,7 +13,7 @@ import ( "github.com/rancher/fleet/integrationtests/utils" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/name" + "github.com/rancher/wrangler/v3/pkg/name" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" diff --git a/internal/bundlereader/read.go b/internal/bundlereader/read.go index f5f1f09d54..ae40cbab9f 100644 --- a/internal/bundlereader/read.go +++ b/internal/bundlereader/read.go @@ -16,7 +16,7 @@ import ( "github.com/rancher/fleet/internal/fleetyaml" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - name1 "github.com/rancher/wrangler/v2/pkg/name" + name1 "github.com/rancher/wrangler/v3/pkg/name" "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/bundlereader/resources.go b/internal/bundlereader/resources.go index 58a7f3a024..fb7ab732d6 100644 --- a/internal/bundlereader/resources.go +++ b/internal/bundlereader/resources.go @@ -15,7 +15,7 @@ import ( "golang.org/x/sync/errgroup" "golang.org/x/sync/semaphore" - "github.com/rancher/wrangler/v2/pkg/data" + "github.com/rancher/wrangler/v3/pkg/data" "sigs.k8s.io/yaml" ) diff --git a/internal/client/client.go b/internal/client/client.go index ba767fac19..bb590bcacd 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -6,12 +6,12 @@ import ( "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - corev1 "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac" - rbaccontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac/v1" - "github.com/rancher/wrangler/v2/pkg/kubeconfig" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + corev1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac" + rbaccontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1" + "github.com/rancher/wrangler/v3/pkg/kubeconfig" ) type Getter struct { diff --git a/internal/cmd/agent/clusterstatus.go b/internal/cmd/agent/clusterstatus.go index 31f2844a9b..225fb77f6e 100644 --- a/internal/cmd/agent/clusterstatus.go +++ b/internal/cmd/agent/clusterstatus.go @@ -29,10 +29,10 @@ import ( "github.com/rancher/lasso/pkg/client" "github.com/rancher/lasso/pkg/controller" "github.com/rancher/lasso/pkg/mapper" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - "github.com/rancher/wrangler/v2/pkg/kubeconfig" - "github.com/rancher/wrangler/v2/pkg/ratelimit" - "github.com/rancher/wrangler/v2/pkg/ticker" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + "github.com/rancher/wrangler/v3/pkg/kubeconfig" + "github.com/rancher/wrangler/v3/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/ticker" ) func NewClusterStatus() *cobra.Command { diff --git a/internal/cmd/agent/clusterstatus/ticker.go b/internal/cmd/agent/clusterstatus/ticker.go index 13744ea3c0..35439400d6 100644 --- a/internal/cmd/agent/clusterstatus/ticker.go +++ b/internal/cmd/agent/clusterstatus/ticker.go @@ -12,8 +12,8 @@ import ( "github.com/rancher/fleet/pkg/durations" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/ticker" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/ticker" "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/agent/clusterstatus/ticker_test.go b/internal/cmd/agent/clusterstatus/ticker_test.go index adfb4febce..d0d02f81da 100644 --- a/internal/cmd/agent/clusterstatus/ticker_test.go +++ b/internal/cmd/agent/clusterstatus/ticker_test.go @@ -9,7 +9,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/generic/fake" + "github.com/rancher/wrangler/v3/pkg/generic/fake" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" diff --git a/internal/cmd/agent/controller/bundledeployment_controller.go b/internal/cmd/agent/controller/bundledeployment_controller.go index 9821eef305..4ded79f876 100644 --- a/internal/cmd/agent/controller/bundledeployment_controller.go +++ b/internal/cmd/agent/controller/bundledeployment_controller.go @@ -11,7 +11,7 @@ import ( "github.com/rancher/fleet/internal/cmd/agent/deployer/monitor" fleetv1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/condition" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/internal/cmd/agent/deployer/applied/applied.go b/internal/cmd/agent/deployer/applied/applied.go index f2ce87cdac..c727092fbb 100644 --- a/internal/cmd/agent/deployer/applied/applied.go +++ b/internal/cmd/agent/deployer/applied/applied.go @@ -5,8 +5,8 @@ import ( "github.com/rancher/fleet/internal/config" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/name" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/name" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/internal/cmd/agent/deployer/applied/diff.go b/internal/cmd/agent/deployer/applied/diff.go index 64aaf89798..f891ba34c6 100644 --- a/internal/cmd/agent/deployer/applied/diff.go +++ b/internal/cmd/agent/deployer/applied/diff.go @@ -11,9 +11,9 @@ import ( fleetnorm "github.com/rancher/fleet/internal/cmd/agent/deployer/normalizers" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/merr" - "github.com/rancher/wrangler/v2/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/merr" + "github.com/rancher/wrangler/v3/pkg/objectset" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/internal/cmd/agent/deployer/cleanup/cleanup.go b/internal/cmd/agent/deployer/cleanup/cleanup.go index 9ae2203563..28ec23ce33 100644 --- a/internal/cmd/agent/deployer/cleanup/cleanup.go +++ b/internal/cmd/agent/deployer/cleanup/cleanup.go @@ -12,8 +12,8 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/fleet/pkg/durations" - "github.com/rancher/wrangler/v2/pkg/kv" - "github.com/rancher/wrangler/v2/pkg/merr" + "github.com/rancher/wrangler/v3/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/merr" apierror "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" diff --git a/internal/cmd/agent/deployer/deployer.go b/internal/cmd/agent/deployer/deployer.go index 5785203f2c..b21046c8fb 100644 --- a/internal/cmd/agent/deployer/deployer.go +++ b/internal/cmd/agent/deployer/deployer.go @@ -13,8 +13,8 @@ import ( "github.com/rancher/fleet/internal/ociwrapper" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/kv" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/agent/deployer/monitor/updatestatus.go b/internal/cmd/agent/deployer/monitor/updatestatus.go index 6a15d3e63b..d296f8faf4 100644 --- a/internal/cmd/agent/deployer/monitor/updatestatus.go +++ b/internal/cmd/agent/deployer/monitor/updatestatus.go @@ -12,10 +12,10 @@ import ( "github.com/rancher/fleet/internal/helmdeployer" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/objectset" - "github.com/rancher/wrangler/v2/pkg/summary" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/summary" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/internal/cmd/agent/deployer/normalizers/jsonpatch.go b/internal/cmd/agent/deployer/normalizers/jsonpatch.go index fa874f51ec..3cb19290f3 100644 --- a/internal/cmd/agent/deployer/normalizers/jsonpatch.go +++ b/internal/cmd/agent/deployer/normalizers/jsonpatch.go @@ -4,7 +4,7 @@ import ( jsonpatch "github.com/evanphx/json-patch" "github.com/sirupsen/logrus" - "github.com/rancher/wrangler/v2/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/objectset" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" diff --git a/internal/cmd/agent/deployer/normalizers/mutatingwebhook.go b/internal/cmd/agent/deployer/normalizers/mutatingwebhook.go index 5a8474b6f4..98b19100a5 100644 --- a/internal/cmd/agent/deployer/normalizers/mutatingwebhook.go +++ b/internal/cmd/agent/deployer/normalizers/mutatingwebhook.go @@ -3,7 +3,7 @@ package normalizers import ( "github.com/sirupsen/logrus" - "github.com/rancher/wrangler/v2/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/objectset" adregv1 "k8s.io/api/admissionregistration/v1" adregv1beta1 "k8s.io/api/admissionregistration/v1beta1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/internal/cmd/agent/deployer/normalizers/norm.go b/internal/cmd/agent/deployer/normalizers/norm.go index 64f826ac1b..7686727bfc 100644 --- a/internal/cmd/agent/deployer/normalizers/norm.go +++ b/internal/cmd/agent/deployer/normalizers/norm.go @@ -2,7 +2,7 @@ package normalizers import ( "github.com/rancher/fleet/internal/cmd/agent/deployer/internal/diff" - "github.com/rancher/wrangler/v2/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/objectset" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) diff --git a/internal/cmd/agent/deployer/normalizers/validatingwebhook.go b/internal/cmd/agent/deployer/normalizers/validatingwebhook.go index 19e6be3dd9..8479b4cf24 100644 --- a/internal/cmd/agent/deployer/normalizers/validatingwebhook.go +++ b/internal/cmd/agent/deployer/normalizers/validatingwebhook.go @@ -3,7 +3,7 @@ package normalizers import ( "github.com/sirupsen/logrus" - "github.com/rancher/wrangler/v2/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/objectset" adregv1 "k8s.io/api/admissionregistration/v1" adregv1beta1 "k8s.io/api/admissionregistration/v1beta1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" diff --git a/internal/cmd/agent/register.go b/internal/cmd/agent/register.go index e21f9803dc..72bd0bc6f8 100644 --- a/internal/cmd/agent/register.go +++ b/internal/cmd/agent/register.go @@ -9,7 +9,7 @@ import ( command "github.com/rancher/fleet/internal/cmd" "github.com/rancher/fleet/internal/cmd/agent/register" - "github.com/rancher/wrangler/v2/pkg/kubeconfig" + "github.com/rancher/wrangler/v3/pkg/kubeconfig" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log" diff --git a/internal/cmd/agent/register/register.go b/internal/cmd/agent/register/register.go index f4218cd229..48f7a4a5c8 100644 --- a/internal/cmd/agent/register/register.go +++ b/internal/cmd/agent/register/register.go @@ -15,10 +15,10 @@ import ( "github.com/rancher/fleet/pkg/durations" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/randomtoken" - "github.com/rancher/wrangler/v2/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/randomtoken" + "github.com/rancher/wrangler/v3/pkg/ratelimit" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/cmd/agent/register/register_test.go b/internal/cmd/agent/register/register_test.go index dcc9ccfe0b..4b8c78bf33 100644 --- a/internal/cmd/agent/register/register_test.go +++ b/internal/cmd/agent/register/register_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/golang/mock/gomock" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/generic/fake" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/generic/fake" "github.com/stretchr/testify/assert" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/cmd/agent/trigger/watcher.go b/internal/cmd/agent/trigger/watcher.go index 0246d20f15..d42f4f8dfc 100644 --- a/internal/cmd/agent/trigger/watcher.go +++ b/internal/cmd/agent/trigger/watcher.go @@ -7,7 +7,7 @@ import ( "time" "github.com/rancher/fleet/pkg/durations" - "github.com/rancher/wrangler/v2/pkg/objectset" + "github.com/rancher/wrangler/v3/pkg/objectset" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/cli/apply/apply.go b/internal/cmd/cli/apply/apply.go index 1234280afd..a4c472b00b 100644 --- a/internal/cmd/cli/apply/apply.go +++ b/internal/cmd/cli/apply/apply.go @@ -22,7 +22,7 @@ import ( "github.com/rancher/fleet/internal/ociwrapper" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/cmd/cli/deploy.go b/internal/cmd/cli/deploy.go index 952d035e13..4303d6e371 100644 --- a/internal/cmd/cli/deploy.go +++ b/internal/cmd/cli/deploy.go @@ -17,7 +17,7 @@ import ( "github.com/rancher/fleet/internal/manifest" "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - wyaml "github.com/rancher/wrangler/v2/pkg/yaml" + wyaml "github.com/rancher/wrangler/v3/pkg/yaml" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/log" diff --git a/internal/cmd/cli/match/match.go b/internal/cmd/cli/match/match.go index 72d61334f5..673bf8817e 100644 --- a/internal/cmd/cli/match/match.go +++ b/internal/cmd/cli/match/match.go @@ -19,7 +19,7 @@ import ( "github.com/rancher/fleet/internal/manifest" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" ) type Options struct { diff --git a/internal/cmd/controller/agentmanagement/agent/manifest.go b/internal/cmd/controller/agentmanagement/agent/manifest.go index a09a4f620c..caf98a3940 100644 --- a/internal/cmd/controller/agentmanagement/agent/manifest.go +++ b/internal/cmd/controller/agentmanagement/agent/manifest.go @@ -8,7 +8,7 @@ import ( "github.com/sirupsen/logrus" "github.com/rancher/fleet/internal/config" - "github.com/rancher/wrangler/v2/pkg/name" + "github.com/rancher/wrangler/v3/pkg/name" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/internal/cmd/controller/agentmanagement/controllers/bootstrap/bootstrap.go b/internal/cmd/controller/agentmanagement/controllers/bootstrap/bootstrap.go index d8041e0e9f..9e25fde239 100644 --- a/internal/cmd/controller/agentmanagement/controllers/bootstrap/bootstrap.go +++ b/internal/cmd/controller/agentmanagement/controllers/bootstrap/bootstrap.go @@ -12,8 +12,8 @@ import ( fleetns "github.com/rancher/fleet/internal/cmd/controller/namespace" "github.com/rancher/fleet/internal/config" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/apply" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/cmd/controller/agentmanagement/controllers/cluster/controller.go b/internal/cmd/controller/agentmanagement/controllers/cluster/controller.go index c64b3423e5..8af63081a3 100644 --- a/internal/cmd/controller/agentmanagement/controllers/cluster/controller.go +++ b/internal/cmd/controller/agentmanagement/controllers/cluster/controller.go @@ -10,10 +10,10 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/kv" - "github.com/rancher/wrangler/v2/pkg/name" - "github.com/rancher/wrangler/v2/pkg/relatedresource" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/name" + "github.com/rancher/wrangler/v3/pkg/relatedresource" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/cmd/controller/agentmanagement/controllers/cluster/import.go b/internal/cmd/controller/agentmanagement/controllers/cluster/import.go index 68a030e1f6..f58af81053 100644 --- a/internal/cmd/controller/agentmanagement/controllers/cluster/import.go +++ b/internal/cmd/controller/agentmanagement/controllers/cluster/import.go @@ -21,11 +21,11 @@ import ( "github.com/rancher/fleet/pkg/durations" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/name" - "github.com/rancher/wrangler/v2/pkg/randomtoken" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/apply" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/name" + "github.com/rancher/wrangler/v3/pkg/randomtoken" + "github.com/rancher/wrangler/v3/pkg/yaml" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller.go b/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller.go index 6bcbe4ffec..443313c5f6 100644 --- a/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller.go +++ b/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller.go @@ -20,12 +20,12 @@ import ( "github.com/rancher/fleet/pkg/durations" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - rbaccontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac/v1" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/name" - "github.com/rancher/wrangler/v2/pkg/relatedresource" + "github.com/rancher/wrangler/v3/pkg/apply" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + rbaccontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/name" + "github.com/rancher/wrangler/v3/pkg/relatedresource" v1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" diff --git a/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller_test.go b/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller_test.go index c934b7b50e..8dd6154b18 100644 --- a/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller_test.go +++ b/internal/cmd/controller/agentmanagement/controllers/clusterregistration/controller_test.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/golang/mock/gomock" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/generic/fake" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/generic/fake" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/agentmanagement/controllers/clusterregistrationtoken/handler.go b/internal/cmd/controller/agentmanagement/controllers/clusterregistrationtoken/handler.go index 5b8f5b060a..2108a0d01d 100644 --- a/internal/cmd/controller/agentmanagement/controllers/clusterregistrationtoken/handler.go +++ b/internal/cmd/controller/agentmanagement/controllers/clusterregistrationtoken/handler.go @@ -14,10 +14,10 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/name" - "github.com/rancher/wrangler/v2/pkg/relatedresource" + "github.com/rancher/wrangler/v3/pkg/apply" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/name" + "github.com/rancher/wrangler/v3/pkg/relatedresource" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" diff --git a/internal/cmd/controller/agentmanagement/controllers/config/controller.go b/internal/cmd/controller/agentmanagement/controllers/config/controller.go index 5d34770da4..f22a84186f 100644 --- a/internal/cmd/controller/agentmanagement/controllers/config/controller.go +++ b/internal/cmd/controller/agentmanagement/controllers/config/controller.go @@ -6,7 +6,7 @@ import ( "github.com/rancher/fleet/internal/config" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" v1 "k8s.io/api/core/v1" ) diff --git a/internal/cmd/controller/agentmanagement/controllers/controllers.go b/internal/cmd/controller/agentmanagement/controllers/controllers.go index 441f752d60..8ee11b130f 100644 --- a/internal/cmd/controller/agentmanagement/controllers/controllers.go +++ b/internal/cmd/controller/agentmanagement/controllers/controllers.go @@ -19,13 +19,13 @@ import ( "github.com/rancher/lasso/pkg/cache" "github.com/rancher/lasso/pkg/client" "github.com/rancher/lasso/pkg/controller" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac" - rbaccontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac/v1" - "github.com/rancher/wrangler/v2/pkg/ratelimit" - "github.com/rancher/wrangler/v2/pkg/start" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac" + rbaccontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1" + "github.com/rancher/wrangler/v3/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/start" "github.com/sirupsen/logrus" diff --git a/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent.go b/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent.go index 17a1e33dc7..095dbf2817 100644 --- a/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent.go +++ b/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent.go @@ -18,11 +18,11 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/name" - "github.com/rancher/wrangler/v2/pkg/relatedresource" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/apply" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/name" + "github.com/rancher/wrangler/v3/pkg/relatedresource" + "github.com/rancher/wrangler/v3/pkg/yaml" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent_test.go b/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent_test.go index bffcb46f9a..b865be9b2b 100644 --- a/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent_test.go +++ b/internal/cmd/controller/agentmanagement/controllers/manageagent/manageagent_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/rancher/wrangler/v2/pkg/generic/fake" + "github.com/rancher/wrangler/v3/pkg/generic/fake" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/resource" diff --git a/internal/cmd/controller/agentmanagement/controllers/resources/data.go b/internal/cmd/controller/agentmanagement/controllers/resources/data.go index a0ce850783..e83479156f 100644 --- a/internal/cmd/controller/agentmanagement/controllers/resources/data.go +++ b/internal/cmd/controller/agentmanagement/controllers/resources/data.go @@ -3,7 +3,7 @@ package resources import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/apply" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" diff --git a/internal/cmd/controller/agentmanagement/secret/util.go b/internal/cmd/controller/agentmanagement/secret/util.go index ec9308f63c..369ff76922 100644 --- a/internal/cmd/controller/agentmanagement/secret/util.go +++ b/internal/cmd/controller/agentmanagement/secret/util.go @@ -8,7 +8,7 @@ import ( "github.com/sirupsen/logrus" "github.com/rancher/fleet/pkg/durations" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/cmd/controller/agentmanagement/start.go b/internal/cmd/controller/agentmanagement/start.go index 5678f65b45..5e831db04f 100644 --- a/internal/cmd/controller/agentmanagement/start.go +++ b/internal/cmd/controller/agentmanagement/start.go @@ -5,10 +5,10 @@ import ( "github.com/rancher/fleet/internal/cmd/controller/agentmanagement/controllers" - "github.com/rancher/wrangler/v2/pkg/kubeconfig" - "github.com/rancher/wrangler/v2/pkg/leader" - "github.com/rancher/wrangler/v2/pkg/ratelimit" - "github.com/rancher/wrangler/v2/pkg/schemes" + "github.com/rancher/wrangler/v3/pkg/kubeconfig" + "github.com/rancher/wrangler/v3/pkg/leader" + "github.com/rancher/wrangler/v3/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/schemes" "github.com/sirupsen/logrus" diff --git a/internal/cmd/controller/cleanup/content/purge.go b/internal/cmd/controller/cleanup/content/purge.go index dac972e1a8..58e9148d6f 100644 --- a/internal/cmd/controller/cleanup/content/purge.go +++ b/internal/cmd/controller/cleanup/content/purge.go @@ -10,9 +10,9 @@ import ( "github.com/rancher/fleet/pkg/durations" fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/kv" - "github.com/rancher/wrangler/v2/pkg/ticker" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/ticker" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/cleanup/controllers/cleanup/controller.go b/internal/cmd/controller/cleanup/controllers/cleanup/controller.go index 4085cf12ff..d809d02027 100644 --- a/internal/cmd/controller/cleanup/controllers/cleanup/controller.go +++ b/internal/cmd/controller/cleanup/controllers/cleanup/controller.go @@ -8,9 +8,9 @@ import ( fleetcontrollers "github.com/rancher/fleet/pkg/generated/controllers/fleet.cattle.io/v1alpha1" "github.com/sirupsen/logrus" - "github.com/rancher/wrangler/v2/pkg/apply" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - rbaccontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac/v1" + "github.com/rancher/wrangler/v3/pkg/apply" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + rbaccontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" diff --git a/internal/cmd/controller/cleanup/controllers/controllers.go b/internal/cmd/controller/cleanup/controllers/controllers.go index 0a81cf4299..dd5bde4c53 100644 --- a/internal/cmd/controller/cleanup/controllers/controllers.go +++ b/internal/cmd/controller/cleanup/controllers/controllers.go @@ -12,13 +12,13 @@ import ( "github.com/rancher/lasso/pkg/cache" "github.com/rancher/lasso/pkg/client" "github.com/rancher/lasso/pkg/controller" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/core" - corecontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" - "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac" - rbaccontrollers "github.com/rancher/wrangler/v2/pkg/generated/controllers/rbac/v1" - "github.com/rancher/wrangler/v2/pkg/ratelimit" - "github.com/rancher/wrangler/v2/pkg/start" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" + corecontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" + "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac" + rbaccontrollers "github.com/rancher/wrangler/v3/pkg/generated/controllers/rbac/v1" + "github.com/rancher/wrangler/v3/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/start" "github.com/sirupsen/logrus" diff --git a/internal/cmd/controller/cleanup/start.go b/internal/cmd/controller/cleanup/start.go index e6c8850e6d..51ee1c3b45 100644 --- a/internal/cmd/controller/cleanup/start.go +++ b/internal/cmd/controller/cleanup/start.go @@ -5,9 +5,9 @@ import ( "github.com/rancher/fleet/internal/cmd/controller/cleanup/content" "github.com/rancher/fleet/internal/cmd/controller/cleanup/controllers" - "github.com/rancher/wrangler/v2/pkg/kubeconfig" - "github.com/rancher/wrangler/v2/pkg/leader" - "github.com/rancher/wrangler/v2/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/kubeconfig" + "github.com/rancher/wrangler/v3/pkg/leader" + "github.com/rancher/wrangler/v3/pkg/ratelimit" "github.com/sirupsen/logrus" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" diff --git a/internal/cmd/controller/gitops/reconciler/gitjob_controller.go b/internal/cmd/controller/gitops/reconciler/gitjob_controller.go index 369611bb6c..d288ea0b96 100644 --- a/internal/cmd/controller/gitops/reconciler/gitjob_controller.go +++ b/internal/cmd/controller/gitops/reconciler/gitjob_controller.go @@ -19,7 +19,7 @@ import ( "github.com/rancher/fleet/pkg/sharding" "github.com/reugn/go-quartz/quartz" - "github.com/rancher/wrangler/v2/pkg/name" + "github.com/rancher/wrangler/v3/pkg/name" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" diff --git a/internal/cmd/controller/grutil/status.go b/internal/cmd/controller/grutil/status.go index a5f579dbda..e07cb153e5 100644 --- a/internal/cmd/controller/grutil/status.go +++ b/internal/cmd/controller/grutil/status.go @@ -10,8 +10,8 @@ import ( "github.com/rancher/fleet/internal/cmd/controller/summary" "github.com/rancher/fleet/internal/metrics" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/kstatus" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/kstatus" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" diff --git a/internal/cmd/controller/grutil/targetsyaml.go b/internal/cmd/controller/grutil/targetsyaml.go index 4f718d21e1..bd11739a26 100644 --- a/internal/cmd/controller/grutil/targetsyaml.go +++ b/internal/cmd/controller/grutil/targetsyaml.go @@ -6,7 +6,7 @@ import ( fname "github.com/rancher/fleet/internal/name" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/name" + "github.com/rancher/wrangler/v3/pkg/name" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/imagescan/gitcommit_job.go b/internal/cmd/controller/imagescan/gitcommit_job.go index d767700502..90352c0f9c 100644 --- a/internal/cmd/controller/imagescan/gitcommit_job.go +++ b/internal/cmd/controller/imagescan/gitcommit_job.go @@ -29,8 +29,8 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/fleet/pkg/durations" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/kstatus" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/kstatus" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/imagescan/tagscan_job.go b/internal/cmd/controller/imagescan/tagscan_job.go index 9e86a605b9..c9644ea811 100644 --- a/internal/cmd/controller/imagescan/tagscan_job.go +++ b/internal/cmd/controller/imagescan/tagscan_job.go @@ -20,8 +20,8 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/fleet/pkg/durations" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/kstatus" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/kstatus" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/options/calculate.go b/internal/cmd/controller/options/calculate.go index 87927db53d..2f240cf3e1 100644 --- a/internal/cmd/controller/options/calculate.go +++ b/internal/cmd/controller/options/calculate.go @@ -7,7 +7,7 @@ import ( "encoding/json" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/data" + "github.com/rancher/wrangler/v3/pkg/data" ) // DeploymentID hashes the options to a string diff --git a/internal/cmd/controller/reconciler/bundledeployment_controller.go b/internal/cmd/controller/reconciler/bundledeployment_controller.go index d5bd14cbb0..4c5734df00 100644 --- a/internal/cmd/controller/reconciler/bundledeployment_controller.go +++ b/internal/cmd/controller/reconciler/bundledeployment_controller.go @@ -10,7 +10,7 @@ import ( "github.com/rancher/fleet/internal/metrics" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/fleet/pkg/sharding" - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/util/retry" diff --git a/internal/cmd/controller/reconciler/cluster_controller.go b/internal/cmd/controller/reconciler/cluster_controller.go index f2c864dba5..e62d1e0ef4 100644 --- a/internal/cmd/controller/reconciler/cluster_controller.go +++ b/internal/cmd/controller/reconciler/cluster_controller.go @@ -16,7 +16,7 @@ import ( "github.com/rancher/fleet/pkg/sharding" fleetutil "github.com/rancher/fleet/internal/cmd/controller/errorutil" - "github.com/rancher/wrangler/v2/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/condition" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" diff --git a/internal/cmd/controller/reconciler/clustergroup_controller.go b/internal/cmd/controller/reconciler/clustergroup_controller.go index b443e4bc7b..d175e57a98 100644 --- a/internal/cmd/controller/reconciler/clustergroup_controller.go +++ b/internal/cmd/controller/reconciler/clustergroup_controller.go @@ -15,7 +15,7 @@ import ( "github.com/rancher/fleet/internal/metrics" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/fleet/pkg/sharding" - "github.com/rancher/wrangler/v2/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/condition" "k8s.io/apimachinery/pkg/api/equality" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/cmd/controller/summary/summary.go b/internal/cmd/controller/summary/summary.go index 171c8e11b0..6ba29c2b38 100644 --- a/internal/cmd/controller/summary/summary.go +++ b/internal/cmd/controller/summary/summary.go @@ -9,8 +9,8 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" ) // IncrementState increments counters in the BundleSummary. We store up to 10 non ready resources in the summary, with the bundldedeployment's state. diff --git a/internal/cmd/controller/target/builder.go b/internal/cmd/controller/target/builder.go index 5166aa3c3e..d1bfb5bb66 100644 --- a/internal/cmd/controller/target/builder.go +++ b/internal/cmd/controller/target/builder.go @@ -15,7 +15,7 @@ import ( "github.com/rancher/fleet/internal/cmd/controller/target/matcher" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" "k8s.io/apimachinery/pkg/util/sets" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/internal/cmd/controller/target/target.go b/internal/cmd/controller/target/target.go index 0bddf0537e..9025f2c1da 100644 --- a/internal/cmd/controller/target/target.go +++ b/internal/cmd/controller/target/target.go @@ -11,7 +11,7 @@ import ( "github.com/rancher/fleet/internal/cmd/controller/summary" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" diff --git a/internal/config/config.go b/internal/config/config.go index a0928ccaa8..8629327759 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -8,7 +8,7 @@ import ( "github.com/rancher/fleet/pkg/version" - corev1 "github.com/rancher/wrangler/v2/pkg/generated/controllers/core/v1" + corev1 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/helmdeployer/delete.go b/internal/helmdeployer/delete.go index 32d2868ce3..f9242e5a3a 100644 --- a/internal/helmdeployer/delete.go +++ b/internal/helmdeployer/delete.go @@ -11,7 +11,7 @@ import ( fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/kv" "sigs.k8s.io/controller-runtime/pkg/log" ) diff --git a/internal/helmdeployer/history.go b/internal/helmdeployer/history.go index 8e900650e8..00edeaabe2 100644 --- a/internal/helmdeployer/history.go +++ b/internal/helmdeployer/history.go @@ -9,8 +9,8 @@ import ( "helm.sh/helm/v3/pkg/release" "helm.sh/helm/v3/pkg/storage/driver" - "github.com/rancher/wrangler/v2/pkg/kv" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/yaml" ) func (h *Helm) EnsureInstalled(bundleID, resourcesID string) (bool, error) { diff --git a/internal/helmdeployer/impersonate.go b/internal/helmdeployer/impersonate.go index 5a1e9eefa3..82f6d7655f 100644 --- a/internal/helmdeployer/impersonate.go +++ b/internal/helmdeployer/impersonate.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/rancher/wrangler/v2/pkg/ratelimit" + "github.com/rancher/wrangler/v3/pkg/ratelimit" corev1 "k8s.io/api/core/v1" apierror "k8s.io/apimachinery/pkg/api/errors" diff --git a/internal/helmdeployer/kustomize/kstatus.go b/internal/helmdeployer/kustomize/kstatus.go index 28b025c50a..9c63780ba0 100644 --- a/internal/helmdeployer/kustomize/kstatus.go +++ b/internal/helmdeployer/kustomize/kstatus.go @@ -1,8 +1,8 @@ package kustomize import ( - "github.com/rancher/wrangler/v2/pkg/data" - "github.com/rancher/wrangler/v2/pkg/summary" + "github.com/rancher/wrangler/v3/pkg/data" + "github.com/rancher/wrangler/v3/pkg/summary" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/cli-utils/pkg/kstatus/status" ) diff --git a/internal/helmdeployer/kustomize/kustomize.go b/internal/helmdeployer/kustomize/kustomize.go index 57e81dd616..0cbdad1472 100644 --- a/internal/helmdeployer/kustomize/kustomize.go +++ b/internal/helmdeployer/kustomize/kustomize.go @@ -6,8 +6,8 @@ import ( "github.com/rancher/fleet/internal/content" "github.com/rancher/fleet/internal/manifest" - "github.com/rancher/wrangler/v2/pkg/data/convert" - "github.com/rancher/wrangler/v2/pkg/slice" + "github.com/rancher/wrangler/v3/pkg/data/convert" + "github.com/rancher/wrangler/v3/pkg/slice" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" diff --git a/internal/helmdeployer/postrender.go b/internal/helmdeployer/postrender.go index f8a10b0411..5419009efe 100644 --- a/internal/helmdeployer/postrender.go +++ b/internal/helmdeployer/postrender.go @@ -15,7 +15,7 @@ import ( "github.com/rancher/fleet/internal/manifest" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" "k8s.io/apimachinery/pkg/api/meta" ) diff --git a/internal/helmdeployer/postrender_test.go b/internal/helmdeployer/postrender_test.go index 0fb23d1d85..36d7fa2ec1 100644 --- a/internal/helmdeployer/postrender_test.go +++ b/internal/helmdeployer/postrender_test.go @@ -6,7 +6,7 @@ import ( "github.com/rancher/fleet/internal/manifest" "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" "github.com/google/go-cmp/cmp" "helm.sh/helm/v3/pkg/chart" diff --git a/internal/helmdeployer/rawyaml/resources.go b/internal/helmdeployer/rawyaml/resources.go index 4fbd3e5dbd..e3b48448b5 100644 --- a/internal/helmdeployer/rawyaml/resources.go +++ b/internal/helmdeployer/rawyaml/resources.go @@ -6,7 +6,7 @@ import ( "helm.sh/helm/v3/pkg/chart" - "github.com/rancher/wrangler/v2/pkg/yaml" + "github.com/rancher/wrangler/v3/pkg/yaml" "k8s.io/apimachinery/pkg/runtime" ) diff --git a/internal/helmdeployer/render/helm.go b/internal/helmdeployer/render/helm.go index 40839e0145..22788fd445 100644 --- a/internal/helmdeployer/render/helm.go +++ b/internal/helmdeployer/render/helm.go @@ -14,7 +14,7 @@ import ( "github.com/rancher/fleet/internal/manifest" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/kv" "sigs.k8s.io/yaml" ) diff --git a/internal/helmdeployer/render/patch/patch.go b/internal/helmdeployer/render/patch/patch.go index 8b6f1db202..e4d5dc843a 100644 --- a/internal/helmdeployer/render/patch/patch.go +++ b/internal/helmdeployer/render/patch/patch.go @@ -13,7 +13,7 @@ import ( "github.com/rancher/fleet/internal/manifest" fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/patch" + "github.com/rancher/wrangler/v3/pkg/patch" "sigs.k8s.io/kustomize/kyaml/yaml" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go index 565178cdf6..36ee404254 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/bundle_types.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go index 0d6e46fcb0..31a3a7e266 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/bundledeployment_types.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/rancher/wrangler/v2/pkg/genericcondition" - "github.com/rancher/wrangler/v2/pkg/summary" + "github.com/rancher/wrangler/v3/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/summary" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go index 1806c533dd..372f123e57 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/cluster_types.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go index 5ca7188dc4..a963d7cbdb 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/clustergroup_types.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go index 55a542408f..92d47db67a 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/gitrepo_types.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go b/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go index 867cf56849..d816b943b9 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/imagescan_types.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go index 83e3743f3a..94071846ed 100644 --- a/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/fleet.cattle.io/v1alpha1/zz_generated.deepcopy.go @@ -21,7 +21,7 @@ limitations under the License. package v1alpha1 import ( - "github.com/rancher/wrangler/v2/pkg/genericcondition" + "github.com/rancher/wrangler/v3/pkg/genericcondition" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/apis/go.mod b/pkg/apis/go.mod index d2161e8dbc..200b869541 100644 --- a/pkg/apis/go.mod +++ b/pkg/apis/go.mod @@ -1,27 +1,29 @@ module github.com/rancher/fleet/pkg/apis -go 1.22 +go 1.22.0 + +toolchain go1.22.3 require ( - github.com/rancher/wrangler/v2 v2.1.4 - k8s.io/api v0.28.6 - k8s.io/apimachinery v0.28.6 + github.com/rancher/wrangler/v3 v3.0.0-rc2 + k8s.io/api v0.30.2 + k8s.io/apimachinery v0.30.2 ) require ( - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - golang.org/x/net v0.23.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/klog/v2 v2.120.1 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect - sigs.k8s.io/cli-utils v0.28.0 // indirect + sigs.k8s.io/cli-utils v0.35.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/pkg/apis/go.sum b/pkg/apis/go.sum index 154dad9c4f..79a72daf3f 100644 --- a/pkg/apis/go.sum +++ b/pkg/apis/go.sum @@ -1,12 +1,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -25,16 +26,16 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rancher/wrangler/v2 v2.1.4 h1:ohov0i6A9dJHHO6sjfsH4Dqv93ZTdm5lIJVJdPzVdQc= -github.com/rancher/wrangler/v2 v2.1.4/go.mod h1:af5OaGU/COgreQh1mRbKiUI64draT2NN34uk+PALFY8= +github.com/rancher/wrangler/v3 v3.0.0-rc2 h1:XGSPPp6GXELqlLvwJp5MsdqyCPu6SCA4UKJ7rQJzE40= +github.com/rancher/wrangler/v3 v3.0.0-rc2/go.mod h1:f54hh7gFkwwbjsieT2b63FowzTU8FvrBonPe//0CIXo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -46,8 +47,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -76,16 +77,16 @@ 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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.6 h1:yy6u9CuIhmg55YvF/BavPBBXB+5QicB64njJXxVnzLo= -k8s.io/api v0.28.6/go.mod h1:AM6Ys6g9MY3dl/XNaNfg/GePI0FT7WBGu8efU/lirAo= -k8s.io/apimachinery v0.28.6 h1:RsTeR4z6S07srPg6XYrwXpTJVMXsjPXn0ODakMytSW0= -k8s.io/apimachinery v0.28.6/go.mod h1:QFNX/kCl/EMT2WTSz8k4WLCv2XnkOLMaL8GAVRMdpsA= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= +k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= +k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= +k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/cli-utils v0.28.0 h1:gsvwqygoXlW2y8CmKdflQJNZp1Yhi4geATW3/Ei7oYc= -sigs.k8s.io/cli-utils v0.28.0/go.mod h1:WDVRa5/eQBKntG++uyKdyT+xU7MLdCR4XsgseqL5uX4= +sigs.k8s.io/cli-utils v0.35.0 h1:dfSJaF1W0frW74PtjwiyoB4cwdRygbHnC7qe7HF0g/Y= +sigs.k8s.io/cli-utils v0.35.0/go.mod h1:ITitykCJxP1vaj1Cew/FZEaVJ2YsTN9Q71m02jebkoE= 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= diff --git a/pkg/generated/controllers/fleet.cattle.io/factory.go b/pkg/generated/controllers/fleet.cattle.io/factory.go index 95df9be63b..55af801dc7 100644 --- a/pkg/generated/controllers/fleet.cattle.io/factory.go +++ b/pkg/generated/controllers/fleet.cattle.io/factory.go @@ -20,7 +20,7 @@ package fleet import ( "github.com/rancher/lasso/pkg/controller" - "github.com/rancher/wrangler/v2/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/generic" "k8s.io/client-go/rest" ) diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundle.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundle.go index 8325353fe1..bbd636996b 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundle.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundle.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundledeployment.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundledeployment.go index 0810b0fedb..9ba5dc8f3c 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundledeployment.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundledeployment.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundlenamespacemapping.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundlenamespacemapping.go index ee70433743..4472cdfa9e 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundlenamespacemapping.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/bundlenamespacemapping.go @@ -20,7 +20,7 @@ package v1alpha1 import ( v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/generic" ) // BundleNamespaceMappingController interface for managing BundleNamespaceMapping resources. diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/cluster.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/cluster.go index e093200963..f0175eb431 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/cluster.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/cluster.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clustergroup.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clustergroup.go index 404b16ff19..d9ae92c0c3 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clustergroup.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clustergroup.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistration.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistration.go index 4e6145e856..7440952901 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistration.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistration.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistrationtoken.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistrationtoken.go index bb02d35201..a9eebe404c 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistrationtoken.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/clusterregistrationtoken.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/content.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/content.go index 17b79a093d..604aaaf39c 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/content.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/content.go @@ -20,7 +20,7 @@ package v1alpha1 import ( v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/generic" ) // ContentController interface for managing Content resources. diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitrepo.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitrepo.go index d4a932b141..32744b1b50 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitrepo.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitrepo.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitreporestriction.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitreporestriction.go index c3b671ce17..26c784c0ec 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitreporestriction.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/gitreporestriction.go @@ -20,7 +20,7 @@ package v1alpha1 import ( v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/generic" ) // GitRepoRestrictionController interface for managing GitRepoRestriction resources. diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/imagescan.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/imagescan.go index 1caba56b05..1755a3efb6 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/imagescan.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/imagescan.go @@ -24,10 +24,10 @@ import ( "time" v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" - "github.com/rancher/wrangler/v2/pkg/apply" - "github.com/rancher/wrangler/v2/pkg/condition" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/kv" + "github.com/rancher/wrangler/v3/pkg/apply" + "github.com/rancher/wrangler/v3/pkg/condition" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/kv" "k8s.io/apimachinery/pkg/api/equality" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/interface.go b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/interface.go index 053ad1de72..90449b2857 100644 --- a/pkg/generated/controllers/fleet.cattle.io/v1alpha1/interface.go +++ b/pkg/generated/controllers/fleet.cattle.io/v1alpha1/interface.go @@ -21,8 +21,8 @@ package v1alpha1 import ( v1alpha1 "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1" "github.com/rancher/lasso/pkg/controller" - "github.com/rancher/wrangler/v2/pkg/generic" - "github.com/rancher/wrangler/v2/pkg/schemes" + "github.com/rancher/wrangler/v3/pkg/generic" + "github.com/rancher/wrangler/v3/pkg/schemes" "k8s.io/apimachinery/pkg/runtime/schema" ) From 6e7df16e7d411513548a7c5d1b3f20c411149cc5 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Tue, 2 Jul 2024 13:16:28 +0200 Subject: [PATCH 2/8] Update release.md --- docs/release.md | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/docs/release.md b/docs/release.md index bcb1d75598..fcf180f88f 100644 --- a/docs/release.md +++ b/docs/release.md @@ -15,29 +15,25 @@ If a bug fix needs to be brought into a release, such as during the release cand After merge verify that the Github Action test runs for the release branch were successful. ---- - -## Pre-Release - -1. Ensure that all modules are at their desired versions in `go.mod` -1. Ensure that all nested and external images are at their desired versions (check `charts/` as well, and you can the following [ripgrep](https://github.com/BurntSushi/ripgrep) command at the root of the repository to see all images used: `rg "repository:" -A 1 | rg "tag:" -B 1` -1. Run `go mod tidy` and `go generate` and ensure that `git status` is clean -1. Determine the tag for the next intended release (must be valid [SemVer](https://semver.org/) prepended with `v`) - -## Release Candidates +## When do we branch? -1. Checkout the release branch (e.g., `release-0.4`) or create it based off of the latest `main` branch. The branch name should be the first 2 parts of the semantic version with `release-` prepended. -1. Use `git tag` and append the tag from the **Pre-Release** section with `-rcX` where `X` is an unsigned integer that starts with `1` (if `-rcX` already exists, increment `X` by one) +We branch the next release branch release/v0.x from master only, when we start on 0.x+1 features. This should keep the distance between both branches to a minimum. -## Full Releases +We have to make sure all the QA relevant commits are part of the release plan and their issues have the correct milestone, etc. -1. Open a draft release on the GitHub releases page -1. Send draft link to maintainers with view permissions to ensure that contents are valid -1. Create GitHub release and create a new tag on the appropriate release branch while doing so (using the tag from the **Pre-Release** section) +``` +% git merge-base master release/v0.6 +2312ff8f8823320629769f9ab408472ed58c2442 +% git log 2312ff8f8823320629769f9ab408472ed58c2442..master +``` -## Post-Release +After branching, we cherry pick PRs with separate issues for QA. The issues should use '[v0.x]' in their title. -1. Pull Fleet images from DockerHub to ensure manifests work as expected -1. Open a PR in [rancher/charts](https://github.com/rancher/charts) that ensures every Fleet-related chart is using the new RC (branches and number of PRs is dependent on Rancher) +## What else to do after a release +More detailed instructions, e.g. how to use the release workflows and interact with the rancher/charts repo are in the Wiki. +* generate release notes, make sure all changes are included since last release +* edit release notes, only user issues that are relevant to users, fix spelling, capitalization +* update versioned docs in fleet-docs with yarn +* adapt CI so scheduled test are run for new version From 6f3749ee251ba28d60b6d6f58da341311bc86073 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Tue, 2 Jul 2024 13:30:27 +0200 Subject: [PATCH 3/8] Agentmanagement sub command honors FLEET_PROPAGATE_DEBUG_SETTINGS_TO_AGENTS (#2567) --- charts/fleet/templates/deployment.yaml | 4 ++-- internal/cmd/controller/agentmanagement/root.go | 17 ++++++++++++++++- internal/cmd/controller/root.go | 12 ++---------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/charts/fleet/templates/deployment.yaml b/charts/fleet/templates/deployment.yaml index 5b872262a4..bf3ebfd397 100644 --- a/charts/fleet/templates/deployment.yaml +++ b/charts/fleet/templates/deployment.yaml @@ -33,8 +33,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: FLEET_PROPAGATE_DEBUG_SETTINGS_TO_AGENTS - value: {{ quote $.Values.propagateDebugSettingsToAgents }} {{- if $.Values.clusterEnqueueDelay }} - name: FLEET_CLUSTER_ENQUEUE_DELAY value: {{ $.Values.clusterEnqueueDelay }} @@ -181,6 +179,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: FLEET_PROPAGATE_DEBUG_SETTINGS_TO_AGENTS + value: {{ quote $.Values.propagateDebugSettingsToAgents }} {{- if $.Values.debug }} - name: CATTLE_DEV_MODE value: "true" diff --git a/internal/cmd/controller/agentmanagement/root.go b/internal/cmd/controller/agentmanagement/root.go index 224702f84c..f67831c6d5 100644 --- a/internal/cmd/controller/agentmanagement/root.go +++ b/internal/cmd/controller/agentmanagement/root.go @@ -2,26 +2,41 @@ package agentmanagement import ( "fmt" + "os" + "strconv" command "github.com/rancher/fleet/internal/cmd" + "github.com/rancher/fleet/internal/cmd/controller/agentmanagement/agent" "github.com/rancher/fleet/pkg/version" "github.com/spf13/cobra" ) type AgentManagement struct { + command.DebugConfig Kubeconfig string `usage:"kubeconfig file"` Namespace string `usage:"namespace to watch" env:"NAMESPACE"` DisableBootstrap bool `usage:"disable local cluster components" name:"disable-bootstrap"` } // HelpFunc hides the global flag from the help output -func (c *AgentManagement) HelpFunc(cmd *cobra.Command, strings []string) { +func (a *AgentManagement) HelpFunc(cmd *cobra.Command, strings []string) { _ = cmd.Flags().MarkHidden("disable-gitops") _ = cmd.Flags().MarkHidden("disable-metrics") _ = cmd.Flags().MarkHidden("shard-id") cmd.Parent().HelpFunc()(cmd, strings) } +func (a *AgentManagement) PersistentPre(_ *cobra.Command, _ []string) error { + // if debug is enabled in controller, enable in agents too (unless otherwise specified) + propagateDebug, _ := strconv.ParseBool(os.Getenv("FLEET_PROPAGATE_DEBUG_SETTINGS_TO_AGENTS")) + if propagateDebug && a.Debug { + agent.DebugEnabled = true + agent.DebugLevel = a.DebugLevel + } + + return nil +} + func (a *AgentManagement) Run(cmd *cobra.Command, args []string) error { if a.Namespace == "" { return fmt.Errorf("--namespace or env NAMESPACE is required to be set") diff --git a/internal/cmd/controller/root.go b/internal/cmd/controller/root.go index df94deb8f7..a3437b5f11 100644 --- a/internal/cmd/controller/root.go +++ b/internal/cmd/controller/root.go @@ -14,7 +14,6 @@ import ( "time" "github.com/rancher/fleet/internal/cmd/controller/agentmanagement" - "github.com/rancher/fleet/internal/cmd/controller/agentmanagement/agent" "github.com/rancher/fleet/internal/cmd/controller/gitops" "github.com/spf13/cobra" @@ -71,18 +70,11 @@ var ( } ) -func (r *FleetManager) PersistentPre(_ *cobra.Command, _ []string) error { - if err := r.SetupDebug(); err != nil { +func (f *FleetManager) PersistentPre(_ *cobra.Command, _ []string) error { + if err := f.SetupDebug(); err != nil { return fmt.Errorf("failed to setup debug logging: %w", err) } - // if debug is enabled in controller, enable in agents too (unless otherwise specified) - propagateDebug, _ := strconv.ParseBool(os.Getenv("FLEET_PROPAGATE_DEBUG_SETTINGS_TO_AGENTS")) - if propagateDebug && r.Debug { - agent.DebugEnabled = true - agent.DebugLevel = r.DebugLevel - } - return nil } From b93e21ecf3d9f53984d1e4ca8b842178b7731161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20N=C3=A9au?= Date: Tue, 2 Jul 2024 16:05:44 +0200 Subject: [PATCH 4/8] Override Kubernetes node when deploying Fleet to AKS/GKE (#2571) This should prevent CI failures caused by nodes not being created by k3d on those clusters. --- .github/scripts/deploy-fleet.sh | 3 ++- .github/workflows/aks.yml | 4 +++- .github/workflows/gke.yml | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/scripts/deploy-fleet.sh b/.github/scripts/deploy-fleet.sh index f4a65af077..f8acca08ed 100755 --- a/.github/scripts/deploy-fleet.sh +++ b/.github/scripts/deploy-fleet.sh @@ -3,6 +3,7 @@ set -euxo pipefail shards_json=${SHARDS-""} +node=${NODE-k3d-upstream-server-0} function eventually { for _ in $(seq 1 3); do @@ -24,7 +25,7 @@ else agentTag="dev" fi -host=$(kubectl get node k3d-upstream-server-0 -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}') +host=$(kubectl get node $node -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}') ca=$( kubectl config view --flatten -o jsonpath='{.clusters[?(@.name == "k3d-upstream")].cluster.certificate-authority-data}' | base64 -d ) server="https://$host:6443" diff --git a/.github/workflows/aks.yml b/.github/workflows/aks.yml index 4a17ec6d39..1411e8efb3 100644 --- a/.github/workflows/aks.yml +++ b/.github/workflows/aks.yml @@ -125,8 +125,10 @@ jobs: name: Deploy Fleet run: | export KUBECONFIG="$GITHUB_WORKSPACE/kubeconfig-fleet-ci" + kc_node=$(kubectl get nodes --no-headers -o name | head -n 1) + node=${kc_node#node/} echo "${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }}" - SHARDS='[{"id":"shard0"},{"id":"shard1"},{"id":"shard2"}]' ./.github/scripts/deploy-fleet.sh \ + NODE=$node SHARDS='[{"id":"shard0"},{"id":"shard1"},{"id":"shard2"}]' ./.github/scripts/deploy-fleet.sh \ ${{ steps.meta-fleet.outputs.tags }} \ ${{ steps.meta-fleet-agent.outputs.tags }} - diff --git a/.github/workflows/gke.yml b/.github/workflows/gke.yml index d49a08e308..a323ce285a 100644 --- a/.github/workflows/gke.yml +++ b/.github/workflows/gke.yml @@ -129,8 +129,10 @@ jobs: - name: Deploy Fleet run: | + kc_node=$(kubectl get nodes --no-headers -o name | head -n 1) + node=${kc_node#node/} echo "${{ steps.meta-fleet.outputs.tags }} ${{ steps.meta-fleet-agent.outputs.tags }}" - SHARDS='[{"id":"shard0"},{"id":"shard1"},{"id":"shard2"}]' ./.github/scripts/deploy-fleet.sh \ + NODE=$node SHARDS='[{"id":"shard0"},{"id":"shard1"},{"id":"shard2"}]' ./.github/scripts/deploy-fleet.sh \ ${{ steps.meta-fleet.outputs.tags }} \ ${{ steps.meta-fleet-agent.outputs.tags }} - From 47cc04ac15e914a59e2e06be2c2ee178960c096a Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Tue, 2 Jul 2024 17:28:41 +0200 Subject: [PATCH 5/8] Shorten DEVELOPING.md (#2573) --- DEVELOPING.md | 151 +------------------------------ docs/testing_fleet_in_rancher.md | 132 +++++++++++++++++++++++++++ 2 files changed, 133 insertions(+), 150 deletions(-) create mode 100644 docs/testing_fleet_in_rancher.md diff --git a/DEVELOPING.md b/DEVELOPING.md index f4a152fb24..828adbb9fb 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -4,157 +4,8 @@ This document contains tips, workflows, and more for local development within th More documentation for maintainers and developers of Fleet can be found in [docs/](docs/). -## Fleet Standalone - For Running E2E Tests +## Dev Scripts & Running E2E Tests Development scripts are provided under `/dev` to make it easier setting up a local development Fleet standalone environment and running the E2E tests against it. These scripts are intended only for local Fleet development, not for production nor any other real world scenario. Setting up the local development environment and running the E2E tests is described in the [/dev/README.md](/dev/README.md). - ---- - -## Fleet in Rancher - -All steps in this guide assume your current working directory is the root of the repository. -Moreover, this guide was written for Unix-like developer environments, so you may need to modify some steps if you are using a non-Unix-like developer environment (i.e. Windows). - -### Step 1: Image Preparation - -We need to use a registry to store `fleet-agent` developer builds. -Using a personal [DockerHub](https://hub.docker.com/) repository is usually a suitable choice. -The full repository name must be `/fleet-agent`. - -Now, we need export an environment variable with your repository name as the value. -This will be used when building, pushing, and deploying your agent. - -> Note: the value for this variable should not include `/fleet-agent`. -> For example, if your full DockerHub repository name is `foobar/fleet-agent`, the value used below should be `foobar`. - -Export the new `AGENT_REPO` variable and use the aforementioned value. - -``` -export AGENT_REPO= -``` - -### Step 2: Local Cluster Access - -We need a local cluster to work with. -For this guide, we will use [k3d](https://github.com/rancher/k3d). - -```sh -k3d cluster create -``` - -### Step 3: Generate as Needed - -If you have changed Go code, you may need to generate. - -```sh -go generate -``` - -### Step 4: Running the Controller - -First, we need to run Rancher locally. -You can use the [Rancher Wiki](https://github.com/rancher/rancher/wiki/Setting-Up-Rancher-2.0-Development-Environment) for information on how to do so. - -> If you are unsure about which method you would like use for tunneling to localhost, we recommend [ngrok](https://ngrok.com) or [tunnelware](https://github.com/StrongMonkey/tunnelware). - -Now, let's build and push your `fleet-agent` (`linux-amd64` image by default), if applicable. - -```sh -( - dev/build-fleet - docker tag rancher/fleet-agent:dev $AGENT_REPO/fleet-agent:dev - docker push $AGENT_REPO/fleet-agent:dev -) -``` - -In the Rancher Dashboard, navigate to the `fleet-controller` ConfigMap. -This is likely located in a `cattle-fleet-*` or `fleet-*` namespace. -Replace the existing agent-related fields with the following information: - -- your agent image and tag -- the image pull policy to `Always` (for iterative development) - -Once the ConfigMap has been updated, edit the `fleet-controller` Deployment and scale down its `replicas` to `0`. -With that change, we can now run the controller locally. - -```sh -( - go fmt ./... - go run cmd/fleetcontroller/main.go -) -``` - -**Optional:** you can test Rancher's `FleetWorkspaces` feature by moving Fleet clusters to another workspace in the "Continuous Delivery" section of the Rancher UI. -You can create your own workspace using the API or the UI. -Ensure that clusters are in an "Active" state after migration. - -### Step 5: Create GitRepo CR(s) - -The controller should be running in your terminal window/pane! -You can now create [GitRepo](https://fleet.rancher.io/gitrepo-structure/) custom resource objects and test Fleet locally. - ---- - -## Fleet in Rancher - Using a Custom Fork - -If you need to test Fleet *during Rancher startup*, you may want to use a custom fork. -The following steps can help you do so: - -1. Fork [rancher/fleet](https://github.com/rancher/fleet) and commit your changes to a branch of your choice -2. Change image names and tags for the Helm chart(s) for your custom development image(s) accordingly -3. Publish images corresponding to the names and tags changed in the Helm chart(s) -4. Tag your **_fork_** with a [SemVer-compliant](https://semver.org/) tag that's "greater" than the Fleet chart tag in your chosen version of Rancher _(note: the exact tag name is not that important, but we want it to be "grater" just in case there's a collision for the "latest" version)_ -5. Fork [rancher/charts](https://github.com/rancher/charts) and update branch `dev-v2.x` with your changes to the `fleet`, `fleet-crd`, and `fleet-agent` packages -6. You'll need to change the chart URL to your charts' `tgz` location (this may need to be self-hosted) -7. Finally, commits those changes, execute `make charts` and commit those changes in a second commit -8. Fork [rancher/rancher](https://github.com/rancher/rancher) and change the charts URL to point to your fork -9. Start Rancher locally (instructions: [Rancher Wiki](https://github.com/rancher/rancher/wiki/Setting-Up-Rancher-2.0-Development-Environment)) and your fork's chart should be deployed - -## Advanced: Standalone Fleet (Obsolete How-to) - -Continuous Integration executes most [E2E tests](/e2e/) against Fleet Standalone. For developing purposes we recommend using our [dev scripts](#local-development-workflow-fleet-standalone---for-running-e2e-tests) instead of this how-to. We keep this part only for documental reasons. - -Build and push your `fleet-agent` (`linux-amd64` image by default), install your Fleet charts, and then replace the controller deployment with your local controller build. - -```sh -( - go fmt ./... - REPO=$AGENT_REPO make agent-dev - docker push $AGENT_REPO/fleet-agent:dev - for i in cattle-fleet-system fleet-default fleet-local; do kubectl create namespace $i; done - helm install -n cattle-fleet-system fleet-crd ./charts/fleet-crd - helm install -n cattle-fleet-system fleet --set agentImage.repository=$AGENT_REPO/fleet-agent --set agentImage.imagePullPolicy=Always ./charts/fleet - kubectl delete deployment -n cattle-fleet-system fleet-controller - go run cmd/fleetcontroller/main.go -) -``` - -Alternatively, if the agent's code has been unchanged, you can use the latest agent instead. -We'll use the latest Git tag for this, and _assume_ it is available on DockerHub. - -```sh -( - go fmt ./... - for i in cattle-fleet-system fleet-default fleet-local; do kubectl create namespace $i; done - helm install -n cattle-fleet-system fleet-crd ./charts/fleet-crd - helm install -n cattle-fleet-system fleet --set agentImage.tag=$(git tag --sort=taggerdate | tail -1) ./charts/fleet - kubectl delete deployment -n cattle-fleet-system fleet-controller - go run cmd/fleetcontroller/main.go -) -``` - ---- - -### Tips and Tricks - -Since the Fleet components' controller framework of choice is [Wrangler](https://github.com/rancher/wrangler), we can share caches and avoid unnecessary API requests. -Moreover, we can customize enqueue logic to decrease load on the cluster and its components. -For example: if a `BundleDeployment` encounters failure and meets certain criteria such that it'll never become active, we should move the object to a permanent error state that requires manual triage. -While reconciling state and automatically attempting to reach desired state is... desired..., we should find opportunities to eliminate loops, scheduling logic, and frequent re-enqueuing so that we decrease CPU and network load. -Solving example scenario may even result in manual triage for the `BundleDeployment`, which could be a good trade-off for the user! - -To examine Fleet network load, we can use Istio pod injection to monitor network traffic and observe it with Kiali. -If Istio is installed via the Rancher UI, you can perform pod injection with a checkbox per pod. -To learn more, please refer to the [Istio documentation for Rancher](https://rancher.com/docs/rancher/v2.6/en/istio/). diff --git a/docs/testing_fleet_in_rancher.md b/docs/testing_fleet_in_rancher.md new file mode 100644 index 0000000000..4361282313 --- /dev/null +++ b/docs/testing_fleet_in_rancher.md @@ -0,0 +1,132 @@ +## Fleet in Rancher + +All steps in this guide assume your current working directory is the root of the repository. +Moreover, this guide was written for Unix-like developer environments, so you may need to modify some steps if you are using a non-Unix-like developer environment (i.e. Windows). + +### Step 1: Image Preparation + +We need to use a registry to store `fleet-agent` developer builds. +Using a personal [DockerHub](https://hub.docker.com/) repository is usually a suitable choice. +The full repository name must be `/fleet-agent`. + +Now, we need export an environment variable with your repository name as the value. +This will be used when building, pushing, and deploying your agent. + +> Note: the value for this variable should not include `/fleet-agent`. +> For example, if your full DockerHub repository name is `foobar/fleet-agent`, the value used below should be `foobar`. + +Export the new `AGENT_REPO` variable and use the aforementioned value. + +``` +export AGENT_REPO= +``` + +### Step 2: Local Cluster Access + +We need a local cluster to work with. +For this guide, we will use [k3d](https://github.com/rancher/k3d). + +```sh +k3d cluster create +``` + +### Step 3: Generate as Needed + +If you have changed Go code, you may need to generate. + +```sh +go generate +``` + +### Step 4: Running the Controller + +First, we need to run Rancher locally. +You can use the [Rancher Wiki](https://github.com/rancher/rancher/wiki/Setting-Up-Rancher-2.0-Development-Environment) for information on how to do so. + +> If you are unsure about which method you would like use for tunneling to localhost, we recommend [ngrok](https://ngrok.com) or [tunnelware](https://github.com/StrongMonkey/tunnelware). + +Now, let's build and push your `fleet-agent` (`linux-amd64` image by default), if applicable. + +```sh +( + dev/build-fleet + docker tag rancher/fleet-agent:dev $AGENT_REPO/fleet-agent:dev + docker push $AGENT_REPO/fleet-agent:dev +) +``` + +In the Rancher Dashboard, navigate to the `fleet-controller` ConfigMap. +This is likely located in a `cattle-fleet-*` or `fleet-*` namespace. +Replace the existing agent-related fields with the following information: + +- your agent image and tag +- the image pull policy to `Always` (for iterative development) + +Once the ConfigMap has been updated, edit the `fleet-controller` Deployment and scale down its `replicas` to `0`. +With that change, we can now run the controller locally. + +```sh +( + go fmt ./... + go run cmd/fleetcontroller/main.go +) +``` + +**Optional:** you can test Rancher's `FleetWorkspaces` feature by moving Fleet clusters to another workspace in the "Continuous Delivery" section of the Rancher UI. +You can create your own workspace using the API or the UI. +Ensure that clusters are in an "Active" state after migration. + +### Step 5: Create GitRepo CR(s) + +The controller should be running in your terminal window/pane! +You can now create [GitRepo](https://fleet.rancher.io/gitrepo-structure/) custom resource objects and test Fleet locally. + +--- + +## Fleet in Rancher - Using a Custom Fork + +If you need to test Fleet *during Rancher startup*, you may want to use a custom fork. +The following steps can help you do so: + +1. Fork [rancher/fleet](https://github.com/rancher/fleet) and commit your changes to a branch of your choice +2. Change image names and tags for the Helm chart(s) for your custom development image(s) accordingly +3. Publish images corresponding to the names and tags changed in the Helm chart(s) +4. Tag your **_fork_** with a [SemVer-compliant](https://semver.org/) tag that's "greater" than the Fleet chart tag in your chosen version of Rancher _(note: the exact tag name is not that important, but we want it to be "grater" just in case there's a collision for the "latest" version)_ +5. Fork [rancher/charts](https://github.com/rancher/charts) and update branch `dev-v2.x` with your changes to the `fleet`, `fleet-crd`, and `fleet-agent` packages +6. You'll need to change the chart URL to your charts' `tgz` location (this may need to be self-hosted) +7. Finally, commits those changes, execute `make charts` and commit those changes in a second commit +8. Fork [rancher/rancher](https://github.com/rancher/rancher) and change the charts URL to point to your fork +9. Start Rancher locally (instructions: [Rancher Wiki](https://github.com/rancher/rancher/wiki/Setting-Up-Rancher-2.0-Development-Environment)) and your fork's chart should be deployed + +## Advanced: Standalone Fleet (Obsolete How-to) + +Continuous Integration executes most [E2E tests](/e2e/) against Fleet Standalone. For developing purposes we recommend using our [dev scripts](#local-development-workflow-fleet-standalone---for-running-e2e-tests) instead of this how-to. We keep this part only for documental reasons. + +Build and push your `fleet-agent` (`linux-amd64` image by default), install your Fleet charts, and then replace the controller deployment with your local controller build. + +```sh +( + go fmt ./... + REPO=$AGENT_REPO make agent-dev + docker push $AGENT_REPO/fleet-agent:dev + for i in cattle-fleet-system fleet-default fleet-local; do kubectl create namespace $i; done + helm install -n cattle-fleet-system fleet-crd ./charts/fleet-crd + helm install -n cattle-fleet-system fleet --set agentImage.repository=$AGENT_REPO/fleet-agent --set agentImage.imagePullPolicy=Always ./charts/fleet + kubectl delete deployment -n cattle-fleet-system fleet-controller + go run cmd/fleetcontroller/main.go +) +``` + +Alternatively, if the agent's code has been unchanged, you can use the latest agent instead. +We'll use the latest Git tag for this, and _assume_ it is available on DockerHub. + +```sh +( + go fmt ./... + for i in cattle-fleet-system fleet-default fleet-local; do kubectl create namespace $i; done + helm install -n cattle-fleet-system fleet-crd ./charts/fleet-crd + helm install -n cattle-fleet-system fleet --set agentImage.tag=$(git tag --sort=taggerdate | tail -1) ./charts/fleet + kubectl delete deployment -n cattle-fleet-system fleet-controller + go run cmd/fleetcontroller/main.go +) +``` From a1c22b1061391e0e9458d6a14a35338b973e3276 Mon Sep 17 00:00:00 2001 From: Tommy Girardi Date: Wed, 3 Jul 2024 10:20:51 +0200 Subject: [PATCH 6/8] enabling nodeSelector dor gitjob's shards (#2579) --- charts/fleet/templates/deployment_gitjob.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/fleet/templates/deployment_gitjob.yaml b/charts/fleet/templates/deployment_gitjob.yaml index 0f9a1bf909..6bccb3f0e0 100644 --- a/charts/fleet/templates/deployment_gitjob.yaml +++ b/charts/fleet/templates/deployment_gitjob.yaml @@ -87,6 +87,11 @@ spec: nodeSelector: {{ include "linux-node-selector" $shard.id | nindent 8 }} {{- if $.Values.nodeSelector }} {{ toYaml $.Values.nodeSelector | indent 8 }} +{{- end }} +{{- if $shard.nodeSelector -}} +{{- range $key, $value := $shard.nodeSelector }} +{{ $key | indent 8}}: {{ $value }} +{{- end }} {{- end }} tolerations: {{ include "linux-node-tolerations" $shard.id | nindent 8 }} {{- if $.Values.tolerations }} From 8233ca94f66155c7da6a9fdb027e0640d45ba470 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Tue, 2 Jul 2024 12:50:53 +0200 Subject: [PATCH 7/8] Bump go-git to latest --- go.mod | 6 +++--- go.sum | 16 ++++++++-------- integrationtests/gitcloner/clone_test.go | 2 +- integrationtests/gitjob/git/git_test.go | 6 ++++-- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 7678574a8d..dc698b701e 100644 --- a/go.mod +++ b/go.mod @@ -17,8 +17,8 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/docker/docker v26.1.4+incompatible github.com/evanphx/json-patch v5.9.0+incompatible - github.com/go-git/go-billy/v5 v5.5.0 - github.com/go-git/go-git/v5 v5.12.0 + github.com/go-git/go-billy/v5 v5.5.1-0.20240701174852-839dcd3ad096 + github.com/go-git/go-git/v5 v5.12.1-0.20240629213349-b00c68ab7140 github.com/go-logr/logr v1.4.2 github.com/go-playground/webhooks/v6 v6.3.0 github.com/gobwas/glob v0.2.3 @@ -101,7 +101,7 @@ require ( github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/cyphar/filepath-securejoin v0.2.5 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/docker/cli v25.0.1+incompatible // indirect github.com/docker/distribution v2.8.3+incompatible // indirect diff --git a/go.sum b/go.sum index ecd02708a4..81456ab369 100644 --- a/go.sum +++ b/go.sum @@ -290,8 +290,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lV github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= +github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -317,8 +317,8 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 h1:ZClxb8laGDf5arXfYcAtECDFgAgHklGI8CxgjHnXKJ4= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= -github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb h1:2SoxRauy2IqekRMggrQk3yNI5X6omSnk6ugVbFywwXs= +github.com/elazarl/goproxy v0.0.0-20240618083138-03be62527ccb/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= @@ -359,12 +359,12 @@ github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxI github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-billy/v5 v5.5.1-0.20240701174852-839dcd3ad096 h1:2WsH0tWd8Swy52EeffY/42nkm7jKDGyqErCbO54Yp08= +github.com/go-git/go-billy/v5 v5.5.1-0.20240701174852-839dcd3ad096/go.mod h1:028g84TK/7xLYqjR/Ypl7ynJtp2bl7cmAH0ceNheF9Y= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= -github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= -github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= +github.com/go-git/go-git/v5 v5.12.1-0.20240629213349-b00c68ab7140 h1:hG3GDmuUc+xR0wrabHYQ3xSefdfACVOpkuCn9P25lx0= +github.com/go-git/go-git/v5 v5.12.1-0.20240629213349-b00c68ab7140/go.mod h1:hp36mMcS+/NwPczbhaD6RDHgas6kbmuQVqFwtHTYu7Y= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= diff --git a/integrationtests/gitcloner/clone_test.go b/integrationtests/gitcloner/clone_test.go index 09f472457d..048220b742 100644 --- a/integrationtests/gitcloner/clone_test.go +++ b/integrationtests/gitcloner/clone_test.go @@ -146,7 +146,7 @@ var _ = Describe("Applying a git job gets content from git repo", Label("network }) It("Fails to clone the repo", func() { - Expect(cloneErr.Error()).To(Equal("authentication required")) + Expect(cloneErr.Error()).To(ContainSubstring("authentication required")) }) }) diff --git a/integrationtests/gitjob/git/git_test.go b/integrationtests/gitjob/git/git_test.go index 1f34583dde..a633fdbf64 100644 --- a/integrationtests/gitjob/git/git_test.go +++ b/integrationtests/gitjob/git/git_test.go @@ -117,8 +117,10 @@ func TestLatestCommit_NoAuth(t *testing.T) { client := mocks.NewMockClient(ctlr) client.EXPECT().Get(ctx, gomock.Any(), gomock.Any()).Return(kerrors.NewNotFound(schema.GroupResource{}, "notfound")) latestCommit, err := f.LatestCommit(ctx, test.gitrepo, client) - if err != test.expectedErr { - t.Errorf("expected error is: %v, but got %v", test.expectedErr, err) + if test.expectedErr == nil { + require.NoError(t, err) + } else { + require.Contains(t, err.Error(), test.expectedErr.Error()) } if latestCommit != test.expectedCommit { t.Errorf("latestCommit doesn't match. got %s, expected %s", latestCommit, test.expectedCommit) From 2c50b53abd20a6991ecb9e65a666523de1c0d801 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Tue, 2 Jul 2024 18:40:43 +0200 Subject: [PATCH 8/8] Split e2e tests into default,sharding,infra jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Corentin NĂ©au --- .github/workflows/e2e-ci.yml | 61 +++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/.github/workflows/e2e-ci.yml b/.github/workflows/e2e-ci.yml index 06e3ecda50..f308446de8 100644 --- a/.github/workflows/e2e-ci.yml +++ b/.github/workflows/e2e-ci.yml @@ -29,6 +29,11 @@ jobs: # https://hub.docker.com/r/rancher/k3s/tags - v1.29.0-k3s1 - v1.24.17-k3s1 + test_type: + - name: default + - name: sharding + shards: '[{"id":"shard0"},{"id":"shard1"},{"id":"shard2"}]' + - name: infra-setup steps: - uses: actions/checkout@v4 @@ -43,17 +48,17 @@ jobs: name: Install Ginkgo CLI run: go install github.com/onsi/ginkgo/v2/ginkgo - - name: Build Fleet Binaries + name: Build Fleet run: | ./.github/scripts/build-fleet-binaries.sh - - cd e2e/testenv/infra - go build + ./.github/scripts/build-fleet-images.sh - - name: Build Docker Images + name: Build Infra Tool + if: ${{ matrix.test_type.name == 'infra-setup' }} run: | - ./.github/scripts/build-fleet-images.sh - + pushd e2e/testenv/infra + go build + popd cd e2e/assets/gitrepo # Buildkit needed here for proper here-document support DOCKER_BUILDKIT=1 docker build -f Dockerfile.gitserver -t nginx-git:test --build-arg="passwd=$(openssl passwd foo)" . @@ -81,17 +86,36 @@ jobs: limit-access-to-actor: true - name: Deploy Fleet + env: + SHARDS: ${{ matrix.test_type.shards }} + run: | + ./.github/scripts/deploy-fleet.sh + - + name: E2E Tests + if: ${{ matrix.test_type.name == 'default' }} + env: + FLEET_E2E_NS: fleet-local run: | - SHARDS='[{"id":"shard0"},{"id":"shard1"},{"id":"shard2"}]' ./.github/scripts/deploy-fleet.sh + ginkgo --github-output --label-filter='!infra-setup && !sharding' e2e/single-cluster e2e/keep-resources e2e/drift + - + name: E2E Sharding/Metrics Tests + if: ${{ matrix.test_type.name == 'sharding' }} + env: + FLEET_E2E_NS: fleet-local + run: | + ginkgo --github-output --label-filter='sharding' e2e/single-cluster + ginkgo --github-output e2e/metrics + SHARD=shard1 ginkgo --github-output e2e/metrics - name: Create Zot certificates for OCI tests + if: ${{ matrix.test_type.name == 'infra-setup' }} env: FLEET_E2E_NS: fleet-local run: | - # Generate cert and key for TLS ./.github/scripts/create-zot-certs.sh "FleetCI-RootCA" - - name: E2E Tests + name: E2E Infra Tests + if: ${{ matrix.test_type.name == 'infra-setup' }} env: FLEET_E2E_NS: fleet-local # Git and OCI credentials are here used in a local, ephemeral environment. Leaks would be harmless. @@ -103,33 +127,25 @@ jobs: run: | export CI_OCI_CERTS_DIR="$(git rev-parse --show-toplevel)/FleetCI-RootCA" - # 1. Run test cases not needing infra - ginkgo --github-output --label-filter='!infra-setup' e2e/single-cluster e2e/keep-resources e2e/drift - - # 2. Run tests for metrics - ginkgo --github-output e2e/metrics - SHARD=shard1 ginkgo --github-output e2e/metrics - - # 3. Run tests requiring only the git server + # Run tests requiring only the git server e2e/testenv/infra/infra setup --git-server=true ginkgo --github-output --label-filter='infra-setup && !helm-registry && !oci-registry' e2e/single-cluster/ - # 4. Run tests requiring a Helm registry + # Run tests requiring a Helm registry e2e/testenv/infra/infra setup --helm-registry=true ginkgo --github-output --label-filter='helm-registry' e2e/single-cluster e2e/testenv/infra/infra teardown --helm-registry=true - # 5. Run tests requiring an OCI registry + # Run tests requiring an OCI registry e2e/testenv/infra/infra setup --oci-registry=true ginkgo --github-output --label-filter='oci-registry' e2e/single-cluster - # 6. Tear down all infra e2e/testenv/infra/infra teardown - - name: Acceptance Tests for Examples if: > + matrix.test_type.name == 'default' && github.event_name == 'schedule' env: FLEET_E2E_NS: fleet-local @@ -139,6 +155,7 @@ jobs: name: Fleet Tests Requiring Github Secrets # These tests can't run for PRs, because PRs don't have access to the secrets if: > + matrix.test_type.name == 'default' && github.event_name != 'pull_request' && github.repository == 'rancher/fleet'