openshift / openshift/oc

oc login should support proxy-url option

Open
#2,314 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
247
Forks
475
Avg merge
4d 9h
Merged PRs (30d)
11

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the oc login command and its kubeconfig handling, using the linked Kubernetes kubeconfig reference to confirm the proxy-url behavior. Support a --proxy-url value that configures the cluster without losing an existing setting, and verify behavior for proxy and non-proxy clusters, including interaction with HTTPS_PROXY.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
cli, networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.