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

Implement export functionality server-side for all resources #24855

Open
kargakis opened this issue Apr 27, 2016 · 17 comments

Comments

Projects
None yet
@kargakis
Copy link
Member

commented Apr 27, 2016

The machinery added in #17483 is currently used only by services. Not sure if I miss any other resource but most don't (and should since the client functionality is already in place: #18101).

issues/gaps with current implementation:

  • export is not implemented for list (#41880 )
  • export does not remove self links (#33767 #57898)
  • export service doesn't know intent, sometimes drops a port that was desired (#28551)
@adohe

This comment has been minimized.

Copy link
Member

commented Apr 27, 2016

@kargakis in this PR #22285, I just add service export implementation. You may take a look. Besides do we really need to support export all resources?

@kargakis

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2016

@adohe yes, we need to support exporting of most if not all resources.

@soltysh

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2016

/sub

@adohe

This comment has been minimized.

Copy link
Member

commented Apr 27, 2016

Also as what export suggests, we should stripped of cluster-specific information from exported resources.

@kargakis

This comment has been minimized.

Copy link
Member Author

commented Apr 27, 2016

@adohe

This comment has been minimized.

Copy link
Member

commented Sep 22, 2016

Just add this to my to do list, will open a PR asap.

@kargakis

This comment has been minimized.

Copy link
Member Author

commented Jan 1, 2017

@smarterclayton

This comment has been minimized.

Copy link
Contributor

commented Jan 1, 2017

I'd like to couple this to the server side representation of resources (kubernetes/community#123) since not all exports are born equal (there are likely cases where export needs to be parameterized). This is a pre-req for generic extension servers, but it's slightly less important than get and describe on the server in many cases.

@seh

This comment has been minimized.

Copy link
Contributor

commented Sep 15, 2017

Perhaps this comment belongs over on #33241, or maybe a fresh issue, but I noticed that if I run kubectl get --export=true against a pluralized resource name, summoning a v1.List of objects, then the --export=true flag has no effect. It only works when running kubectl get against a singular named resource. That is,

kubectl get serviceaccounts --export=true

has no observable effect, but

kubectl get serviceaccount default --export=true

does.

@fejta-bot

This comment has been minimized.

Copy link

commented Jan 5, 2018

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.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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

@nikhita

This comment has been minimized.

Copy link
Member

commented Jan 12, 2018

/remove-lifecycle stale

@soltysh

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2018

/lifecycle frozen

@yue9944882

This comment has been minimized.

Copy link
Member

commented Feb 13, 2018

Hi folks, any updates on this thread? @liggitt @soltysh

@liggitt

This comment has been minimized.

Copy link
Member

commented Feb 13, 2018

Hi folks, any updates on this thread? @liggitt @soltysh

not really, getting server-side printing and alternate representations completed is a higher priority for api-machinery currently.

it's a bit unclear what the goals of the server-side export function are. there are several opposing use cases that tend to get grouped together under the "export" heading:

  • export for import to another namespace (remove all references to the source namespace)
  • export for import to the same namespace in another cluster (remove assigned fields like service IP)
  • export for import to the same namespace in the same cluster

it doesn't make sense to spend a lot of effort on export until it is resolved what the feature actually is, and which of those (if any), we intend to support uniformly across all resources

@bgrant0607

This comment has been minimized.

Copy link
Member

commented Apr 16, 2018

I agree that other flavors of export might be desirable. For instance, I could imagine someone just wanting to export the applied configuration rather than the full desired state.

One thing that would be useful for export and also for dry run and client-side generation would be to make fields like metadata.creationTimespamp and status omitempty in the json tags.

@bgrant0607

This comment has been minimized.

Copy link
Member

commented Apr 16, 2018

Another question is whether we should version export functionality if we're going to make changes to it, much as we're discussing for strategic merge patch formats.

@deads2k

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2018

I agree that other flavors of export might be desirable. For instance, I could imagine someone just wanting to export the applied configuration rather than the full desired state.

We've considered this a few times since then and ended up coming back around to avoiding export and instead just getting the resource as it exists today. The transformations could then be done client-side and at some later date. Doing it this way allows a single retrieval to be used for different purposes and allows an "export" to be done before deciding how you may later use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.