-
Notifications
You must be signed in to change notification settings - Fork 130
cloud storage dedup #1800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/test-refactoring
Are you sure you want to change the base?
cloud storage dedup #1800
Changes from 1 commit
95f58d3
96c9c47
aee9362
22ba21e
f5534f2
f65111d
1814352
308a6b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ on: | |
| branches: | ||
| - develop | ||
| - main | ||
| - CSPL-4601-rebased | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remember to remove this before merging |
||
| paths-ignore: | ||
| - 'docs/**' | ||
| - '*.md' | ||
|
|
@@ -70,11 +71,11 @@ jobs: | |
| strategy: | ||
| matrix: | ||
| test_focus: | ||
| - { order: 1, name: "c3_gcp_sanity" } | ||
| - { order: 2, name: "c3_mgr_gcp_sanity" } | ||
| - { order: 3, name: "m4_gcp_sanity" } | ||
| - { order: 4, name: "m4_mgr_gcp_sanity" } | ||
| - { order: 5, name: "s1_gcp_sanity" } | ||
| - { order: 1, name: "masterappframeworkc3" } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same concern here |
||
| - { order: 2, name: "managerappframeworkc3" } | ||
| - { order: 3, name: "masterappframeworkm4" } | ||
| - { order: 4, name: "managerappframeworkm4" } | ||
| - { order: 5, name: "appframeworksS1" } | ||
| runs-on: ubuntu-latest | ||
| needs: build-operator-image | ||
| env: | ||
|
|
@@ -84,7 +85,7 @@ jobs: | |
| ARTIFACT_REGISTRY: ${{ secrets.GCP_ARTIFACT_REGISTRY }} | ||
| GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | ||
| GCP_REGION: ${{ secrets.GCP_REGION }} | ||
| AWS_S3_REGION: ${{ secrets.GCP_REGION }} | ||
| GCP_STORAGE_REGION: ${{ secrets.GCP_REGION }} | ||
| GCP_ZONE: ${{ secrets.GCP_ZONE }} | ||
| GCP_NETWORK: default # Adjust if using a custom network | ||
| GCP_SUBNETWORK: default # Adjust if using a custom subnetwork | ||
|
|
@@ -112,7 +113,7 @@ jobs: | |
| GCP_TEST_CONTAINER: ${{ secrets.GCP_TEST_CONTAINER}} | ||
| GCP_INDEXES_CONTAINER: ${{ secrets.GCP_INDEXES_CONTAINER}} | ||
| ECR_REPOSITORY: ${{ secrets.GCP_ARTIFACT_REGISTRY }} | ||
| GCP_CONTAINER_REGISTRY_LOGIN_SERVER: ${{ secrets.AZURE_ACR_LOGIN_SERVER }} | ||
| GCP_CONTAINER_REGISTRY_LOGIN_SERVER: ${{ secrets.GCP_ARTIFACT_REGISTRY }} | ||
| steps: | ||
| - name: Set Test Cluster Name | ||
| run: | | ||
|
|
@@ -136,46 +137,28 @@ jobs: | |
| uses: google-github-actions/setup-gcloud@v1 | ||
| with: | ||
| project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
| install_components: 'kubectl' | ||
| install_components: 'kubectl,gke-gcloud-auth-plugin' | ||
|
|
||
| - name: Set GCP Project | ||
| run: | | ||
| gcloud config set project ${{ env.GCP_PROJECT_ID }} | ||
| echo "USE_GKE_GCLOUD_AUTH_PLUGIN=True" >> $GITHUB_ENV | ||
|
|
||
| - name: Create GKE Cluster | ||
| run: | | ||
| export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }} | ||
| export GKE_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }} | ||
| make cluster-up | ||
|
|
||
| - name: Get Kubernetes Credentials | ||
| run: | | ||
| gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.GCP_ZONE }} --project ${{ env.GCP_PROJECT_ID }} | ||
|
|
||
| - name: Allow Pulling from Artifact Registry | ||
| run: | | ||
| gcloud auth configure-docker ${{ secrets.GCP_ARTIFACT_REGISTRY }} | ||
|
|
||
| - name: Set up Cloud SDK | ||
| uses: google-github-actions/setup-gcloud@v1 | ||
| with: | ||
| project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
| install_components: 'kubectl' | ||
|
|
||
| - name: Change Splunk Enterprise Image on Main Branches | ||
| if: github.ref == 'refs/heads/main' | ||
| run: | | ||
| echo "SPLUNK_ENTERPRISE_IMAGE=${{ steps.dotenv.outputs.SPLUNK_ENTERPRISE_RELEASE_IMAGE }}" >> $GITHUB_ENV | ||
|
|
||
| - name: Authenticate to GCP | ||
| uses: google-github-actions/auth@v1 | ||
| with: | ||
| credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }} | ||
|
|
||
| - name: Set GCP Project | ||
| run: | | ||
| gcloud config set project ${{ env.GCP_PROJECT_ID }} | ||
|
|
||
| - name: Install Kubectl | ||
| uses: azure/setup-kubectl@v3 | ||
| with: | ||
|
|
@@ -224,16 +207,6 @@ jobs: | |
| docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} | ||
| docker push ${{ secrets.GCP_ARTIFACT_REGISTRY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} | ||
|
|
||
| - name: Get Kubernetes Credentials | ||
| run: | | ||
| gcloud container clusters get-credentials ${{ env.CLUSTER_NAME }} --zone ${{ env.GCP_ZONE }} --project ${{ env.GCP_PROJECT_ID }} | ||
|
|
||
| - name: Get GKE Credentials | ||
| uses: google-github-actions/get-gke-credentials@v1 | ||
| with: | ||
| cluster_name: ${{ env.CLUSTER_NAME }} | ||
| location: ${{ env.GCP_ZONE }} | ||
|
|
||
| - name: Install Metrics Server | ||
| run: | | ||
| curl -LO https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml | ||
|
|
@@ -245,7 +218,7 @@ jobs: | |
|
|
||
| - name: Setup Kustomize | ||
| run: | | ||
| curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash | ||
| curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 5.4.3 | ||
| sudo mv kustomize /usr/local/bin/ | ||
|
|
||
| - name: Verify kubectl Configuration | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,8 +55,10 @@ var _ = Describe("m4appfw test", func() { | |
| BeforeEach(func() { | ||
| var err error | ||
| name := fmt.Sprintf("%s-%s", "master"+testenvInstance.GetName(), testenv.RandomDNSName(3)) | ||
| fmt.Printf("[DEBUG] M4 BeforeEach starting, name=%s\n", name) | ||
|
||
| testcaseEnvInst, err = testenv.NewDefaultTestCaseEnv(testenvInstance.GetKubeClient(), name) | ||
| Expect(err).To(Succeed(), "Unable to create testcaseenv") | ||
| fmt.Printf("[DEBUG] M4 BeforeEach testcaseenv created, namespace=%s\n", testcaseEnvInst.GetName()) | ||
| deployment, err = testcaseEnvInst.NewDeployment(testenv.RandomDNSName(3)) | ||
| Expect(err).To(Succeed(), "Unable to create deployment") | ||
|
|
||
|
|
@@ -68,6 +70,7 @@ var _ = Describe("m4appfw test", func() { | |
| s3TestDirShc = "m4appfw-shc-" + testenv.RandomDNSName(4) | ||
| appSourceVolumeNameIdxc = "appframework-test-volume-idxc-" + testenv.RandomDNSName(3) | ||
| appSourceVolumeNameShc = "appframework-test-volume-shc-" + testenv.RandomDNSName(3) | ||
| fmt.Printf("[DEBUG] M4 BeforeEach complete, deployment=%s\n", deployment.GetName()) | ||
| }) | ||
|
|
||
| AfterEach(func() { | ||
|
|
@@ -1106,11 +1109,13 @@ var _ = Describe("m4appfw test", func() { | |
| testcaseEnvInst.Log.Info("Get config map for triggering manual update") | ||
| config, err := testenv.GetAppframeworkManualUpdateConfigMap(ctx, deployment, testcaseEnvInst.GetName()) | ||
| Expect(err).To(Succeed(), "Unable to get config map for manual poll") | ||
| testcaseEnvInst.Log.Info("[DEBUG] ConfigMap state before CM manual poll trigger", "ClusterMaster", config.Data["ClusterMaster"], "SearchHeadCluster", config.Data["SearchHeadCluster"], "MonitoringConsole", config.Data["MonitoringConsole"]) | ||
|
|
||
| testcaseEnvInst.Log.Info("Modify config map to trigger manual update") | ||
| testcaseEnvInst.Log.Info("Modify config map to trigger manual update for ClusterMaster") | ||
| config.Data["ClusterMaster"] = strings.Replace(config.Data["ClusterMaster"], "off", "on", 1) | ||
| err = deployment.UpdateCR(ctx, config) | ||
| Expect(err).To(Succeed(), "Unable to update config map") | ||
| testcaseEnvInst.Log.Info("[DEBUG] ConfigMap updated for CM manual poll", "ClusterMaster", config.Data["ClusterMaster"]) | ||
|
|
||
| // Ensure that the Cluster Master goes to Ready phase | ||
| testcaseEnvInst.VerifyClusterMasterReady(ctx, deployment) | ||
|
|
@@ -1121,29 +1126,33 @@ var _ = Describe("m4appfw test", func() { | |
| // Ensure Indexer cluster configured as multisite | ||
| testcaseEnvInst.VerifyIndexerClusterMultisiteStatus(ctx, deployment, siteCount) | ||
|
|
||
| testcaseEnvInst.Log.Info("Get config map for triggering manual update") | ||
| testcaseEnvInst.Log.Info("Get config map for triggering manual update for SHC") | ||
| config, err = testenv.GetAppframeworkManualUpdateConfigMap(ctx, deployment, testcaseEnvInst.GetName()) | ||
| Expect(err).To(Succeed(), "Unable to get config map for manual poll") | ||
| testcaseEnvInst.Log.Info("[DEBUG] ConfigMap state before SHC manual poll trigger", "ClusterMaster", config.Data["ClusterMaster"], "SearchHeadCluster", config.Data["SearchHeadCluster"], "MonitoringConsole", config.Data["MonitoringConsole"]) | ||
|
|
||
| testcaseEnvInst.Log.Info("Modify config map to trigger manual update") | ||
| testcaseEnvInst.Log.Info("Modify config map to trigger manual update for SearchHeadCluster") | ||
| config.Data["SearchHeadCluster"] = strings.Replace(config.Data["SearchHeadCluster"], "off", "on", 1) | ||
| err = deployment.UpdateCR(ctx, config) | ||
| Expect(err).To(Succeed(), "Unable to update config map") | ||
| testcaseEnvInst.Log.Info("[DEBUG] ConfigMap updated for SHC manual poll", "SearchHeadCluster", config.Data["SearchHeadCluster"]) | ||
|
|
||
| // Ensure Search Head Cluster go to Ready phase | ||
| testcaseEnvInst.VerifySearchHeadClusterReady(ctx, deployment) | ||
|
|
||
| // Verify RF SF is met | ||
| testcaseEnvInst.VerifyRFSFMet(ctx, deployment) | ||
|
|
||
| testcaseEnvInst.Log.Info("Get config map for triggering manual update") | ||
| testcaseEnvInst.Log.Info("Get config map for triggering manual update for MC") | ||
| config, err = testenv.GetAppframeworkManualUpdateConfigMap(ctx, deployment, testcaseEnvInst.GetName()) | ||
| Expect(err).To(Succeed(), "Unable to get config map for manual poll") | ||
| testcaseEnvInst.Log.Info("[DEBUG] ConfigMap state before MC manual poll trigger", "ClusterMaster", config.Data["ClusterMaster"], "SearchHeadCluster", config.Data["SearchHeadCluster"], "MonitoringConsole", config.Data["MonitoringConsole"]) | ||
|
|
||
| testcaseEnvInst.Log.Info("Modify config map to trigger manual update") | ||
| testcaseEnvInst.Log.Info("Modify config map to trigger manual update for MonitoringConsole") | ||
| config.Data["MonitoringConsole"] = strings.Replace(config.Data["MonitoringConsole"], "off", "on", 1) | ||
| err = deployment.UpdateCR(ctx, config) | ||
| Expect(err).To(Succeed(), "Unable to update config map") | ||
| testcaseEnvInst.Log.Info("[DEBUG] ConfigMap updated for MC manual poll", "MonitoringConsole", config.Data["MonitoringConsole"]) | ||
|
|
||
| // Wait for Monitoring Console to reach Ready phase | ||
| err = testcaseEnvInst.WaitForMonitoringConsolePhase(ctx, deployment, testcaseEnvInst.GetName(), mc.Name, enterpriseApi.PhaseReady, 2*time.Minute) | ||
|
|
@@ -1164,6 +1173,11 @@ var _ = Describe("m4appfw test", func() { | |
| Expect(strings.Contains(config.Data["ClusterMaster"], "status: off") && strings.Contains(config.Data["SearchHeadCluster"], "status: off") && strings.Contains(config.Data["MonitoringConsole"], "status: off")).To(Equal(true), "Config map update not complete") | ||
|
|
||
| // ############ VERIFY APPS UPDATED TO V2 ############# | ||
| testcaseEnvInst.Log.Info("[DEBUG] Starting V2 verification", "ClusterMasterBundleHash", ClusterMasterBundleHash, "IdxcPods", idxcPodNames, "ShcPods", shcPodNames) | ||
| configDbg, _ := testenv.GetAppframeworkManualUpdateConfigMap(ctx, deployment, testcaseEnvInst.GetName()) | ||
| if configDbg != nil { | ||
| testcaseEnvInst.Log.Info("[DEBUG] Final ConfigMap state before V2 verification", "ClusterMaster", configDbg.Data["ClusterMaster"], "SearchHeadCluster", configDbg.Data["SearchHeadCluster"], "MonitoringConsole", configDbg.Data["MonitoringConsole"]) | ||
| } | ||
| appVersion = "V2" | ||
| cmAppSourceInfo.CrAppVersion = appVersion | ||
| cmAppSourceInfo.CrAppList = appListV2 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to agree whether we want to run master tests. I had the same concern on license manager/master tests and as of now, they are not run for master.