rancher / fleet

Deploy workloads from Git to large fleets of Kubernetes clusters
https://fleet.rancher.io/
Apache License 2.0
1.5k stars 227 forks source link

Extend bundle-diff tests #2600

Closed manno closed 2 months ago

manno commented 3 months ago

Needed https://github.com/rancher/fleet-test-data/pull/20

Bundle diff tests were not very effective, as the patches were missing a namespace and were never applied to the deployed resources.

Fixing several issues that came up during testing, as well as refactoring the "diff" code tree after reading it and considering to update it. "Refactor normalizers" could be in a different PR, together with that update. 🤷

Update Notes

git clone https://github.com/argoproj/gitops-engine

vi -d internal/cmd/agent/deployer/internal/diff/diff.go \
  gitops-engine/pkg/diff/diff.go
vi -d internal/cmd/agent/deployer/internal/diff/diff_options.go \
  gitops-engine/pkg/diff/diff_options.go

vi -d internal/cmd/agent/deployer/internal/diff/scheme/scheme.go \
  gitops-engine/pkg/utils/kube/scheme/scheme.go
vi -d internal/cmd/agent/deployer/internal/diff/json/json.go \
  gitops-engine/pkg/utils/json/json.go

git clone https://github.com/argoproj/argo-cd

vi -d internal/cmd/agent/deployer/internal/resource/ignore.go \
  argo-cd/pkg/apis/application/v1alpha1/types.go

vi -d internal/cmd/agent/deployer/internal/normalizers/diff_normalizer.go \
  argo-cd/util/argo/normalizers/diff_normalizer.go

vi -d internal/cmd/agent/deployer/internal/normalizers/glob/glob.go \
  argo-cd/util/glob/glob.go

vi -d internal/cmd/agent/deployer/internal/normalizers/knowntypes_normalizer.go \
  argo-cd/util/argo/normalizers/knowntypes_normalizer.go