Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

kubernetes.stream with proxy #156

Closed
Closed

Description

@AyliD

Seems like even though i have setup proxy to all of my k8s python api calls i cannot use stream in order to perform the call to connect_get_namespaced_pod_exec

c = client.Configuration()
c.proxy = proxy_url
client.Configuration.set_default(c)

stream(api.connect_get_namespaced_pod_exec, 'some_name', 'default', command="/bin/sh", stderr=True, stdin=False, stdout=True, tty=True)

the class 'WSClient' doesnt seem to take this into account:
Example for the cod e i expected:

ws.connect = ('wss://blabla.com', http_proxy_host='ip', http_proxy_port='8080')

Activity

  1. AyliD commented on Aug 29, 2019

    @AyliD
    ContributorAuthor

    The exception im getting prior to fix is:

        (data) = self.connect_get_namespaced_pod_exec_with_http_info(name, namespace, **kwargs)
      File "/data/users/ayeletrd/fbsource/fbcode/buck-out/dev/gen/express_wifi/partners/setup/standalone/partner_setup#link-tree/kubernetes/client/apis/core_v1_api.py", line 935, in connect_get_namespaced
    _pod_exec_with_http_info
        collection_formats=collection_formats)
      File "/data/users/ayeletrd/fbsource/fbcode/buck-out/dev/gen/express_wifi/partners/setup/standalone/partner_setup#link-tree/kubernetes/client/api_client.py", line 334, in call_api
        _return_http_data_only, collection_formats, _preload_content, _request_timeout)
      File "/data/users/ayeletrd/fbsource/fbcode/buck-out/dev/gen/express_wifi/partners/setup/standalone/partner_setup#link-tree/kubernetes/client/api_client.py", line 168, in __call_api
        _request_timeout=_request_timeout)
      File "/data/users/ayeletrd/fbsource/fbcode/buck-out/dev/gen/express_wifi/partners/setup/standalone/partner_setup#link-tree/kubernetes/stream/stream.py", line 31, in _intercept_request_call
        return ws_client.websocket_call(config, *args, **kwargs)
      File "/data/users/ayeletrd/fbsource/fbcode/buck-out/dev/gen/express_wifi/partners/setup/standalone/partner_setup#link-tree/kubernetes/stream/ws_client.py", line 259, in websocket_call
        raise ApiException(status=0, reason=str(e))
    kubernetes.client.rest.ApiException: (0)
    
  2. AyliD commented on Aug 29, 2019

    @AyliD
    ContributorAuthor

    For all other API calls (except the exec) proxy works great.

    resp = api.read_namespaced_pod(name=name, namespace='default')
    print(f"{type(resp)}")
    <class 'kubernetes.client.models.v1_pod.V1Pod'>
    
  3. yliaog commented on Sep 3, 2019

    @yliaog
    Contributor

    /assign @roycaihw

  4. fejta-bot commented on Dec 2, 2019

    @fejta-bot

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle stale

  5. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Dec 2, 2019
  6. fejta-bot commented on Jan 1, 2020

    @fejta-bot

    Stale issues rot after 30d of inactivity.
    Mark the issue as fresh with /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle rotten

  7. added
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jan 1, 2020
  8. fejta-bot commented on Jan 31, 2020

    @fejta-bot

    Rotten issues close after 30d of inactivity.
    Reopen the issue with /reopen.
    Mark the issue as fresh with /remove-lifecycle rotten.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /close

  9. k8s-ci-robot commented on Jan 31, 2020

    @k8s-ci-robot
    Contributor

    @fejta-bot: Closing this issue.

    Details

    In response to this:

    Rotten issues close after 30d of inactivity.
    Reopen the issue with /reopen.
    Mark the issue as fresh with /remove-lifecycle rotten.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /close

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Metadata

Metadata

Assignees

Labels

lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions