Skip to content

remove tiller/environment dependency from plugin package - #2685

Merged
technosophos merged 1 commit into
helm:masterfrom
databus23:lighten-dep
Jul 24, 2017
Merged

technosophos merged 1 commit into
helm:masterfrom
databus23:lighten-dep

Conversation

@databus23

@databus23 databus23 commented Jul 13, 2017 •

Copy link
Copy Markdown
Contributor

This might be controversial. I'm putting this PR out to get some feedback on this.

While writing the helm-diff plugin starting with helm 2.3 I suddenly pulled in a dependency on github.com/kubernetes/kubernetes which as you all know is quite a heavy cross to bear.
Needless to say this is totally unnecessary because the plugin just want to talk to tiller via grpc and does not interact with kubernetes directly.
It also inflates the resulting binary from 13MB to 63MB which is at least a little annoying.

I looked into this a little and turns it is because of a dependency from k8s.io/helm/pkg/plugin to k8s.io/helm/pkg/tiller/environment. Its only used to access the TillerNamespaceEnvVar constant.

k8s.io/helm/pkg/plugin is used by k8s.io/helm/pkg/downloader which is the package I need to import to reproduce the downloading of charts. Arguably these things have nothing todo with kubernetes und having a lighter dependency graph would improve the usability of these packages as libraries considerably.

What do you think?

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 13, 2017
@jascott1

Copy link
Copy Markdown
Contributor

I don't see any problem with this but also don't understand why that dependency was taken in the first place.

@technosophos technosophos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree with this one. I think the existing code is a "micro-optimization" gone awry. This change is clearly a sensible step.

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

Labels

awaiting review cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants