Skip to content

Helm dep build : Error: chart metadata (Chart.yaml) missing #3585

Closed

Description

@hmagph

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"

Activity

  1. hmagph commented on Mar 1, 2018

    @hmagph
    Author

    Here is a zip of the files, in case it helps figuring:
    solution-helm-microservices-20180228121049676.zip

  2. hmagph commented on Mar 1, 2018

    @hmagph
    Author

    Trying things... tweaking the charts/index.yaml to leverage local file repo url doesn't help

    Tried to have relative file path:

    apiVersion: v1
    entries:
      catalog-api:
      - apiVersion: v1
        created: 2018-03-01T12:02:09.339578+01:00
        description: A Helm chart for a Kubernetes app
        digest: 93081e18081b6cd1a19a77a48da6f71cf50a0bd08f3d1152af9112dfba78bc48
        name: catalog-api
        urls:
        - file://catalog-api-1.0.3.tgz
        version: 1.0.3
      orders-api:
      - apiVersion: v1
        created: 2018-03-01T12:02:09.339792+01:00
        description: A Helm chart for a Kubernetes app
        digest: 746851622a1cd48edf2c471a65e2d7ee09344d578819f83480d7a5afc177358c
        name: orders-api
        urls:
        - file://orders-api-1.0.2.tgz
        version: 1.0.2
      ui:
      - apiVersion: v1
        created: 2018-03-01T12:02:09.339978+01:00
        description: A Helm chart for a Kubernetes app
        digest: 9d1076c4750b756227d9f6265ad759540eb5c745c9353a9711abcb5a865500e8
        name: ui
        urls:
        - file://ui-1.0.2.tgz
        version: 1.0.2
    

    or paths relative to umbrella chart

    apiVersion: v1
    entries:
      catalog-api:
      - apiVersion: v1
        created: 2018-03-01T12:04:13.487591+01:00
        description: A Helm chart for a Kubernetes app
        digest: 93081e18081b6cd1a19a77a48da6f71cf50a0bd08f3d1152af9112dfba78bc48
        name: catalog-api
        urls:
        - file://../charts/catalog-api-1.0.3.tgz
        version: 1.0.3
      orders-api:
      - apiVersion: v1
        created: 2018-03-01T12:04:13.487849+01:00
        description: A Helm chart for a Kubernetes app
        digest: 746851622a1cd48edf2c471a65e2d7ee09344d578819f83480d7a5afc177358c
        name: orders-api
        urls:
        - file://../charts/orders-api-1.0.2.tgz
        version: 1.0.2
      ui:
      - apiVersion: v1
        created: 2018-03-01T12:04:13.488127+01:00
        description: A Helm chart for a Kubernetes app
        digest: 9d1076c4750b756227d9f6265ad759540eb5c745c9353a9711abcb5a865500e8
        name: ui
        urls:
        - file://../charts/ui-1.0.2.tgz
        version: 1.0.2
    generated: 2018-03-01T12:04:13.487104+01:00
    

    still getting the same error...

    > 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
    
  3. hmagph commented on Mar 2, 2018

    @hmagph
    Author

    helm dep up doesn't work any better... so is this a bug in Helm ? I see other issues that look a bit similar

  4. eicnix commented on Mar 2, 2018

    @eicnix
    Contributor

    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.yaml file directly in your charts folder which resulting in the error message you received.

    This example works for me:

    dependencies:
      - name: catalog-api
        version: ">=1.0.0"
        repository: file://../charts/catalog-api
      - name: orders-api
        version: ">=1.0.0"
        repository: file://../charts/orders-api
      - name: ui
        version: ">=1.0.0"
        repository: file://../charts/ui
    
  5. bacongobbler commented on Mar 2, 2018

    @bacongobbler
    Member

    Nice catch, @eicnix.

    Closing as answered, but please re-open if that didn't work and we'd be happy to follow up. :)

  6. hmagph commented on Mar 3, 2018

    @hmagph
    Author

    Unfortunately, with suggested adjustment, I'm still getting failure:

    > helm dep up --debug umbrella-chart/
    Error: directory /Users/phmulet/git/solution-helm-microservices-20180303200113841/charts/catalog-api not found
    

    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

  7. hmagph commented on Mar 3, 2018

    @hmagph
    Author

    @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 ?

  8. eicnix commented on Mar 4, 2018

    @eicnix
    Contributor

    @hmagph The file url for the requirement charts need to point to the location of each chart instead of their parent folder.

  9. hmagph commented on Mar 5, 2018

    @hmagph
    Author

    @eicnix You mean then something like:

    dependencies:
      - name: catalog-api
        version: ">=1.0.0"
        repository: file://../charts/catalog-api-1.0.2.tgz
      - name: orders-api
        version: ">=1.0.0"
        repository: file://../charts/orders-api-1.0.3.tgz
      - name: ui
        version: ">=1.0.0"
        repository: file://../charts/ui-1.0.2.tgz
    

    ?

    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.

  10. eicnix commented on Mar 5, 2018

    @eicnix
    Contributor

    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.

  11. hmagph commented on Mar 5, 2018

    @hmagph
    Author

    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.

  12. miraculixx commented on Aug 12, 2020

    @miraculixx

    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

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions