Bug 1477133

Summary: pod page better to have link for env var which rc has on console
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: XiaochuanWang <xiaocwan>
Severity: low Docs Contact:
Priority: low    
Version: 3.6.0CC: aos-bugs, jforrest, jokerman, mmccomas, spadgett, wsun, yanpzhan
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:08:59 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:
Embargoed:
Attachments:
Description Flags
k8spod.png none

Description XiaochuanWang 2017-08-01 10:09:53 UTC
Description of problem:
Run a dc. Check environment variable for rc and pod, pod has no "Environment variables can be edited on the deployment configuration." with link to dc env page but rc does have it.

Version-Release number of selected component (if applicable):
openshift v3.6.173.0.1

How reproducible:
always

Steps to Reproduce:
1. $ oc run mydc --image=aosqe/hello-openshift
2. Go to pod page check environment: 
https://xxx.com/console/project/xiaocwan-p/browse/pods/mypod?tab=environment
3. Go to rc page (for compare)
https://xxx.com/console/project/xiaocwan-p/browse/rc/mydc-3?tab=environment


Actual results:
2. There is no fields to edit and add environment variables
Container mypod Environment Variables
The container specification has no environment variables set.
3. rc has "Environment variables can be edited on the deployment configuration." with link to dc env page

Expected results:
pod has no "Environment variables can be edited on the deployment  configuration." but rc does

Additional info:

Comment 1 Jessica Forrester 2017-12-14 20:02:43 UTC
A lot of things potentially own pods, we can't solely rely on the ownerRef so there will be a bit of logic to find the right place to link to. Like in the case of the DC -> RC -> Pod, its the DC we want you to edit.  But if it was a StatefulSet then we would go straight to the StatefulSet.

Comment 3 openshift-github-bot 2018-03-19 20:41:46 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/e9dc49874102747c00722aff1225019665ca173b
Bug 1477133 - Show link to owner on pod env tab

Link to the env tab of the owning resource.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1477133

https://github.com/openshift/origin-web-console/commit/327c51ae9a66a4ae81f1e535c7e51cf24c7ad91c
Merge pull request #2902 from spadgett/edit-env-var-msg

Automatic merge from submit-queue.

Bug 1477133 - Show link to owner on pod env tab

Link to the env tab of the owning resource.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1477133

/assign @benjaminapetersen

Comment 5 Yanping Zhang 2018-05-16 10:02:57 UTC
@Samuel, I checked on OCP v3.10.0-0.46.0, there is link on env tab of pod from dc, but no link on env tab of pod from StatefullSet. Do you plan to fix the StatefulSet pod in this bug?

Comment 6 Samuel Padgett 2018-05-16 11:53:41 UTC
I've created a follow-on fix for stateful sets:

https://github.com/openshift/origin-web-console/pull/3003

Comment 7 openshift-github-bot 2018-05-16 13:43:43 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/0a3a65e2f14ab85f79c3b7382838d7259d68df87
Bug 1477133 - Show link to stateful set on pod env tab

https://bugzilla.redhat.com/show_bug.cgi?id=1477133

https://github.com/openshift/origin-web-console/commit/d1ebdfca5fd9deb358740f85b447553b9e7e6ea4
Merge pull request #3003 from spadgett/stateful-set-pod-owner

Bug 1477133 - Show link to stateful set on pod env tab

Comment 8 Yanping Zhang 2018-05-17 02:08:00 UTC
Created attachment 1437734 [details]
k8spod.png

Comment 9 Yanping Zhang 2018-05-17 02:16:43 UTC
@Sam, there is another small issue for link on k8s pod env pod, it said "replica set" but "not deployment" in the prompt, and the link is redirected to the latest deployment page but not k8s deployment page. Could you also have a check? Pls refer to the attachment.

Comment 10 Samuel Padgett 2018-05-17 13:40:59 UTC
It's working as expected. We don't have a good way to know that the pod is for a specific deployment, so we link to the direct parent (replica set). I think that's going to have to be a limitation the way the API works.

Comment 11 Yanping Zhang 2018-07-06 03:10:44 UTC
OpenShift Master:
    v3.10.12 
Kubernetes Master:
    v1.10.0+b81c8f8 
OpenShift Web Console:
    v3.10.12 
Checked on OCP env with above version, now there is link on env tab of pod from StatefullSet. 
All issues have been fixed, pls move the bug to ON_QA, so that QE could verify it.

Comment 12 Wei Sun 2018-07-11 08:51:52 UTC
Per #comment11 , move it to VERIFIED

Comment 14 errata-xmlrpc 2018-07-30 19:08:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1816