-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] PetSets / StatefulSets #1088
[WIP] PetSets / StatefulSets #1088
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change all references to petset to statefulset, also as soon as the rebase lands we will need to switch to requests statefulsets instead of petsets
@benjaminapetersen did you push those changes? |
also breadcrumb in your screen shot still says Pet Sets |
@jwforres updates pushed if you want to start taking a look. |
@@ -174,6 +174,11 @@ angular | |||
templateUrl: 'views/edit/deployment-config.html', | |||
controller: 'EditDeploymentConfigController' | |||
}) | |||
.when('/project/:project/browse/stateful-sets/:statefulset', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
capital S on Set in the param :statefulSet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, though the annoying thing about camelCase here is that it doesn't work in the controller when using $routeParams
. It will still be $routeParams.statefulset
:(
@@ -404,6 +409,9 @@ angular | |||
.when('/project/:project/browse/deployments-replicationcontrollers/:rc', { | |||
redirectTo: '/project/:project/browse/rc/:rc' | |||
}) | |||
.when('/project/:project/browse/pet-sets/:petset', { | |||
redirectTo: '/project/:project/browse/stateful-sets/:statefulset' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not anymore, but initially i was thinking we would get this in to support PetSets, then update to StatefulSets. Will remove.
group: 'apps', | ||
version: 'v1alpha1' | ||
}, context, function(statefulSets) { | ||
console.log('statefulSets?', statefulSets.by('metadata.name')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do. Assumed this block is tmp code till we agree it will land.
@@ -0,0 +1,90 @@ | |||
'use strict'; | |||
|
|||
// TODO: statefulSetController rename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this TODO now right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
ProjectsService) { | ||
|
||
$scope.projectName = $routeParams.project; | ||
$scope.statefulSetName = $routeParams.statefulset || $routeParams.petset; // TODO: eliminate petset fallback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will want to make sure we remove this before merging, why is this currently needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the above, was assuming we may merge & update.
<uib-tab-heading>Events</uib-tab-heading> | ||
<div class="resource-events"> | ||
<events | ||
resource-kind="PetSet" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO here to switch to stateful set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Generation</th> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of objects have Generation and we don't usually show it, I would probably just go with Name, Status, Created for now, we can discuss other options during design review thurs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
<td data-title="Status"> | ||
<status-icon status="statefulSet | deploymentStatus"></status-icon> | ||
{{statefulSet | deploymentStatus}} | ||
<span ng-if="(statefulSet | deploymentStatus) == 'Active' || (statefulSet | deploymentStatus) == 'Running'">, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm sure this was copied but these should really be triple equals ===
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
{{statefulSet | deploymentStatus}} | ||
<span ng-if="(statefulSet | deploymentStatus) == 'Active' || (statefulSet | deploymentStatus) == 'Running'">, | ||
<span ng-if="statefulSet.spec.replicas !== statefulSet.status.replicas">{{statefulSet.status.replicas}}/</span> | ||
{{statefulSet.spec.replicas}} replica<span ng-if="statefulSet.spec.replicas != 1">s</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!==
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
@@ -77,8 +116,11 @@ <h3 ng-if="(deployments | hashSize) || (replicaSets | hashSize)">Deployment Conf | |||
<div row class="status"> | |||
<status-icon status="replicationController | deploymentStatus" disable-animation></status-icon> | |||
<span flex> | |||
{{replicationController | deploymentStatus}}<span ng-if="(replicationController | deploymentStatus) == 'Active' || (replicationController | deploymentStatus) == 'Running'">, | |||
<span ng-if="replicationController.spec.replicas !== replicationController.status.replicas">{{replicationController.status.replicas}}/</span>{{replicationController.spec.replicas}} replica<span ng-if="replicationController.spec.replicas != 1">s</span></span> | |||
{{replicationController | deploymentStatus}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have introduced whitespace here that will cause the , to have a space in front of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bah, html. 😒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont forget you need to fix the fact that this is adding whitespace
851a739
to
ed67197
Compare
Ok, updated comments above. I think the only outstanding is:
Working on adding the donut now. |
the empty Storage section looks odd, if there is nothing under storage it
should at least have some text that says that.
Related, did you add the section for showing the volumes defined in the pod
spec vs showing the volumeClaimTemplate?
…On Tue, Jan 17, 2017 at 2:58 PM, Ben Petersen ***@***.***> wrote:
New screenshots, pushing code soon:
[image: screen shot 2017-01-17 at 2 57 54 pm]
<https://cloud.githubusercontent.com/assets/280512/22037511/659ee216-dcc5-11e6-9937-794d3cee8412.png>
[image: screen shot 2017-01-17 at 2 55 12 pm]
<https://cloud.githubusercontent.com/assets/280512/22037467/3c41296a-dcc5-11e6-8964-09cfbd041592.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZk7XLQR2yOkz9FRINpsExZL7yOKeh3ks5rTR10gaJpZM4LdCiI>
.
|
ed67197
to
7750476
Compare
@jwforres tinkering with the storage, including:
Add Storage gives me an error, but I'm diagnosing (I dont think this came from the API): |
no @spadgett has checks on those pages that restricts what kinds are allowed
…On Tue, Jan 17, 2017 at 4:12 PM, Ben Petersen ***@***.***> wrote:
@jwforres <https://github.com/jwforres> tinkering with the storage,
including:
- remove volume
- add storage
- add config files
Add Storage gives me an error, but I'm diagnosing (I dont think this came
from the API):
[image: screen shot 2017-01-17 at 4 11 20 pm]
<https://cloud.githubusercontent.com/assets/280512/22040091/aa77af44-dccf-11e6-917a-9b1338cc36dc.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZk7VXV__iJB0HN883s8k7UKNZUJ0BKks5rTS7NgaJpZM4LdCiI>
.
|
Heh, yeah all of those actions are forbidden. neverthemind :) |
Right, I added it to the allowed filter in the controllers, but the API response is still |
Hmm, so we have largely stopped saying PVC in a lot of places, I'm wondering if this should say something like "Storage Template" or "Provisioned Storage Template" and put that section right underneath the Template section, and then maybe Volumes should be called Attached Volumes instead? @spadgett thoughts? |
Either way it probably needs a help tip or something next to the storage template section that explains what it is, since its a new concept that only exists on stateful sets. Or if we are able to get a subsection in the new stateful set docs page that talks about it we could link to that |
@adellape ping! The above comment might be helpful for something we could use in the new docs page. |
Its probably worth trying, but I'm not sure what icon you would use for Access Mode. Also access mode needs to be humanized. |
the server icon should probably be the database icon instead, like the mount icon in the pod template |
Updated to the database icon, couple other options for the access mode icon: Disk icon for access mode: @ajacobs21e & (does liz have a github id?) |
0cc34ab
to
b28dc2b
Compare
@lizsurette re: the icons |
@benjaminapetersen I think the lock icon is fairly standard for representing something that deals with "permissions". Do you guys use that icon anywhere else? I just wouldn't want it to be used differently in two places and confuse anyone. @ajacobs21e |
@@ -196,6 +196,12 @@ angular.module("openshiftConsole") | |||
.segmentCoded(name.substring(0, ind)) | |||
.segmentCoded(name.substring(ind + 1)); | |||
break; | |||
// PetSet & StatefulSet handle the same | |||
case "PetSet" : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove this now correct?
<div | ||
ng-repeat="template in templates" | ||
class="pod-template"> | ||
<div class="component-label">Claim: {{template.metadata.name}}</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storage Claim:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
<span class="fa fa-database" aria-hidden="true"></span> | ||
</div> | ||
<div flex class="word-break"> | ||
<span class="pod-template-key">Storage:</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capacity:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
<div flex class="word-break"> | ||
<span class="pod-template-key">Access Modes:</span> | ||
<span ng-repeat="mode in template.spec.accessModes"> | ||
{{mode}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its not $last add a ', '
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<div class="row"> | ||
<div class="col-md-12"> | ||
<alerts alerts="alerts"></alerts> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assume this was moved intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just reset this file since im not working on this page anymore.
@@ -77,8 +116,11 @@ <h3 ng-if="(deployments | hashSize) || (replicaSets | hashSize)">Deployment Conf | |||
<div row class="status"> | |||
<status-icon status="replicationController | deploymentStatus" disable-animation></status-icon> | |||
<span flex> | |||
{{replicationController | deploymentStatus}}<span ng-if="(replicationController | deploymentStatus) == 'Active' || (replicationController | deploymentStatus) == 'Running'">, | |||
<span ng-if="replicationController.spec.replicas !== replicationController.status.replicas">{{replicationController.status.replicas}}/</span>{{replicationController.spec.replicas}} replica<span ng-if="replicationController.spec.replicas != 1">s</span></span> | |||
{{replicationController | deploymentStatus}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont forget you need to fix the fact that this is adding whitespace
LGTM, clean up the PR and let me know when you are ready for final review
…On Wed, Jan 18, 2017 at 4:28 PM, Ben Petersen ***@***.***> wrote:
Quick screenshot update, "selector" used a label icon:
[image: screen shot 2017-01-18 at 4 17 56 pm]
<https://cloud.githubusercontent.com/assets/280512/22083660/14db3d76-dd9b-11e6-8044-1403679682be.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZk7fcxb46q4jKELS7_vYTwd3gHfhmhks5rToP0gaJpZM4LdCiI>
.
|
b28dc2b
to
fa22ce7
Compare
@jwforres updated & squashed |
- Details, Environment, Metrics, Events - Edit YAML - Delete - Pods list - Annotations - Template & volume claim template - No support currently for scale/autoscale - hopefully API support in near future
fa22ce7
to
075d122
Compare
|
||
<div | ||
row class="pod-template-image icon-row" | ||
ng-if="template.spec.selector.matchLabels"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok looks like this is using the new type of selectors, we can do a follow-up PR tomorrow, but we should handle matchExpressions as well, can you make a TODO for that for tomorrow in your notebook :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benjaminapetersen We have a selector
directive now.
<selector selector="template.spec.selector"></selector>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, I'll update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm. So if I swap that in I get this:
@sg00dwin I think the css in the pod-template targeting div:first-child
is probably what is doing it, probably too greedy:
.icon-row div:first-child {
text-align: center;
width: 30px;
}
Pinging you before I update as this is used in a bunch of places.
[merge] |
Evaluated for origin web console merge up to 075d122 |
Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/935/) (Base Commit: 2cb38e1) |
yeah... that would fix it :)
…On Wed, Jan 18, 2017 at 8:05 PM, Sam Padgett ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In app/views/_volume-claim-templates.html
<#1088>:
> +
+ <div row class="pod-template-image icon-row">
+ <div>
+ <span class="fa fa-database" aria-hidden="true"></span>
+ </div>
+ <div flex class="word-break">
+ <span class="pod-template-key">Capacity:</span>
+ <span>
+ {{template.spec.resources.requests.storage}}
+ </span>
+ </div>
+ </div>
+
+ <div
+ row class="pod-template-image icon-row"
+ ng-if="template.spec.selector.matchLabels">
@benjaminapetersen <https://github.com/benjaminapetersen> We have a
selector directive now.
<selector selector="template.spec.selector"></selector>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1088>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ABZk7chdB03Fd2z15gVmfmGs52LFo4HOks5rTrbKgaJpZM4LdCiI>
.
|
@benjaminapetersen I didn't have a chance to read through all this until now. I agree with Liz, if we are using the lock elsewhere then I wouldn't use it here. Should readonly be read only or read-only? It looks funny to me as one word. Is it a common term to write it that way? |
Initial run at PetSets/StatefulSets
Currently supports:
Screenshots:
I have a running list of about 15 more tasks, but wanted to get this up here sooner than later & see if we can merge in PetSets in stages.
@jwforres @spadgett