Table of Contents
Table of Contents
Further Reading
What Does GitOps Mean?
GitOps is an operational model that uses Git repositories to manage and automate infrastructure, applications, and configuration. Every change is stored as code in Git, from Kubernetes deployments to test settings.
Teams do not apply updates by hand or with one-off scripts. Instead, they submit pull requests. Once a change is approved and merged, automated controllers sync the running environment with the repository.
This creates a clear, auditable record of every change. Teams can roll back or reproduce any environment with confidence.
How GitOps Works
- Declare the desired state: store manifests, Helm charts, and config in Git.
- Propose a change: open a pull request with the update.
- Review and merge: teammates review the change and merge it.
- Reconcile: a controller like Argo CD or Flux detects the change and applies it to the cluster.
- Correct drift: the controller keeps checking and reverts manual changes that do not match Git.
GitOps vs. Traditional CI/CD
Why GitOps Matters in Testing
GitOps is especially valuable for testing in cloud-native systems because it:
- Keeps environments consistent: tests run against the same definitions and configuration in every cluster.
- Enables traceability: test runs link to specific commits and code changes.
- Promotes automation: manual setup steps disappear from the testing process.
- Brings teams together: QA, Dev, and Ops share one workflow, closer to the development lifecycle.
Without GitOps, test environments drift from production and test definitions go stale. Reproducible, auditable results become hard to maintain.
Common Challenges with GitOps
- Configuration drift: manual updates pull environments out of sync with the declared state.
- Complex pipelines: large teams struggle to combine many tools and approval steps.
- Visibility gaps: it can be hard to see which commit triggered which deployment or test.
- Access control: permissions for repositories and deployment tools need careful management.
- Tool fragmentation: GitOps controllers, CI/CD systems, and other automation must work together.
A B2B SaaS Example
Picture a logistics SaaS company that manages 30 microservices with Argo CD. Deployments were smooth, but tests still ran from a separate CI system on a different schedule. A config change could reach staging hours before any test touched it.
The team stores Test Workflows in the same Git repository as the manifests. Argo CD syncs both together, and a test trigger runs smoke tests the moment each Deployment changes.
Our Perspective: If It Is Not in Git, It Is Not Tested
Many teams apply GitOps to apps and infrastructure but leave tests in a CI tool's UI. That splits the source of truth in two.
When tests live in Git with everything else, every environment carries its own proof of correctness. Rolling back a release then rolls back its tests too.
How Testkube Handles GitOps
Testkube brings GitOps principles into Kubernetes-native testing:
- Tests as code: Test Workflows are Kubernetes custom resources, so they can be stored and versioned in Git.
- GitOps sync: Argo CD or Flux can deploy Test Workflows alongside your application manifests.
- Triggered by change: test triggers run tests when synced resources change, and CI can trigger runs on commits or merges.
- Audit trails: each run records the workflow, environment, and inputs used.
- Tool integrations: works with GitHub, GitLab, Argo CD, Flux, and other Git-based tools.
- Environment parity: test environments follow the same declarative code as production.
Real-World Examples
- Platform teams: a Kubernetes platform team manages Helm charts and manifests across clusters. When config changes in Git, Argo CD deploys it everywhere.
- Infrastructure as code: a DevOps engineer manages Terraform through pull requests, so every infrastructure-as-code change is reviewed and tracked.
- QA automation: a QA team ties testing to GitOps. Every new service version deployed through GitOps triggers smoke and regression tests.



