-
Notifications
You must be signed in to change notification settings - Fork 26
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
docs: Add API reference #592
Conversation
docs/api-references.md
Outdated
|
||
|
||
### Resource Types | ||
- [InternalMemberCluster](#internalmembercluster) |
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.
please only include external facing API
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.
Sure👌
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 will hide InternalMemberCluster
and AppliedWorks
.
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.
Also removed reference to v1alpha1 APIs.
|
||
|
||
| Field | Description | | ||
| --- | --- | |
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.
Confusion on why there are two kind
s and two apiVersion
s
- [MemberClusterList](#memberclusterlist) | ||
|
||
| Field | Description | | ||
| --- | --- | |
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.
Same as MemberClusterList, why is there two?
|
||
|
||
|
||
ClusterResourceBinding represents a scheduling decision that binds a group of resources to a cluster. It MUST have a label named `CRPTrackingLabel` that points to the cluster resource policy that creates 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.
Since this is the first instance of CRPTrackingLabel
I recommend putting what it is here as well, or instead.
|
||
|
||
ClusterResourcePlacement is used to select cluster scoped resources, including built-in resources and custom resources, and placement them onto selected member clusters in a fleet. | ||
If a namespace is selected, ALL the resources under the namespace are placed to the target clusters. Note that you can't select the following resources: - reserved namespaces including: default, kube-* (reserved for Kubernetes system namespaces), fleet-* (reserved for fleet system namespaces). - reserved fleet resource types including: MemberCluster, InternalMemberCluster, ClusterResourcePlacement, ClusterSchedulingPolicySnapshot, ClusterResourceSnapshot, ClusterResourceBinding, etc. |
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.
Bold the note for reserved namespaces to be sure the user catches it.
|
||
|
||
ClusterResourcePlacement is used to select cluster scoped resources, including built-in resources and custom resources, and placement them onto selected member clusters in a fleet. | ||
If a namespace is selected, ALL the resources under the namespace are placed to the target clusters. Note that you can't select the following resources: - reserved namespaces including: default, kube-* (reserved for Kubernetes system namespaces), fleet-* (reserved for fleet system namespaces). - reserved fleet resource types including: MemberCluster, InternalMemberCluster, ClusterResourcePlacement, ClusterSchedulingPolicySnapshot, ClusterResourceSnapshot, ClusterResourceBinding, etc. |
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.
@ryanzhang-oss are we wanting to include InternalMemberCluster here?
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.
no, that's an internal object.
|
||
| Field | Description | | ||
| --- | --- | | ||
| `resourceSelectors` _[ClusterResourceSelector](#clusterresourceselector) array_ | ResourceSelectors is an array of selectors used to select cluster scoped resources. The selectors are `ORed`. You can have 1-100 selectors. | |
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.
Define ORed, this might be the first time a user sees this.
|
||
|
||
|
||
Manifest represents a resource to be deployed on spoke cluster. |
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.
First mention of spoke cluster might need a small definition
|
||
|
||
|
||
PlacementPolicy contains the rules to select target member clusters to place the selected resources. Note that only clusters that are both joined and satisfying the rules will be selected. |
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.
Make the note bold
|
||
| Field | Description | | ||
| --- | --- | | ||
| `weight` _integer_ | Weight associated with matching the corresponding clusterSelectorTerm, in the range [-100, 100]. | |
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.
Explain what negative weight does vs positive.
Hi @britaniar ! Thanks so much for the comments. The tricky part is, this is an auto-generated file; the contents are pulled from the comments in the source code through the journey of development, and to fix them we would need a separate PR to update the code, the CRDs, and release them first, which is a little bit difficult to follow through considering the timeframe and CCOA restrictions. If possible, I could keep your comments in a GitHub issue, and make the required edits when we are out of the embargo; would this be OK? |
I think that would be okay! |
|
||
### Resource Types | ||
- [MemberCluster](#membercluster) | ||
- [MemberClusterList](#memberclusterlist) |
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.
do we need this?
- [ClusterResourceBinding](#clusterresourcebinding) | ||
- [ClusterResourcePlacement](#clusterresourceplacement) | ||
- [ClusterResourceSnapshot](#clusterresourcesnapshot) | ||
- [ClusterSchedulingPolicySnapshot](#clusterschedulingpolicysnapshot) | ||
- [Work](#work) | ||
- [WorkList](#worklist) |
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 we order this list by the importance of the object like put CRP first followed by Work and the rest more internal fields.
- [ClusterResourceBinding](#clusterresourcebinding) | ||
- [ClusterResourcePlacement](#clusterresourceplacement) | ||
- [ClusterResourceSnapshot](#clusterresourcesnapshot) | ||
- [ClusterSchedulingPolicySnapshot](#clusterschedulingpolicysnapshot) | ||
- [Work](#work) | ||
- [WorkList](#worklist) |
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 we move the list?
|
||
|
||
ClusterResourcePlacement is used to select cluster scoped resources, including built-in resources and custom resources, and placement them onto selected member clusters in a fleet. | ||
If a namespace is selected, ALL the resources under the namespace are placed to the target clusters. Note that you can't select the following resources: - reserved namespaces including: default, kube-* (reserved for Kubernetes system namespaces), fleet-* (reserved for fleet system namespaces). - reserved fleet resource types including: MemberCluster, InternalMemberCluster, ClusterResourcePlacement, ClusterSchedulingPolicySnapshot, ClusterResourceSnapshot, ClusterResourceBinding, etc. |
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.
no, that's an internal object.
4e2da86
to
05e6063
Compare
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 need this link to link to Azure doc
Description of your changes
This PR adds API reference documentation.
How has this code been tested
N/A
Special notes for your reviewer
N/A