Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Within Server-side apply, document map and list merging behaviors. #16725

Closed
erictune opened this issue Oct 7, 2019 · 14 comments
Closed

Within Server-side apply, document map and list merging behaviors. #16725

erictune opened this issue Oct 7, 2019 · 14 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. wg/api-expression Categorizes an issue or PR as relevant to WG API Expression.

Comments

@erictune
Copy link
Member

erictune commented Oct 7, 2019

This is a Feature Request

What would you like to be added

Add this content to the page https://kubernetes.io/docs/reference/using-api/api-concepts/#server-side-apply


For Kubernetes version 1.16, CRDs support the following annotations:

  • x-kubernetes-list-map-key
  • x-kubernetes-list-map-type
    These tags, and the type of a field in the CRD's validation section (type: object or type: array) affect how Server-Side Apply operates.

Maps and lists are merged differently.

  • Type: Map
    1. map key(s) used to consider one item at a time.
    2. applier-owned keys not mentioned in an apply operation are deleted
    3. non-existing keys mentioned in apply operation are inserted
    4. existing not-owned-by-applier keys, not mentioned in the apply operation, are left along.
    5. keys mentioned and not-owned by applier with differing values will trigger conflict.
  • Type: lists with the x-kubernetes-list-map-type.
    • Same as Map
    • x-kubernetes-list-map-keys determines the key or key-tuple.
    • otherwise, name used as key if it is a property
    • otherwise (what happens?)
  • Normal List a.k.a Atomic List
    1. whole list is owned by one owner.
    2. if not-owned by applier, raise conflict
    3. if owned by applier, replaced with content in apply body.

Why is this needed
Server-Side apply does not explain list or map merging.

Comments

I suggest @apelisse or @jennybuckley as Eng reviewer for the website content resulting form this issue.

@sftim
Copy link
Contributor

sftim commented Oct 7, 2019

It's a valid improvement
/kind feature
/priority backlog

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Oct 7, 2019
@erictune
Copy link
Member Author

erictune commented Oct 7, 2019

@apelisse @jennybuckley

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 5, 2020
@erictune
Copy link
Member Author

erictune commented Jan 6, 2020 via email

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 6, 2020
@kwiesmueller
Copy link
Member

/assign @mariantalla

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 6, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 6, 2020
@apelisse
Copy link
Member

apelisse commented May 7, 2020

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels May 7, 2020
@kwiesmueller
Copy link
Member

/wg api-expression

@k8s-ci-robot k8s-ci-robot added the wg/api-expression Categorizes an issue or PR as relevant to WG API Expression. label Aug 5, 2020
@TBBle
Copy link
Contributor

TBBle commented Nov 21, 2020

This does appear to be documented at https://kubernetes.io/docs/reference/using-api/server-side-apply/#merge-strategy now.

@apelisse
Copy link
Member

Correct, I think it's done now.

@apelisse
Copy link
Member

/close

@k8s-ci-robot
Copy link
Contributor

@apelisse: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@apelisse
Copy link
Member

applier-owned keys not mentioned in an apply operation are deleted

I suspect this could be better documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. wg/api-expression Categorizes an issue or PR as relevant to WG API Expression.
Projects
None yet
Development

No branches or pull requests

8 participants