Skip to content

Fix reset scripts#835

Open
Julien-Ben wants to merge 1 commit intomasterfrom
fix/reset-scripts
Open

Fix reset scripts#835
Julien-Ben wants to merge 1 commit intomasterfrom
fix/reset-scripts

Conversation

@Julien-Ben
Copy link
Collaborator

@Julien-Ben Julien-Ben commented Feb 26, 2026

Summary

Test runs can leave behind stale state that breaks subsequent runs in two ways:

  1. Stale Cloud Manager projects — the operator creates per-resource projects (e.g. mongodb-test-mdb-sh) that aren't cleaned up by the existing delete script. Old automation configs persist and cause cert hash mismatches that deadlock the agent.
  2. Istio leftovers — multi-cluster runs label namespaces with istio-injection and create PeerAuthentication resources. When a single-cluster test reuses the same namespace, sidecar injection kicks in unexpectedly.
  3. Istio labeling without mTLS — the prepare-multi-cluster script was applying the Istio injection label even when MULTI_CLUSTER_NO_MESH=true, and defaulting to mesh-enabled when the env var was unset (contrary to the original bash behavior).

This PR fixes all three:

  • delete_om_projects.sh now finds and deletes projects matching <namespace>-* prefix
  • reset/main.go strips the istio-injection label and deletes PeerAuthentication resources during namespace reset
  • prepare-multi-cluster/main.go only applies Istio labels when mTLS is actually requested, and defaults MULTI_CLUSTER_NO_MESH to "true" when unset (matching the old bash behavior)

Proof of Work

Verified against local multi-cluster and single-cluster test runs.

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file?
    • use skip-changelog label if not needed

@Julien-Ben Julien-Ben added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Feb 26, 2026
@github-actions
Copy link

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.7.1 Release Notes

Other Changes

  • Container images: Merged the init-database and init-appdb init container images into a single init-database image. The init-appdb image will no longer be published and does not affect existing deployments.

@Julien-Ben Julien-Ben marked this pull request as ready for review February 26, 2026 16:38
@Julien-Ben Julien-Ben requested a review from a team as a code owner February 26, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants