Bug 1676786

Summary: cluster name should be correct in kubeconfig created from serviceaccount
Product: OpenShift Container Platform Reporter: shahan <hasha>
Component: Management ConsoleAssignee: Robb Hamilton <rhamilto>
Status: CLOSED DUPLICATE QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, jhadvig, jokerman, mmccomas, rhamilto, spadgett, yapei
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-11 14:03:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
kubeconfig generated by CLI
kubeconfig generated by console none

Description shahan 2019-02-13 08:46:55 UTC
Description of problem:
cluster name should be correct in kubeconfig created from serviceaccount

Version-Release number of selected component (if applicable):
cluster version: 4.0.0-0.nightly-2019-02-12-005016
console commit: e267fcf4e177da5858c5c63d021d4f19f71646b8

How reproducible:

Steps to Reproduce:
1.  goto Administration->serviceaccount->default page, click action-> Download kubeconfig file.
2.Check cluster name
3. check clustername via CLI
$ oc serviceaccounts create-kubeconfig default

Actual results:
2. clusters:
  - name: tectonic
      certificate-authority-data: >-

 - name: preserve-**-devcluster-openshift-com:6443

Expected results:
cluster name should be the right lb hostname.

Additional info:

Comment 1 Robb Hamilton 2019-02-28 16:39:02 UTC
PR to resolve: https://github.com/openshift/console/pull/1195

Comment 3 shahan 2019-03-07 03:31:13 UTC
  The content of kubeconfig generated by CLI is very different from the file created by console. more details see attachment.
Will it be a problem for the difference?

Comment 4 shahan 2019-03-07 03:34:42 UTC
Created attachment 1541650 [details]
kubeconfig generated by CLI

Comment 5 shahan 2019-03-07 03:36:29 UTC
Created attachment 1541651 [details]
kubeconfig generated by console

Comment 6 Robb Hamilton 2019-03-07 20:01:43 UTC
Good catch, shahan.  WIP PR to resolve: https://github.com/openshift/console/pull/1262

Comment 10 Samuel Padgett 2019-03-11 14:03:14 UTC
Currently the kubeconfig is not working correctly because the console has the wrong master public URL. This is the same underlying cause as bug 1664574.

*** This bug has been marked as a duplicate of bug 1664574 ***