Skip to content

Use HELM behind proxy: support insecure repositories when charts get downloaded #7875

Closed

Description

Version info

Output of helm version: v3 canary build 4/4/2020
Output of kubectl version: 1.16.2
Cloud Provider/Platform (AKS, GKE, Minikube etc.): Minishift


Context

Recently support for insecure registries has been added:

Although adding the insecure registries works perfectly, we cannot pull/install/upgrade images due to TLS verification still being done.

Configuration:

Helm 'repositories.yaml' configuration:

apiVersion: ""
generated: "0001-01-01T00:00:00Z"
repositories:
- caFile: ""
  certFile: ""
  insecure_skip_tls_verify: true
  keyFile: ""
  name: fluxcd
  password: ""
  url: https://<helm-repository>/repository/helm-fluxcd/
  username: ""

Problem

When pulling the chart we get following error:

bamboo@app-bamboo-agent-5:~$ helm pull fluxcd/flux
Error: Get https://<helm-repository>/repository/helm-fluxcd/flux-1.3.0.tgz: x509: certificate signed by unknown authority

Just making sure by specyfing the repo directly:

bamboo@app-bamboo-agent-5:~$ helm pull fluxcd/flux --repo https://repo.crelan-int.be/repository/helm-fluxcd/
Error: looks like "https://<helm-repository>/repository/helm-fluxcd/" is not a valid chart repository or cannot be reached: Get https://<helm-repository>/repository/helm-fluxcd/index.yaml: x509: certificate signed by unknown authority

Fix

Current pull, install and upgrade commands should keep into account that TLS verification is not required if the repository is marked as insecure.

Activity

  1. xvzf commented on Apr 4, 2020

    @xvzf
    Contributor

    /assign xvzf

  2. added
    bug
    on Apr 6, 2020
  3. technosophos commented on Apr 6, 2020

    @technosophos
    Member

    It looks like @xvzf has self-assigned! Thanks! I have added the bug label. Let me know if you feel that this is more of a feature request.

  4. xvzf commented on May 1, 2020

    @xvzf
    Contributor

    Why this is a draft: Seems like it breaks something with the Kubernetes cluster configuration and I don't know why yet 😞

     ! [lola ~/p/helm] git:(fix_insecure_skip_verify) ✗ go run ./cmd/helm install --insecure-skip-tls-verify test fluxcd/flux
    Error: Kubernetes cluster unreachable: Get "https://kubernetes.docker.internal:6443/version?timeout=32s": x509: certificate signed by unknown authority
    exit status 1
    
  5. xvzf commented on May 1, 2020

    @xvzf
    Contributor

    Nvm, mitmproxy also proxies the k8s apiserver, PR is done

  6. paulczar commented on Jun 24, 2020

    @paulczar
    Contributor

    It looks like this is resolved, there may still be an issue with helm accessing an insecure k8s cluster, but the repo/charts are good. Feel free to open a new issue if we need to resolve the latter.

  7. xvzf commented on Jun 24, 2020

    @xvzf
    Contributor

    @paulczar issue is closed by a still open PR - I suggest to keep this open for tracking!

  8. added a commit that references this issue on Jun 24, 2020
  9. bacongobbler commented on Jun 24, 2020

    @bacongobbler
    Member

    merged #8039 just now, so we should be good here.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions