Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not download helm chart in harbor deployed by harbor-helm #136

Closed
mmpei opened this issue Jan 10, 2019 · 3 comments
Closed

Could not download helm chart in harbor deployed by harbor-helm #136

mmpei opened this issue Jan 10, 2019 · 3 comments

Comments

@mmpei
Copy link
Contributor

mmpei commented Jan 10, 2019

I deployed a harbor using harbor-helm V1.0.0. and find that the content of charts downloaded from harbor is same:

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>Harbor</title>
    <base href="/">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico?v=2">
<link rel="stylesheet" href="styles.0a97e5c7dae15939bfca.css"></head>

<body>
    <harbor-app>
        <div class="spinner spinner-lg app-loading">
            Loading...
        </div>
    </harbor-app>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script><script type="text/javascript" src="scripts.70b8b612aef2adc60282.js"></script><script type="text/javascript" src="main.3c73c10d2cb36b65f91c.js"></script></body>

</html>

and uploading chart works well.

this bug is caused by that the request for fetch chart "/chartrepo/repo/charts/:chartName" is sent to portal according to the rule in nginx. so we should add a statement in nginx configuration like:

location /chartrepo/ {
          proxy_pass http://core/chartrepo/;
          proxy_set_header Host $host;
          proxy_set_header X-Real-IP $remote_addr;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

          # When setting up Harbor behind other proxy, such as an Nginx instance, remove the below line if the proxy already has similar settings.
          proxy_set_header X-Forwarded-Proto $scheme;

          proxy_buffering off;
          proxy_request_buffering off;
        }

i will make a PR for this issue.

@ywk253100
Copy link
Collaborator

@mmpei Thanks for the PR, I have merged it into the master branch. Can you cherry-pick the commit to the 1.0.0 branch?

@mmpei
Copy link
Contributor Author

mmpei commented Jan 10, 2019

@ywk253100 done.

@ywk253100
Copy link
Collaborator

@mmpei Thanks. Closing this issue as the fix has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants