mintel / dex-k8s-authenticator

A Kubernetes Dex Client Authenticator
MIT License
374 stars 146 forks source link

make "charts" a helm/helmsman repo #70

Closed praveendhac closed 5 years ago

praveendhac commented 6 years ago

The charts cannot be directly used with helm/helmsman. Need to make the charts directory a helm repo.

*config1

helmRepos:
  dex-k8s-authenticator: "https://github.com/mintel/dex-k8s-authenticator/tree/master/charts"
Error:
2018/09/05 13:59:34 ERROR: while adding repo [dex]: Error: Looks like "https://github.com/mintel/dex-k8s-authenticator/tree/master/charts" is not a valid chart repository or cannot be reached: Failed to fetch https://github.com/mintel/dex-k8s-authenticator/tree/master/charts/index.yaml : 404 Not Found

*config2

helmRepos:
  dex-k8s-authenticator: "https://github.com/mintel/dex-k8s-authenticator"
Error:
2018/09/05 14:00:17 ERROR: while adding repo [dex]: Error: Looks like "https://github.com/mintel/dex-k8s-authenticator" is not a valid chart repository or cannot be reached: Failed to fetch https://github.com/mintel/dex-k8s-authenticator/index.yaml : 404 Not Found
nabadger commented 6 years ago

@praveendhac Do you have this working for any other Git repos? It looks like to me like it's meant to point to a charts repo, such as https://github.com/helm/chartmuseum (and not direct to a specific chart on Git...but I've only spent 2 mins having a look).

If not, try https://github.com/mintel/dex-k8s-authenticator/tree/master/charts/dex-k8s-authenticator as the URL. This repo has 2 charts (dex and dex-k8s-authenticator) - you would need to reference them independently.

praveendhac commented 6 years ago

The URL does not follow chart repository structure, https://github.com/helm/helm/blob/master/docs/chart_repository.md

ERROR: while adding repo [dex]: Error: Looks like "https://github.com/mintel/dex-k8s-authenticator/tree/master/charts/dex-k8s-authenticator" is not a valid chart repository or cannot be reached: Failed to fetch https://github.com/mintel/dex-k8s-authenticator/tree/master/charts/dex-k8s-authenticator/index.yaml : 404 Not Found
nabadger commented 6 years ago

That is for if you want to host your own charts repository, which is a collection of charts packaged up together with an index.html.

It's not related to how you structure a specific chart, which is what we provide - see https://docs.bitnami.com/kubernetes/how-to/create-your-first-helm-chart/ ).

praveendhac commented 6 years ago

Because of the missing index.yaml file, the repo cannot be used by helmsman. Has to convert the repo into helm repo and push to our local repo to use dex-k8s-authenticator/dex charts.

nabadger commented 6 years ago

The index.yaml links to the helm packages that are pre-built (tar.gz).

I'll take a look - I've found a few examples where people are doing this. It would however require us to pre-build the charts (but maybe that's a useful thing as you say).

nabadger commented 6 years ago

@praveendhac Can you try this:

helm repo add mintel-dex https://raw.githubusercontent.com/mintel/dex-k8s-authenticator/feat-helm-repo/charts/repo/stable

Please note, this a branch feat-helm-repo that I've just pushed (so it's a test). If it works, I'll look to merge it to master.

Also note that I've re-structured the repo (added ./repo/stable for example)

nabadger commented 6 years ago

Note, if this is works, I'll probably add a mintel/charts repo so that any charts we develop and opensource can be available (rather than having the repo under mintel/dex-k8s-authenticator/charts

nabadger commented 5 years ago

Closing due to inactively.