Skip to content

oc login should support proxy-url option #2314

Description

@jkupferer

The oc login command does not currently support the proxy-url option supported in the kubeconfig:

https://kubernetes.io/docs/reference/config-api/kubeconfig.v1/

Ideally it would be possible to pass something like --proxy-url=http://squid.redhat.com:3128 and oc login would use the proxy setting the same as if HTTPS_PROXY were set and configure the proxy-url setting for the cluster in the kubeconfig.

Current behavior is unfortunate because if proxy-url is manually set in the kubeconfig it works for normal commands, but when oc login is run again it not only doesn't work, but when HTTPS_PROXY environment variable is set it removes the proxy-url setting, breaking functionality for other oc commands.

This functionality is particularly important for cases where multiple clusters are managed through oc and some should use a proxy, some not, or different proxy servers should be used for different clusters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions