2

How can I add stable/nginx-ingress as a dependency to my custom helm chart?

After trying a few different urls for the repository, I still have no luck.

Steps

  1. Created a new helm chart with helm create and editing the Chart.yaml to be
apiVersion: v2
name: acme
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: 1.16.0
icon: https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png

dependencies:
  - name: stable/nginx-ingress
    version: ~1.34
    repository: https://kubernetes-charts.storage.googleapis.com
  1. Executed this command helm dep update acme

The output is the following

Error: stable/nginx-ingress chart not found in repo https://kubernetes-charts.storage.googleapis.com

Note

I have seen these Stack Overflow questions, but the answers were lacking explanation:

This question is not intended to be a duplicate. I'm not using Azure and I am using Helm 3.

halfer
  • 19,824
  • 17
  • 99
  • 186
Stephen
  • 7,994
  • 9
  • 44
  • 73

1 Answers1

2

The updated chart for helm3 is ready to use.

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install my-release ingress-nginx/ingress-nginx

Original

The nginx-ingress chart is not published there yet. The progress is being tracked in kubernetes/ingress-nginx#5161.

If you want to use the old chart you will need either a copy of the chart locally, or a version of the chart published to your own repo. For the local file dependency, get a copy of the current chart:

git clone https://github.com/helm/charts.git
cp -r charts/stable/nginx-ingress /path/to/acmes-parent-dir/

Then you can use a relative reference to the local directory:

dependencies:
- name: nginx-ingress
  version: "1.34"
  repository: "file://../nginx-ingress"
Matt
  • 68,711
  • 7
  • 155
  • 158
  • That's assuming the previous chart works with helm3 ok. I haven't actually tried to manage nginx-ingress with helm3 yet. – Matt Mar 19 '20 at 02:23
  • Tremendously helpful, thanks. If you post an answer in the other thread I will award you the 50 reputation points for the bounty I started because the solution will likely work for their case as well https://stackoverflow.com/questions/59454550/adding-nginx-ingress-certmanager-as-dependency-in-helm-charts – Stephen Mar 19 '20 at 05:52
  • 1
    No worries. The other question needs a bit more detail than this, if I get a chance I'll take a look. – Matt Mar 19 '20 at 07:29