argo-cd/pkg/diff/internal/fieldmanager/doc.go
Leonardo Luz Almeida 98ccd3d43f
fix: calculate SSA diffs with smd.merge.Updater (#467)
* fix: refactor ssa diff logic

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix: calculate ssa diff with smd.merge.Updater

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* chore: Add golangci config file

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* fix: remove wrong param passed to golanci-ghaction

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* doc: Add doc to the wrapper file

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* doc: Add instructions about how to extract the openapiv2 document from
k8s

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* better wording

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

* better code comments

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>

Signed-off-by: Leonardo Luz Almeida <leonardo_almeida@intuit.com>
2022-10-04 09:23:20 -04:00

25 lines
1.3 KiB
Go

/*
Package fieldmanager is a special package as its main purpose
is to expose the dependencies required by structured-merge-diff
library to calculate diffs when server-side apply option is enabled.
The dependency tree necessary to have a `merge.Updater` instance
isn't trivial to implement and the strategy used is borrowing a copy
from Kubernetes apiserver codebase in order to expose the required
functionality.
Below there is a list of borrowed files and a reference to which
package/file in Kubernetes they were copied from:
- borrowed_fields.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go
- borrowed_managedfields.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go
- borrowed_typeconverter.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/typeconverter.go
- borrowed_versionconverter.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/versionconverter.go
In order to keep maintenance as minimal as possible the borrowed
files are verbatim copy from Kubernetes. The private objects that
need to be exposed are wrapped in the wrapper.go file. Updating
the borrowed files should be trivial in most cases but must be done
manually as we have no control over future refactorings Kubernetes
might do.
*/
package fieldmanager