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

Proposal: Move k8s.io/apimachinery/pkg/apis/meta/v1 to k8s.io/api/meta #69653

Open
nfisher opened this Issue Oct 11, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@nfisher

nfisher commented Oct 11, 2018

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature
/sig api-machinery

I was looking through the the deployment example as I'd like to generate JSON templates that I can pipe into kubectl apply. Might look at building additional functionality in the future but for now generating JSON templates is as far as I want to go for the MVP.

There's a few issues I've encountered;

  1. meta is imported from another repo which feels weird.
  2. the dep on apimachinery transitively imports glog.
  3. I'm not sure where I'd start with a PR if people agree with the change outlined.

The intended PR would be moving the meta struct from apimachinery to api/meta or similar. So instead of this import list;

	appsv1 "k8s.io/api/apps/v1"
	apiv1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

It would look like this;

	appsv1 "k8s.io/api/apps/v1"
	apiv1 "k8s.io/api/core/v1"
	metav1 "k8s.io/api/meta/v1"

Anything else we need to know?:

Environment:

  • Others:
    go version go1.11.1 darwin/amd64
@jennybuckley

This comment has been minimized.

Show comment
Hide comment
@jennybuckley

jennybuckley Oct 11, 2018

Contributor

/assign @lavalamp

Contributor

jennybuckley commented Oct 11, 2018

/assign @lavalamp

@lavalamp

This comment has been minimized.

Show comment
Hide comment
@lavalamp

lavalamp Oct 11, 2018

Member

This would cause the import direction to be wrong (apimachinery can't import the entire api), so we can't change this.

Removing glog as a dep from apimachinery I'm 100% on board with and will LGTM PRs that replace it with something else or isolate it somehow :)

Member

lavalamp commented Oct 11, 2018

This would cause the import direction to be wrong (apimachinery can't import the entire api), so we can't change this.

Removing glog as a dep from apimachinery I'm 100% on board with and will LGTM PRs that replace it with something else or isolate it somehow :)

@nfisher

This comment has been minimized.

Show comment
Hide comment
@nfisher

nfisher Oct 12, 2018

nfisher commented Oct 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment