Bug 1570159

Summary: [DOCS] Need to document replicasets
Product: OpenShift Container Platform Reporter: Steven Walter <stwalter>
Component: DocumentationAssignee: Gaurav Nelson <gnelson>
Status: CLOSED CURRENTRELEASE QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact: Vikram Goyal <vigoyal>
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, gnelson, jokerman, mmccomas, stwalter, yinzhou
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 04:42:41 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 Steven Walter 2018-04-20 18:35:55 UTC
Document URL: 

Section Number and Name: 
New section

Describe the issue: 
Our only documentation (other than API documentation) on replicasets is a link to the Kubernetes documentation. Given that the master web console (a vital and core component to the cluster) runs as part of a replicaset, we need official downstream documentation describing how to use it. Since we do not maintain the Kubernetes documentation we need a mirror or otherwise our own set of documentation now that the feature is fully supported.

Comment 2 Gaurav Nelson 2018-04-24 15:56:13 UTC
I have started working on this and will put up a PR soon.

Comment 3 Gaurav Nelson 2018-08-07 03:55:32 UTC
Tracking this in https://github.com/openshift/openshift-docs/pull/11410

Comment 4 Gaurav Nelson 2018-08-08 00:36:05 UTC
Hello Steven

Can you please check the PR https://github.com/openshift/openshift-docs/pull/11410 for changes.

I have only included informational bits as part of this PR. As Deployments is recommended rather than using ReplicaSets.

Comment 5 Steven Walter 2018-08-09 20:32:26 UTC
In the notation:
 <1> Set-based selector to filter keys. This selects all resources with key equal to `tier` and value equal to `frontend`. 

Does this mean to say, the replicaset will select any node with key of tier and value of frontend? What other resources could it select? Or am I misunderstanding this

Comment 6 Gaurav Nelson 2018-08-17 00:03:38 UTC
Thanks Steven, 

Yes, you are right, those are the resources it will select. 

This is from what I understood by reading the docs at https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements

If PR looks good, I can go ahead and merge it.

Comment 7 Steven Walter 2018-08-17 13:21:31 UTC
I think we should specify that the match labels can be used as a form of node selector, otherwise it looks good

Comment 8 Gaurav Nelson 2018-08-20 01:33:09 UTC
Thanks Steven,

I have included this in PR.

Comment 9 zhou ying 2018-08-20 07:08:54 UTC
Gaurav Nelson:

     I'm a little confused by `Equality-based selector to specify node selection criteria` is that meaning "nodeSelector"? 

     IMO, the `.spec.selector` field is the ReplicaSet manages all the pods with labels that match the selector. And the matchLabels and matchExpressions are ANDed together.

Comment 10 zhou ying 2018-08-20 07:38:35 UTC
And The `spec.template.metadata.labels` should be: tier: frontend.

Comment 11 Gaurav Nelson 2018-08-21 00:54:46 UTC
Thanks zhou ying for reviewing this,

I have updated the PR to include following changes:
- Equality-based selector to specify resources with labels that match the
- Changed `spec.template.metadata.labels` to `tier: frontend`

Comment 12 zhou ying 2018-08-21 01:15:05 UTC
Checked the PR ,LGTM, thanks.

Comment 13 openshift-github-bot 2018-08-27 23:53:42 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

Merge pull request #11410 from gaurav-nelson/bug1570159-fixes

BZ#1570159 - added replicasets