diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index feb32c5ed..1ccc68f80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,34 +57,6 @@ jobs: ## Comma-separated list of files to upload files: ./it-coverage.xml;./ut-coverage.xml - e2e-tests-v1alpha1: - runs-on: ubuntu-latest - needs: [ - detect-noop, - ] - if: needs.detect-noop.outputs.noop != 'true' - steps: - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Check out code into the Go module directory - uses: actions/checkout@v5 - - - name: Install Kind - # Before updating the kind version to use, verify that the current kind image - # is still supported by the version. - run: | - go install sigs.k8s.io/kind@v0.20.0 - - - name: Run e2e tests - run: | - OUTPUT_TYPE=type=docker make docker-build-member-agent docker-build-hub-agent docker-build-refresh-token e2e-tests-v1alpha1 - env: - KUBECONFIG: '/home/runner/.kube/config' - HUB_SERVER_URL: 'https://172.19.0.2:6443' - e2e-tests: strategy: fail-fast: false @@ -130,13 +102,13 @@ jobs: - name: Install Ginkgo CLI run: | - go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.1 + go install github.com/onsi/ginkgo/v2/ginkgo@v2.23.4 - name: Install Kind # Before updating the kind version to use, verify that the current kind image # is still supported by the version. run: | - go install sigs.k8s.io/kind@v0.22.0 + go install sigs.k8s.io/kind@v0.30.0 - name: Run e2e tests run: | diff --git a/Makefile b/Makefile index 8ed3b47e4..6a63f404d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ REGISTRY ?= ghcr.io -KIND_IMAGE ?= kindest/node:v1.31.0 +KIND_IMAGE ?= kindest/node:v1.33.4 ifndef TAG TAG ?= $(shell git rev-parse --short=7 HEAD) endif diff --git a/charts/hub-agent/values.yaml b/charts/hub-agent/values.yaml index a873dd6c3..05dc33d6b 100644 --- a/charts/hub-agent/values.yaml +++ b/charts/hub-agent/values.yaml @@ -11,6 +11,7 @@ image: tag: main logVerbosity: 5 +logFileMaxSize: "100000000" enableWebhook: true webhookServiceName: fleetwebhook @@ -49,5 +50,4 @@ hubAPIQPS: 250 hubAPIBurst: 1000 MaxConcurrentClusterPlacement: 100 ConcurrentResourceChangeSyncs: 20 -logFileMaxSize: "10000000" MaxFleetSizeSupported: 100 diff --git a/charts/member-agent/templates/deployment.yaml b/charts/member-agent/templates/deployment.yaml index 6b302b801..6172debb3 100644 --- a/charts/member-agent/templates/deployment.yaml +++ b/charts/member-agent/templates/deployment.yaml @@ -117,6 +117,7 @@ spec: - --{{ $key }}={{ $value }} {{- end }} - --v={{ .Values.logVerbosity }} + - --log_file_max_size={{ .Values.logFileMaxSize }} ports: - name: http containerPort: 4000 diff --git a/charts/member-agent/values.yaml b/charts/member-agent/values.yaml index 0bb28cc5d..d31437ff3 100644 --- a/charts/member-agent/values.yaml +++ b/charts/member-agent/values.yaml @@ -6,6 +6,7 @@ image: tag: main logVerbosity: 5 +logFileMaxSize: "100000000" refreshtoken: repository: ghcr.io/azure/fleet/refresh-token diff --git a/pkg/controllers/workapplier/process.go b/pkg/controllers/workapplier/process.go index 1df00762a..73bfe82c1 100644 --- a/pkg/controllers/workapplier/process.go +++ b/pkg/controllers/workapplier/process.go @@ -229,7 +229,7 @@ func (r *Reconciler) takeOverInMemberClusterObjectIfApplicable( ) (shouldSkipProcessing bool) { if !shouldInitiateTakeOverAttempt(bundle.inMemberClusterObj, work.Spec.ApplyStrategy, expectedAppliedWorkOwnerRef) { // Takeover is not necessary; proceed with the processing. - klog.V(2).InfoS("Takeover is not needed; skip the step") + klog.V(2).InfoS("Takeover is not needed; skip the step", "work", klog.KObj(work), "GVR", *bundle.gvr, "manifestObj", bundle.workResourceIdentifierStr) return false } diff --git a/pkg/propertyprovider/azure/provider_integration_test.go b/pkg/propertyprovider/azure/provider_integration_test.go index 03e2e87b1..a1876c611 100644 --- a/pkg/propertyprovider/azure/provider_integration_test.go +++ b/pkg/propertyprovider/azure/provider_integration_test.go @@ -305,11 +305,8 @@ var ( ) var ( - // The nodes below use actual capacities of their respective AKS SKUs; for more information, - // see: - // https://learn.microsoft.com/en-us/azure/virtual-machines/av2-series (for A-series nodes), - // https://learn.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable (for B-series nodes), and - // https://learn.microsoft.com/en-us/azure/virtual-machines/dv2-dsv2-series (for D/DS v2 series nodes). + // The nodes below use actual capacities of their respective AKS SKUs; We need to change them periodically as + // they will be deprecated over time. nodes = []corev1.Node{ { ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/propertyprovider/azure/suite_test.go b/pkg/propertyprovider/azure/suite_test.go index cc756b14e..61d27a4de 100644 --- a/pkg/propertyprovider/azure/suite_test.go +++ b/pkg/propertyprovider/azure/suite_test.go @@ -43,10 +43,10 @@ const ( const ( region = "eastus" - - aksNodeSKU1 = "Standard_B4ms" - aksNodeSKU2 = "Standard_A4_v2" - aksNodeSKU3 = "Standard_F4s" + // we need to regularly update the SKUs used in tests as some of them get deprecated over time. + aksNodeSKU1 = "Standard_D8s_v5" + aksNodeSKU2 = "Standard_E16_v5" + aksNodeSKU3 = "Standard_M16ms" // Note (chenyu1): cross-reference between the Azure VM SKU list and the Azure Retail Prices API // for a list of currently known SKUs to be missing from the Azure Retail Prices API. aksNodeKnownMissingSKU1 = "Standard_DS2_v2" diff --git a/pkg/propertyprovider/azure/trackers/nodes.go b/pkg/propertyprovider/azure/trackers/nodes.go index 53b11ba8e..4cc888a56 100644 --- a/pkg/propertyprovider/azure/trackers/nodes.go +++ b/pkg/propertyprovider/azure/trackers/nodes.go @@ -326,7 +326,7 @@ func (nt *NodeTracker) trackSKU(node *corev1.Node) bool { return true default: // No further action is needed if the node's SKU remains the same. - klog.V(2).InfoS("The node's SKU has not changed", "sku", sku, "node", klog.KObj(node)) + klog.V(3).InfoS("The node's SKU has not changed", "sku", sku, "node", klog.KObj(node)) return false } } diff --git a/test/e2e/actuals_test.go b/test/e2e/actuals_test.go index 21389d2a6..dd31d0213 100644 --- a/test/e2e/actuals_test.go +++ b/test/e2e/actuals_test.go @@ -1506,7 +1506,7 @@ func crpStatusWithExternalStrategyActual( } if diff := cmp.Diff(crp.Status, wantStatus, placementStatusCmpOptions...); diff != "" { - return fmt.Errorf("CRP status diff (-got, +want): %s", diff) + return fmt.Errorf("CRP status diff (-got, +want): %s for CRP %s", diff, crpName) } return nil } @@ -1529,11 +1529,11 @@ func customizedPlacementStatusUpdatedActual( if wantObservedResourceIndex == "0" { // When the observedResourceIndex is "0", it means the placement is just created and the placement controller if diff := cmp.Diff(placement.GetPlacementStatus(), wantStatus, placementStatusCmpOptionsOnCreate...); diff != "" { - return fmt.Errorf("Placement status diff (-got, +want): %s", diff) + return fmt.Errorf("Placement status diff (-got, +want): %s for placement %v", diff, placementKey) } } else { if diff := cmp.Diff(placement.GetPlacementStatus(), wantStatus, placementStatusCmpOptions...); diff != "" { - return fmt.Errorf("Placement status diff (-got, +want): %s", diff) + return fmt.Errorf("Placement status diff (-got, +want): %s for placement %v", diff, placementKey) } } return nil diff --git a/test/e2e/resource_placement_rollout_test.go b/test/e2e/resource_placement_rollout_test.go index 6548a2a15..1d77a013b 100644 --- a/test/e2e/resource_placement_rollout_test.go +++ b/test/e2e/resource_placement_rollout_test.go @@ -58,7 +58,7 @@ var ( testCustomResource testv1alpha1.TestResource ) -var _ = Describe("placing namespaced scoped resources using a RP with rollout", Label("resourceplacement"), func() { +var _ = FDescribe("placing namespaced scoped resources using a RP with rollout", Label("resourceplacement"), func() { crpName := fmt.Sprintf(crpNameTemplate, GinkgoParallelProcess()) rpName := fmt.Sprintf(rpNameTemplate, GinkgoParallelProcess()) rpKey := types.NamespacedName{Name: rpName, Namespace: appNamespace().Name} diff --git a/test/e2e/setup.sh b/test/e2e/setup.sh index 4ede036c0..66279bb27 100755 --- a/test/e2e/setup.sh +++ b/test/e2e/setup.sh @@ -6,7 +6,7 @@ set -o pipefail # Before updating the default kind image to use, verify that the version is supported # by the current kind release. -KIND_IMAGE="${KIND_IMAGE:-kindest/node:v1.31.0}" +KIND_IMAGE="${KIND_IMAGE:-kindest/node:v1.33.4}" KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}" MEMBER_CLUSTER_COUNT=$1 diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index 72407e4ba..09c8cee42 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -330,7 +330,7 @@ func checkIfAzurePropertyProviderIsWorking() { return fmt.Errorf("member cluster status conditions diff (-got, +want):\n%s", diff) } return nil - }, longEventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to confirm that Azure property provider is up and running") + }, longEventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to confirm that Azure property provider is up and running on cluster", memberCluster.ClusterName) } } @@ -721,8 +721,19 @@ func createWorkResources() { } func createNamespace() { - ns := appNamespace() - Expect(hubClient.Create(ctx, &ns)).To(Succeed(), "Failed to create namespace %s", ns.Name) + var ns corev1.Namespace + Eventually(func() error { + ns = appNamespace() + err := hubClient.Create(ctx, &ns) + if k8serrors.IsAlreadyExists(err) { + err = hubClient.Get(ctx, types.NamespacedName{Name: ns.Name}, &ns) + if err != nil { + return fmt.Errorf("failed to get the namespace %s, err is %+w", ns.Name, err) + } + return fmt.Errorf("namespace %s already exists, delete time is %v", ns.Name, ns.GetDeletionTimestamp()) + } + return err + }, eventuallyDuration, eventuallyInterval).Should(Succeed(), "Failed to create namespace %s", ns.Name) } func createConfigMap() {