| 1 |
Source: golang-k8s-sigs-structured-merge-diff |
| 2 |
Maintainer: Debian Go Packaging Team <[email protected]> |
| 3 |
Uploaders: Tong Sun <[email protected]>, |
| 4 |
Arthur Diniz <[email protected]> |
| 5 |
Section: golang |
| 6 |
Testsuite: autopkgtest-pkg-go |
| 7 |
Priority: optional |
| 8 |
Build-Depends: debhelper-compat (= 13), |
| 9 |
dh-sequence-golang, |
| 10 |
golang-any, |
| 11 |
golang-github-google-go-cmp-dev, |
| 12 |
golang-github-json-iterator-go-dev, |
| 13 |
golang-k8s-sigs-randfill-dev, |
| 14 |
golang-k8s-sigs-yaml-dev |
| 15 |
Standards-Version: 4.7.2 |
| 16 |
Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-k8s-sigs-structured-merge-diff |
| 17 |
Vcs-Git: https://salsa.debian.org/go-team/packages/golang-k8s-sigs-structured-merge-diff.git |
| 18 |
Homepage: https://github.com/kubernetes-sigs/structured-merge-diff |
| 19 |
Rules-Requires-Root: no |
| 20 |
XS-Go-Import-Path: sigs.k8s.io/structured-merge-diff |
| 21 |
|
| 22 |
Package: golang-k8s-sigs-structured-merge-diff-dev |
| 23 |
Architecture: all |
| 24 |
Depends: golang-github-google-go-cmp-dev, |
| 25 |
golang-github-json-iterator-go-dev, |
| 26 |
golang-k8s-sigs-randfill-dev, |
| 27 |
golang-k8s-sigs-yaml-dev, |
| 28 |
${misc:Depends} |
| 29 |
Multi-Arch: foreign |
| 30 |
Description: implementation for "server-side apply" (library) |
| 31 |
What is the apply operation? |
| 32 |
. |
| 33 |
It models resources in a control plane as having multiple |
| 34 |
"managers". Each manager is typically trying to manage only one |
| 35 |
aspect of a resource. The goal is to make it easy for disparate |
| 36 |
managers to make the changes they need without messing up the things |
| 37 |
that other managers are doing. In this system, both humans and |
| 38 |
machines (aka "controllers") act as managers. |
| 39 |
. |
| 40 |
To do this, it explicitly tracks (using the fieldset data structure) |
| 41 |
which fields each manager is currently managing. |
| 42 |
. |
| 43 |
Now, there are two basic mechanisms by which one modifies an object. |
| 44 |
. |
| 45 |
PUT/PATCH: This is a write command that says: "Make the object look |
| 46 |
EXACTLY like X". |
| 47 |
. |
| 48 |
APPLY: This is a write command that says: "The fields I manage should |
| 49 |
now look exactly like this (but I don't care about other fields)". |
| 50 |
. |
| 51 |
For PUT/PATCH, it deduces which fields will be managed based on what |
| 52 |
is changing. For APPLY, the user is explicitly stating which fields |
| 53 |
they wish to manage (and therefore requesting deletion of any fields |
| 54 |
that they used to manage but stop mentioning). |
| 55 |
. |
| 56 |
Any time a manager begins managing some new field, that field is removed |
| 57 |
from all other managers. If the manager is using the APPLY command, it |
| 58 |
calls these conflicts, and will not proceed unless the user passes the |
| 59 |
"force" option. This prevents accidentally setting fields which some |
| 60 |
other entity is managing. |
| 61 |
. |
| 62 |
PUT/PATCH always "force". They are mostly used by automated systems, |
| 63 |
which won't do anything productive with a new error type. |