Repository navigation
Closed
Labels
Description
Helm 2.8.1
Getting an error from helm dep build trying to build an umbrella chart using local charts repo within a CI engine. (Note the dependencies are located outside the umbrella chart repository according to #2887).
Is this Helm misbehaving here ?
> helm dep build umbrella-chart/
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 3 charts
Save error occurred: chart metadata (Chart.yaml) missing
Deleting newly downloaded charts, restoring pre-update state
Error: chart metadata (Chart.yaml) missing
File structure is:
- charts/
- index.yaml
- catalog-api-1.0.3.tgz
- orders-api-1.0.2.tgz
- ui-1.0.2.tgz
- umbrella-chart/
- Chart.yaml
- requirements.yaml
charts/index.yaml
apiVersion: v1
entries:
catalog-api:
- apiVersion: v1
created: 2018-03-01T10:00:20.883794+01:00
description: A Helm chart for a Kubernetes app
digest: 93081e18081b6cd1a19a77a48da6f71cf50a0bd08f3d1152af9112dfba78bc48
name: catalog-api
urls:
- catalog-api-1.0.3.tgz
version: 1.0.3
orders-api:
- apiVersion: v1
created: 2018-03-01T10:00:20.884032+01:00
description: A Helm chart for a Kubernetes app
digest: 746851622a1cd48edf2c471a65e2d7ee09344d578819f83480d7a5afc177358c
name: orders-api
urls:
- orders-api-1.0.2.tgz
version: 1.0.2
ui:
- apiVersion: v1
created: 2018-03-01T10:00:20.884288+01:00
description: A Helm chart for a Kubernetes app
digest: 9d1076c4750b756227d9f6265ad759540eb5c745c9353a9711abcb5a865500e8
name: ui
urls:
- ui-1.0.2.tgz
version: 1.0.2
generated: 2018-03-01T10:00:20.881161+01:00
umbrella-chart/Chart.yaml
apiVersion: v1
description: Umbrella chart for online-store microservices application
name: umbrella-chart
version: 1.0
umbrella-chart/requirements.yaml
dependencies:
- name: catalog-api
version: ">=1.0.0"
repository: file://../charts
- name: orders-api
version: ">=1.0.0"
repository: file://../charts
- name: ui
version: ">=1.0.0"
Reacted by Elouan Keryell-Even and Bob Bui
Activity
hmagph commentedon Mar 1, 2018
Here is a zip of the files, in case it helps figuring:
solution-helm-microservices-20180228121049676.zip
hmagph commentedon Mar 1, 2018
Trying things... tweaking the
charts/index.yamlto leverage local file repo url doesn't helpTried to have relative file path:
or paths relative to umbrella chart
still getting the same error...
hmagph commentedon Mar 2, 2018
helm dep updoesn't work any better... so is this a bug in Helm ? I see other issues that look a bit similareicnix commentedon Mar 2, 2018
If you use a
file://...url for a requirement repository you need to point the url to the requirement itself instead of the folder that contains the requirement chart.Helm tried to build your requirements from the charts folder but couldn't find a
Chart.yamlfile directly in your charts folder which resulting in the error message you received.This example works for me:
bacongobbler commentedon Mar 2, 2018
Nice catch, @eicnix.
Closing as answered, but please re-open if that didn't work and we'd be happy to follow up. :)
hmagph commentedon Mar 3, 2018
Unfortunately, with suggested adjustment, I'm still getting failure:
Here is the archive with files...
solution-helm-microservices-20180303200113841.zip
I must be doing something wrong...
@bacongobbler I'm unable to reopen it though
hmagph commentedon Mar 3, 2018
@eicnix Were you suggesting the ./charts folder should contain the component charts as subfolders instead of packaged charts (.tgz) ? If so, that would defeat all the clever version management, no ?
eicnix commentedon Mar 4, 2018
@hmagph The file url for the requirement charts need to point to the location of each chart instead of their parent folder.
hmagph commentedon Mar 5, 2018
@eicnix You mean then something like:
?
If so, then there is no point indicating a version rule (version >= 1.0.0), right ? As there is no more resolution...
In fact, isn't it simpler then to copy relevant charts directly into the umbrella charts subfolder and forget the requirements.yaml entirely ?
If that's true, I feel the 'file://" feature doesn't really add much if unable to select the relevant charts based on version matching.
eicnix commentedon Mar 5, 2018
You are correct.
file://requirements do not provide the same functionality like a chart repository and do not differentiate different versions.As a workaround you could run the chart-museum as a chart repository on your local machine.
hmagph commentedon Mar 5, 2018
Thanks then for the explanation. I guess I'll stay away from file://.. for now, and simply assemble charts directly into the umbrella /charts subfolder.
miraculixx commentedon Aug 12, 2020
Had the same issue, would like to share this to build and serve a local helm repo from external dependencies, e.g. github.
Essentially this shows how to build and serve a local helm repo with standard python & linux tools
https://gist.github.com/miraculixx/de62909719c26adf1391f262a725e022