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

Console does not respond (behind NGINX proxy) #609

Closed
abrari opened this issue Feb 17, 2017 · 15 comments
Closed

Console does not respond (behind NGINX proxy) #609

abrari opened this issue Feb 17, 2017 · 15 comments

Comments

@abrari
Copy link

abrari commented Feb 17, 2017

Description

Using Portainer behind NGINX reverse proxy with this configuration:

server {
        server_name portainer.example.id;
        location / {
                proxy_http_version 1.1;
                proxy_set_header Connection "";
                proxy_pass http://localhost:9000;
        }
        location /api/websocket/ {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://localhost:9000/api/websocket/;
        }
}

I opened a container's console and connect using /bin/bash. The connection was successful, the terminal was opened and showing bash prompt, but it did not respond (i.e. typing any command did nothing).

The console works well if Portainer is accessed directly (http://example.id:9000).

Technical details:

  • Portainer version: 1.11.3
  • Portainer Docker image tag (latest/arm/windows...): latest
  • Target Docker version (the host/cluster you manage): 1.13.0
  • Platform (windows/linux): linux
  • Browser: Google Chrome 49
@abrari
Copy link
Author

abrari commented Feb 17, 2017

Oh, I forgot to mention that the browser's console displayed no errors. Inspecting the websocket request, the typed commands were sent but no response received.

@deviantony
Copy link
Member

Hmm, that is strange, I'll try to reproduce. What if you try exactly our provided reverse proxy configuration: http://portainer.readthedocs.io/en/stable/faq.html#how-can-i-configure-my-reverse-proxy-to-serve-portainer

It is pretty similar but we know that this one is working.

@sn00pster
Copy link

I can't even get that far, I have a reverse proxy set up and everything in the UI appears to work fine apart from the console, doesn't even get to opening a black box, safari error console shows:

[Error] WebSocket connection to 'ws://docker.mydomain.com/api/websocket/exec?id=66497ad3afddd527d98c55afdc302047627194fc2f6aae5daf283024f1b80c50' failed: Unexpected response code: 301

I have the same config that appears on the link above, except that portainer is on the root rather than in a /portainer sub directory.

@sn00pster
Copy link

I think there's an erroneous (missing?) slash somewhere in a URI in the console stuff somewhere in the code, adding this extra location to the proxy config solves the problem with the console not working for me:

    location /api/websocket/exec {
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_http_version 1.1;
            proxy_pass http://portainer/api/websocket/exec;
    }

@deviantony
Copy link
Member

Ah that's interesting ! I'll investigate.

@galindro
Copy link

@deviantony , it not works too when the reverse proxy is configured with a non-root path, like this:

server {
        server_name i.sb;
        location /portainer {
                proxy_http_version 1.1;
                proxy_set_header Connection "";
                proxy_pass http://localhost:9000;
        }
        location /portainer/api/websocket/ {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://localhost:9000/api/websocket/;
        }
}

It not works even putting /exec at end of http://localhost:9000/api/websocket/, like showed by @sn00pster

@deviantony
Copy link
Member

deviantony commented May 26, 2017

@galindro

Could you try (note the removal of the extra /):

location /portainer/api/websocket {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://localhost:9000/api/websocket;
        }

Instead of:

location /portainer/api/websocket/ {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://localhost:9000/api/websocket/;
        }

@galindro
Copy link

@deviantony, without the last / , the websocket proxy worked.
Now I have only one more question about reverse proxy: In my case (using my config), I need to put a final slash to connect to the home page. Why?

This is my current proxy config:

server {
        server_name i.sb;
        location /ui {
                proxy_http_version 1.1;
                proxy_set_header Connection "";
                proxy_pass http://localhost:9000;
        }
        location /ui/api/websocket {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://localhost:9000/api/websocket;
        }
}

This is the problem in browser without the last slash. It seems that, without it, angular can't find some files....

image

@deviantony
Copy link
Member

You mean that you need to use the following config ?

server {
        server_name i.sb;
        location /ui {
                proxy_http_version 1.1;
                proxy_set_header Connection "";
                proxy_pass http://localhost:9000/;
        }
        location /ui/api/websocket {
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_http_version 1.1;
                proxy_pass http://localhost:9000/api/websocket;
        }
}

@galindro
Copy link

👍

@deviantony
Copy link
Member

Honestly, no idea and I don't really have time to debug reverse proxy configs at the moment. My suggestion is that if you found a working configuration, just use it :)

Otherwise you can join us on Slack, we have a dedicated channel where we can discuss reverse-proxies issues: http://portainer.io/slack/

@galindro
Copy link

It works if I access http://i.sb/ui/. But if I access http://i.sb/ui , the browser isn't redirected to http://i.sb/ui/#/auth

@deviantony
Copy link
Member

Looks like this issue was solved, feel free to re-open if I'm wrong.

SvenDowideit pushed a commit that referenced this issue Sep 17, 2021
* feat(helm): configure helm repository URL in the settings EE-1217 (#582)

* feat(helm): helm cli integration and skeleton routes EE-1281 (#589)

* Initial import for skeleton helm integration

* added helm repo url to settings

* - fixed handler middleware
- updated swaggerdoc template to align closer to what we need

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* feat(helm) add helm binaries to the build process EE-1309 (#596)

* feat(helm): configure helm repository URL in the settings EE-1217 (#582)

* EE-1309 added helm binaries to the build

* EE-1309 fix file check

* EE-1309 Fix download script so that it actually extracts the archives. Check it works for windows

* EE-1309 chmod not required for windows binaries

Co-authored-by: dbuduev <3435359+dbuduev@users.noreply.github.com>

* feat(helm) install a chart (#610)

* feat(kubeconfig): dynamic kubeconfig param generation support using service EE-1303 (#604)

* kubeconfig service initial implementation

kube config service tests

* kubeconfig service helm integration

fixed GetKubeConfig interface method

* updated log for kubeconfig service

* local pod now also uses config to enforce caller RBAC

* getCertificateAuthorityData refactor

* kubeconfig service struct and interfaces refactor

* resolved interface issues after merge to get project building/running

* fixies error handling reversed logic

* added check to allow helm to run locally if cluster details not available

* feat(helm) provide values yaml to helm EE-1365 (#616)

* Initial implementation of values/chart endpoint

* use text/yaml instead

* using text/plain now for everything

* Change routes to reflect comments from engineering

* Update api/http/handler/helm/helm_show.go

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* Minor improvements to address review comments

* add useractivity logging

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* feat(helm): refactor to create a wrapper interface EE-943 (#619)

* helm code refactor to adhere to interface driven design
- better response documentation from swagger
- binary implementation switchable with library
- easier testing
- code is more similar/closer to official helm golang lib

* resolved merge conflict to get code running

* moved release helm model to package to align to helm lib

* fixed missing import

* added helm install tests

* removed redundant code

* refactored show to new structure

* validating show options

* bugfix: fixed cert issue

* feat(helm): convert payload to json

* feat(helm) authorise Helm chart install request (#632)

Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>

* feat(helm) add index yaml route EE-1406 (#633)

* EE-1406 add index.yaml route

* Fix return type

* Update api/exec/helm/search_repo.go

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* Update api/exec/helm/search_repo.go

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* fixed project to get it running

* Download and parse index.yaml directly (helm search missing detail)

* Add timeout to the http client

* Remove search options now no longer relevant

* fix swagger docs

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>
Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* Feat(helm): Helm url settings frontend (#590)

* change settings to include HelmRepositoryURL

* WIP settings update test

* finish frontend for helm charts URL in settings

* fix alignment for HelmRepositoryURL

* resolve conflicts on portainer.go

Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>

* removed redundant test file

* feat(helm/tls): utilisation of provided TLS cert from correct path EE-1443 (#649)

* utilisation of provided tls cert file from correct path

* fixed issue with chart installation - whitelisting openapi path

* feat(helm):list and configuration of helm chart EE-1219 (#642)

* finish frontend for helm charts URL in settings

* add helm into sidebard

* component for helm charts and helm-list

* helm charts listing component and service

* helm list controller

* helm listing component Templates

* api handler for helm charts

* and

* helm-chart.html frontend

* intergrate backend to frontent

* fix search category

* kubernetes yaml inspector

* final code tidy up

* add cache to service

* remove unuse services

* delete unuse file

* fix space in init.go

* transformResponse

* add loading indicator for values.yaml loading

* refactoring helm chart controller to new style

* helm app templates refactor

* removed redundant code

* removed redundant code

* refactored to adhere to frontend coding guidelines

* url change from kubernetes/helms to kubernetes/templates/helm

* component name change

* changed component names and filenames

* updated helm icon

* scoped css to component

* refactor code and api calls

* helm service refactor

* removed redundant handler

* add web editor not save warning and matomo event

* bugfixes

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* feat(helm): helm repo url global settings DB migration EE-1477 (#654)

* db migration which sets initial helm repo url

* settings refactor to reflect backend struct attr order

* - removed redundant helper method
- utilising persisted helm repo url settings from DB migration

* removed activity logging from helm search and showGET requests

* using rocket icon for charts

* analytics event update, categories dropdown bugfix

* editor modified exit bugfix

* feat(helm) mock package and some handler tests EE-1468 (#652)

* Initial import of EE-1468.  Mock package manager for helm

* EE-1468 search test

* EE-1468 add test handlers and update mock helm package

* Change the mock data and actually test we are getting what is expected, not just not empty

* address issues post review

* refactor test cases.  Now properly calls the endpoint

* Don't export testRequestHandler.  Only used inside helm right now

* Make the Test Request Bouncer globally available

* Use more meaningful name when using testhelpers

* fixed notifications typo

* feat(helm): support for external non-https portainer deployments (#656)

* updated helm template text

* - support for helm in non-https portainer by using internal secure port 9443
- removed redundant files as those are to be added in next release
- removed run from interface as that is no longer required

* logrus debug helm command

* interface updated GetKubeConfigCore -> GetKubeConfigInternal as its more explicit; added and updated unit tests

* helper text to convey slow helm templates load

* feat(helm) put the integration test back in safely EE-943 (#668)

* Add helm install integration test back in. Now not enabled by default

* Minor changes as suggested by comments

* removing redundant time-consuming api call by using prop attribute

* addressed tech review issues

* migrated to using external helm lib

* updated lib to fix mock unit tests

* addressed merge conflict by migrating helm to new sidebar component

* helm lib update

* feat(helm/validation): frontend validation for helm release name EE-1508 (#685)

* helm name validation - frontend

* form accessible in controller

* migrated search_repo to root

* backend helm chart name validation - from EE-1508 (reviewed)

* helmlib update to use new mock that satisfies interface

* privatising helm struct attrs

* removed redundant requirement of user activity store

* bugfix: kubectl shell not opening

* tidy go modules

* resolved conflicts, updated code

* - insufficient role returns 403 forbidden
- frontend install section hidden if insufficient role

* hide helm templates nav item for unauthorised roles

* feat(helm/views): helm release and application views EE-1236 (#695)

* feat(helm): helm cli integration and skeleton routes EE-1281 (#589)

* Initial import for skeleton helm integration

* added helm repo url to settings

* - fixed handler middleware
- updated swaggerdoc template to align closer to what we need

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* feat(helm) install a chart (#610)

* feat(helm): refactor to create a wrapper interface EE-943 (#619)

* helm code refactor to adhere to interface driven design
- better response documentation from swagger
- binary implementation switchable with library
- easier testing
- code is more similar/closer to official helm golang lib

* resolved merge conflict to get code running

* moved release helm model to package to align to helm lib

* fixed missing import

* added helm install tests

* removed redundant code

* refactored show to new structure

* validating show options

* migrated to using external helm lib

* privatising helm struct attrs

* removed redundant requirement of user activity store

* feat(helm/templates): helm release view, helm apps in k8s view, k8s apps expandable, helm apps removable

* change settings to include HelmRepositoryURL

* WIP settings update test

* finish frontend for helm charts URL in settings

* fix alignment for HelmRepositoryURL

* resolve conflicts on portainer.go

Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>

feat(helm): helm cli integration and skeleton routes EE-1281 (#589)

* Initial import for skeleton helm integration

* added helm repo url to settings

* - fixed handler middleware
- updated swaggerdoc template to align closer to what we need

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

feat(kubeconfig): dynamic kubeconfig param generation support using service EE-1303 (#604)

* kubeconfig service initial implementation

kube config service tests

* kubeconfig service helm integration

fixed GetKubeConfig interface method

* updated log for kubeconfig service

* local pod now also uses config to enforce caller RBAC

* getCertificateAuthorityData refactor

* kubeconfig service struct and interfaces refactor

feat(helm): refactor to create a wrapper interface EE-943 (#619)

* helm code refactor to adhere to interface driven design
- better response documentation from swagger
- binary implementation switchable with library
- easier testing
- code is more similar/closer to official helm golang lib

* resolved merge conflict to get code running

* moved release helm model to package to align to helm lib

* fixed missing import

* added helm install tests

* removed redundant code

* refactored show to new structure

* validating show options

feat(helm) list helm charts EE-1252 (#599)

* EE-1252 list helm charts

* added user activity store for EE

* Add selector to support EE-1258

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

feat(helm) delete helm chart EE-1253 (#603)

* feat(helm) delete helm chart EE-1253

* return 204 No Content instead of 200

* Remove superfluous comment, add useractivity logging

* updated swagger response

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

addressed helm Run interface differences to inject kubeconfig

initial implementation of helm app view (#609)

feat(component): sensitive details component EE-1366 (#617)

* show-hide low-level component

* copy-button low-level component

* sensitive-details component

* sensitive-details component update - giving room for large strings/values

* removed padding using global class name

* using CSS animations to fade copy text

* addresssed PR review issues

* changed container css to enhance alignment large text items

addressed logging activity issues and helm uninstall

uninstall fix - delete did not work

updated List code - removed redundant Run interface requirement

embedded table implementation k8s application view (#623)

feat(helm): helm release displayed as expandable accordion EE-1341 (#640)

* helm applications displayed in k8s app list view

* published url display on expansion

* no app exposure bugfix for publishedurl

* - renamed vars
- isolating all helm apps (even if single chart) to better distinguish them in UI

* bugfix: addressed empty helm apps in non-system namespaces

feat(helm): helm app removal support on k8s app view EE-1259 (#639)

* helm application removal from k8s app list view

* reverted back to using indexOf with object

fixed issues with rebase - app in working state

removed checkbox for embedded helm applications

Feat(helm) add helm handler tests install/delete/list EE-1236 (#684)

* feat(helm) add helm handler tests for install/delete/list EE-1236

* fix variable name.  Add package comment/description

added helper method to get helm cluster access

addressed rebase conflicts

rbac for helm chart deletion (#702)

Update to latest libhelm fixes EE-1537

helm delete test

removed redundant file

removed redundant helm repo url

* resolved conflicts, updated code

* using endpoint middleware

* PR review fixes

* using constants, openapi updated

Co-authored-by: Matt Hook <hookenz@gmail.com>
Co-authored-by: dbuduev <3435359+dbuduev@users.noreply.github.com>

* fixed test conflicts, go linted

* feat(helm/templates-add): helm templates add repo for user support EE-1278 (#689)

* feat(kubeconfig): dynamic kubeconfig param generation support using service EE-1303 (#604)

* kubeconfig service initial implementation

kube config service tests

* kubeconfig service helm integration

fixed GetKubeConfig interface method

* updated log for kubeconfig service

* local pod now also uses config to enforce caller RBAC

* getCertificateAuthorityData refactor

* kubeconfig service struct and interfaces refactor

* Feat(helm): Helm url settings frontend (#590)

* change settings to include HelmRepositoryURL

* WIP settings update test

* finish frontend for helm charts URL in settings

* fix alignment for HelmRepositoryURL

* resolve conflicts on portainer.go

Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>

* feat(helm): helm repo url global settings DB migration EE-1477 (#654)

* db migration which sets initial helm repo url

* settings refactor to reflect backend struct attr order

* - removed redundant helper method
- utilising persisted helm repo url settings from DB migration

* removed activity logging from helm search and showGET requests

* addressed tech review issues

* feat(helm): helm cli integration and skeleton routes EE-1281 (#589)

* Initial import for skeleton helm integration

* added helm repo url to settings

* - fixed handler middleware
- updated swaggerdoc template to align closer to what we need

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* feat(helm) install a chart (#610)

* feat(helm): refactor to create a wrapper interface EE-943 (#619)

* helm code refactor to adhere to interface driven design
- better response documentation from swagger
- binary implementation switchable with library
- easier testing
- code is more similar/closer to official helm golang lib

* resolved merge conflict to get code running

* moved release helm model to package to align to helm lib

* fixed missing import

* added helm install tests

* removed redundant code

* refactored show to new structure

* validating show options

* migrated to using external helm lib

* Feat(helm): Helm url settings frontend (#590)

* change settings to include HelmRepositoryURL

* WIP settings update test

* finish frontend for helm charts URL in settings

* fix alignment for HelmRepositoryURL

* resolve conflicts on portainer.go

Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>

* bugfix: kubectl shell not opening

* feat(helm): helm cli integration and skeleton routes EE-1281 (#589)

* Initial import for skeleton helm integration

* added helm repo url to settings

* - fixed handler middleware
- updated swaggerdoc template to align closer to what we need

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* feat(kubeconfig): dynamic kubeconfig param generation support using service EE-1303 (#604)

* kubeconfig service initial implementation

kube config service tests

* kubeconfig service helm integration

fixed GetKubeConfig interface method

* updated log for kubeconfig service

* local pod now also uses config to enforce caller RBAC

* getCertificateAuthorityData refactor

* kubeconfig service struct and interfaces refactor

* feat(helm): refactor to create a wrapper interface EE-943 (#619)

* helm code refactor to adhere to interface driven design
- better response documentation from swagger
- binary implementation switchable with library
- easier testing
- code is more similar/closer to official helm golang lib

* resolved merge conflict to get code running

* moved release helm model to package to align to helm lib

* fixed missing import

* added helm install tests

* removed redundant code

* refactored show to new structure

* validating show options

* feat(helm): Add new URL for User Repo into DB EE-1444 (#655)

* helm user repo

* rbac

* fix error messages

* fix url

* PR feedback

* check for duplicates

* updated user helm repo swagger endpoint urls

Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>
Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* feat(helm) get index for user repo EE-1445 (#662)

* EE-1278 enhance the helm template endpoint to get other charts

* Expand the index search functionality for user repos as well.

* Add 400 to swagger

* feat(helm/repo): helm repo search via query param (#664)

* using repo query parameter instead of base64 encoded url

* added portainer.HelmUserRepositoryService to struct to fix broken unit tests

Co-authored-by: zees-dev <63374656+zees-dev@users.noreply.github.com>

* feat(helm/add-repo): support for adding repos for user EE-1447 (#663)

* add repo FE implementation

* throw error on duplicate repo url for frontend

* improved request url parsing

* feat(helm/repo-add): support rendering of multiple helm repo templates EE-1451 (#670)

* get helm repo for user service and factory updates for new endpoint

* query param added to templates url for helm service and factory

* - rename templates -> charts as that is more accurate and explicit
- adding helm repo loads it into template list
- refactor helm list loading to load user repos and global settings repo in parallel

* added comments to explain code

* promises moved to try block

* feat(helm/templates): variable repo support for helm show endpoint EE-1504 (#675)

* variable repo support for helm show endpoint

* updated service and factory to utilise updated helm show endpoint

* updated charts list to also include respective helm repo

* - rename template -> chart
- using updated helm service show method to get chart data

* fixed rebase conflicts

* updated search and show text

* rebased and updated code to remove dependency on datastore

* removed useractivitylogging in show handler

* analytics on helm add (#687)

* addressed rebase conflict

* feat(helm/add-repo): bugfix to install and fetching values EE-1278 (#693)

* fixed helm chart repo urls

* helm install can use variable repo url (not settings)

* added helper method to get helm cluster access

* - updated helm install to use helper method
- removed readPayload as it servers no purpose
- moved validate code below handler

* helm install openapi spec update

* resolved conflicts, updated code

* helm install using endpoint middleware

removed redundant provider import

* remove trailing slash from helm repo url upon persistent (#717)

* removed duplicate entry for helm repo url in settings

* feat(helm) extended helm repo validation EE-1554 (#719)

* feat(helm) check helm repo has index.yaml EE-1554

* Add validation test unit.  Enabled with INTEGRATION_TEST=1 env var

* fix pass by reference problem

* improved testing and validation

* Helm repo validation moved into libhelm. Global helm repo now validated with libhelm validator as well

* libhelm update

* updated helm lib to use updated search repo. doesn't need trailing slash removed now

* feat(helm/userrepo) return global repo as part of user repo EE-1562 (#729)

* user repo list now now shows global repo EE-1562

* user helm repos now sends back an object.  FE changed to support it

* Tech review changes.  Use PascalCase on json to match other code

* use authenticated access to allow ordinary user to read their helm-repos

* resolved conflicts, updated code

* fixed helm_install handler unit test

* feat(helm/repo-add): user added helm repo validations (#731)

* - user cannot add existing repo if suffix is '/'
- user cannot add a repo which is already set in settings

* removed check for settings repo duplication

* added new role for helm repo create

* feat(helm/docs) fix broken swagger docs EE-1278 (#733)

* fix swagger docs

* fix typo

* fix(helm): fixed helm rbac issues by migrating code from user handler to helm (#734)

* - added new auth operation for listing charts
- updated handler with common authoriseHelmOperation (updated delete and install operations accordingly)
- migrated user_helm_repos to helm endpoint handler
- migrated api operations from user factory/service to helm factory/service
- passing endpointId into helm service/factory as endpoint provider is deprecated

* fixed swagger doc for user helm repo

* removed redundant console log

* update libhelm to hide secrets

Co-authored-by: Matt Hook <hookenz@gmail.com>

* dependency injection in helm factory

Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com>
Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>
Co-authored-by: Matt Hook <hookenz@gmail.com>
Co-authored-by: dbuduev <3435359+dbuduev@users.noreply.github.com>

* kubernetes.templates -> kubernetes.templates.helm name conflict fix

* Validate the URL added as a public helm repo (#736)

Co-authored-by: Matt Hook <hookenz@gmail.com>

* fix(helm): helm app deletion fix EE-1581 (#737)

* updated helm lib to show correct error on uninstall failure

* passing down helm app namespace on deletion

* fix(k8s): EE-1591 non-admin users cannot deploy charts containing secrets (#750)

Co-authored-by: Simon Meng <simon.meng@portainer.io>

* fix(helm): helm epic bugfixes EE-1582 EE-1593 (#739)

* - trim trailing slash and lowercase before persisting helm repo
- browser helm templates url /kubernetes/templates/templates -> /kubernetes/templates/helm
- fix publish url
- fix helm repo add refresh
- semi-fix k8s app expansion

* Tidy up swagger documentation related to helm. Make json consistent

* fixed helm release page for non-default namespaces

* ee-bug: fixed selected helm chart hiding

* k8s app view table expansion bugfix

* EE-1593: publish url load balancer fallback

Co-authored-by: Matt Hook <hookenz@gmail.com>

* k8s app list fix for charts with deployments containing multiple pods - which use the same label (#759)

* fix(kubernetes): app list view fix for secrets with long keys or values EE-1600 (#760)

* k8s app secrets key value text overflow ellipses

* wrapping key value pairs instead of ellipses

* fix(helm): helm apps bundling issue across different namespaces EE-1619 (#762)

* helm apps bundling issue across different namespaces

* - code comments and indentation to ease reading
- moved namespace calc out of loop

* feat(helm/test) disable slow helm search test by default EE-1599 (#758)

* skip helm_repo_search as it's an integration test

* switch to portainer built in integration test checker

* Don't print test struct out when skipping integration test

Co-authored-by: dbuduev <3435359+dbuduev@users.noreply.github.com>
Co-authored-by: Matt Hook <hookenz@gmail.com>
Co-authored-by: Dennis Buduev <“dbuduev@users.noreply.github.com”>
Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com>
Co-authored-by: cong meng <mcpacino@gmail.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
@Joshua2504
Copy link

Joshua2504 commented Aug 16, 2023

I'm not sure if this is fixed or not.

My domain is a sub-sub-domain: sub.sub.main.net
Portainer CE 2.18.4
Plesk acting as reverse proxy

My config:

location / {
	# Do not allow connections from docker 1.5 and earlier
	# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
	if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
		return 404;
	}

	proxy_pass                          http://localhost:9000;
	proxy_set_header  Host              $http_host;   # required for docker client's sake
	proxy_set_header  X-Real-IP         $remote_addr; # pass on real client's IP
	proxy_set_header  X-Forwarded-For   $proxy_add_x_forwarded_for;
	proxy_set_header  X-Forwarded-Proto $scheme;
	proxy_read_timeout                  900;
	client_max_body_size 10G;
}

I followed #609 (comment) and console works:

location / {
	# Do not allow connections from docker 1.5 and earlier
	# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
	if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
		return 404;
	}

	location /api/websocket/exec {
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
		proxy_http_version 1.1;
		proxy_pass http://localhost:9000/api/websocket/exec;
	}

	proxy_pass                          http://localhost:9000;
	proxy_set_header  Host              $http_host;   # required for docker client's sake
	proxy_set_header  X-Real-IP         $remote_addr; # pass on real client's IP
	proxy_set_header  X-Forwarded-For   $proxy_add_x_forwarded_for;
	proxy_set_header  X-Forwarded-Proto $scheme;
	proxy_read_timeout                  900;
	client_max_body_size 10G;
}

@Twistar60
Copy link

location /api/websocket/exec {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass http://portainer/api/websocket/exec;
}

I can confirm for at the time of this comment, this work perfectly. i had the issues on my proxy. Thanks @deviantony for the help!

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

No branches or pull requests

6 participants