Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Charts directory collision when using multiple repositories. #416

Open
migmartri opened this issue Mar 17, 2016 · 4 comments
Open

Charts directory collision when using multiple repositories. #416

migmartri opened this issue Mar 17, 2016 · 4 comments

Comments

@migmartri
Copy link

Hi

Two chart with the same name but in different repositories seems to use the same workspace chart directory.

$ helm fetch redmine
---> Fetched chart into workspace /home/migmartri/.helm/workspace/charts/redmine
---> Done

$ ls ~/.helm/workspace/charts/redmine/manifests/
redmine-rc.yaml  redmine-svc.yaml

$ helm repo add bitnami https://github.com/bitnami/charts
---> Cloning into '/home/migmartri/.helm/cache/bitnami'...
---> Hooray! Successfully added the repo.

$ helm fetch bitnami/redmine
---> Fetched chart into workspace /home/migmartri/.helm/workspace/charts/redmine
---> Done

$ ls ~/.helm/workspace/charts/redmine/manifests/
redmine-rc.yaml  redmine-svc.yaml redmine-controller.yaml redmine-service.yaml

Both charts have been fetched in the same directory. Causing some unexpected behavior:

  • If the k8s files have the same name, they will get overridden.

  • If the k8s files have different name, they will be placed next to the previous ones, adding unexpected resources to the deployment or causing installation errors.

    helm install bitnami/redmine
    ---> Running `kubectl create -f` ...
    Error from server: error when creating "STDIN": services "redmine" already exists
    

One proposed solution would be that the workspace directory is namespaced with the repository name for personal repos.

This will result in the following directory structure:

~/.helm/workspace/charts/redmine/
~/.helm/workspace/charts/bitnami/redmine/

Thoughts?

@nomisbeme
Copy link

The namespacing/uninstall issue in helm/helm#392 might serve as a template for addressing this?

@krancour
Copy link
Contributor

Similar to when you clone a git repository and may be wishing to avoid a naming conflict, you can specify your own name for a chart in your workspace at the time you fetch it.

Example:

$ helm fetch redmine
$ helm fetch bitnami/redmine bitnami-redmine

@prydonius
Copy link
Member

@krancour that works if you're aware of what the default behaviour is, for me this wasn't completely obvious and it wasn't immediately clear what had happened. I think being consistent with the charts repo namespace across all commands avoids a lot of confusion.

@krancour
Copy link
Contributor

@prydonius I should be clear... I never meant to imply improvements aren't possible in this regard. I was only suggesting an expedient workaround for anyone facing this issue at the moment.

gabrtv pushed a commit to gabrtv/helm that referenced this issue Jun 30, 2016
chore(examples): add example nginx chart
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants