Skip to content

Commit

Permalink
Fix grammer, spell, and punctuation issues in api description. (#318)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
xuezhaojun authored Feb 8, 2024
1 parent abaf09c commit 480f8ab
Show file tree
Hide file tree
Showing 18 changed files with 96 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ spec:
schema:
openAPIV3Schema:
description: ClusterManagementAddOn represents the registration of an add-on
to the cluster manager. This resource allows the user to discover which
add-on is available for the cluster manager and also provides metadata information
about the add-on. This resource also provides a linkage to ManagedClusterAddOn,
the name of the ClusterManagementAddOn resource will be used for the namespace-scoped
to the cluster manager. This resource allows you to discover which add-ons
are available for the cluster manager and provides metadata information
about the add-ons. The ClusterManagementAddOn name is used for the namespace-scoped
ManagedClusterAddOn resource. ClusterManagementAddOn is a cluster-scoped
resource.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: AddOnDeploymentConfig represents a deployment configuration for
an add-on.
description: AddOnDeploymentConfig represents a configuration to customize
the deployments of an add-on. For example, you can specify the NodePlacement
to control the scheduling of the add-on agents.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down
3 changes: 2 additions & 1 deletion addon/v1alpha1/types_addondeploymentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// AddOnDeploymentConfig represents a deployment configuration for an add-on.
// AddOnDeploymentConfig represents a configuration to customize the deployments of an add-on.
// For example, you can specify the NodePlacement to control the scheduling of the add-on agents.
type AddOnDeploymentConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
7 changes: 3 additions & 4 deletions addon/v1alpha1/types_clustermanagementaddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ import (
// +kubebuilder:printcolumn:name="CRD NAME",type=string,JSONPath=`.spec.addOnConfiguration.crdName`

// ClusterManagementAddOn represents the registration of an add-on to the cluster manager.
// This resource allows the user to discover which add-on is available for the cluster manager and
// also provides metadata information about the add-on.
// This resource also provides a linkage to ManagedClusterAddOn, the name of the ClusterManagementAddOn
// resource will be used for the namespace-scoped ManagedClusterAddOn resource.
// This resource allows you to discover which add-ons are available for the cluster manager
// and provides metadata information about the add-ons. The ClusterManagementAddOn name is used
// for the namespace-scoped ManagedClusterAddOn resource.
// ClusterManagementAddOn is a cluster-scoped resource.
type ClusterManagementAddOn struct {
metav1.TypeMeta `json:",inline"`
Expand Down
4 changes: 2 additions & 2 deletions addon/v1alpha1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,18 @@ spec:
schema:
openAPIV3Schema:
description: "ManagedCluster represents the desired state and current status
of managed cluster. ManagedCluster is a cluster scoped resource. The name
is the cluster UID. \n The cluster join process follows a double opt-in
process: \n 1. Agent on managed cluster creates CSR on hub with cluster
UID and agent name. 2. Agent on managed cluster creates ManagedCluster on
hub. 3. Cluster admin on hub approves the CSR for UID and agent name of
the ManagedCluster. 4. Cluster admin sets spec.acceptClient of ManagedCluster
to true. 5. Cluster admin on managed cluster creates credential of kubeconfig
to hub. \n Once the hub creates the cluster namespace, the Klusterlet agent
on the ManagedCluster pushes the credential to the hub to use against the
kube-apiserver of the ManagedCluster."
of a managed cluster. ManagedCluster is a cluster-scoped resource. The name
is the cluster UID. \n The cluster join process is a double opt-in process.
See the following join process steps: \n 1. The agent on the managed cluster
creates a CSR on the hub with the cluster UID and agent name. 2. The agent
on the managed cluster creates a ManagedCluster on the hub. 3. The cluster
admin on the hub cluster approves the CSR for the UID and agent name of
the ManagedCluster. 4. The cluster admin sets the spec.acceptClient of the
ManagedCluster to true. 5. The cluster admin on the managed cluster creates
a credential of the kubeconfig for the hub cluster. \n After the hub cluster
creates the cluster namespace, the klusterlet agent on the ManagedCluster
pushes the credential to the hub cluster to use against the kube-apiserver
of the ManagedCluster."
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down
22 changes: 11 additions & 11 deletions cluster/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ import (
// +kubebuilder:printcolumn:JSONPath=`.status.conditions[?(@.type=="ManagedClusterConditionAvailable")].status`,name="Available",type=string
// +kubebuilder:printcolumn:JSONPath=`.metadata.creationTimestamp`,name="Age",type=date

// ManagedCluster represents the desired state and current status of managed
// cluster. ManagedCluster is a cluster scoped resource. The name is the cluster
// UID.
// ManagedCluster represents the desired state and current status
// of a managed cluster. ManagedCluster is a cluster-scoped resource. The name
// is the cluster UID.
//
// The cluster join process follows a double opt-in process:
// The cluster join process is a double opt-in process. See the following join process steps:
//
// 1. Agent on managed cluster creates CSR on hub with cluster UID and agent name.
// 2. Agent on managed cluster creates ManagedCluster on hub.
// 3. Cluster admin on hub approves the CSR for UID and agent name of the ManagedCluster.
// 4. Cluster admin sets spec.acceptClient of ManagedCluster to true.
// 5. Cluster admin on managed cluster creates credential of kubeconfig to hub.
// 1. The agent on the managed cluster creates a CSR on the hub with the cluster UID and agent name.
// 2. The agent on the managed cluster creates a ManagedCluster on the hub.
// 3. The cluster admin on the hub cluster approves the CSR for the UID and agent name of the ManagedCluster.
// 4. The cluster admin sets the spec.acceptClient of the ManagedCluster to true.
// 5. The cluster admin on the managed cluster creates a credential of the kubeconfig for the hub cluster.
//
// Once the hub creates the cluster namespace, the Klusterlet agent on the ManagedCluster
// pushes the credential to the hub to use against the kube-apiserver of the ManagedCluster.
// After the hub cluster creates the cluster namespace, the klusterlet agent on the ManagedCluster pushes
// the credential to the hub cluster to use against the kube-apiserver of the ManagedCluster.
type ManagedCluster struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion cluster/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ spec:
to workload namespaces; 4. Namespace-scoped Placements specify a slice of
ManagedClusterSets which select a working set of potential ManagedClusters;
5. Then Placements subselect from that working set using label/claim selection.
\n No ManagedCluster will be selected if no ManagedClusterSet is bound to
the placement namespace. User is able to bind a ManagedClusterSet to a namespace
by creating a ManagedClusterSetBinding in that namespace if they have a
RBAC rule to CREATE on the virtual subresource of `managedclustersets/bind`.
\n A slice of PlacementDecisions with label cluster.open-cluster-management.io/placement={placement
\n A ManagedCluster will not be selected if no ManagedClusterSet is bound
to the placement namespace. A user is able to bind a ManagedClusterSet to
a namespace by creating a ManagedClusterSetBinding in that namespace if
they have an RBAC rule to CREATE on the virtual subresource of `managedclustersets/bind`.
\n A slice of PlacementDecisions with the label cluster.open-cluster-management.io/placement={placement
name} will be created to represent the ManagedClusters selected by this
placement. \n If a ManagedCluster is selected and added into the PlacementDecisions,
other components may apply workload on it; once it is removed from the PlacementDecisions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ spec:
- name: v1beta1
schema:
openAPIV3Schema:
description: "PlacementDecision indicates a decision from a placement PlacementDecision
should has a label cluster.open-cluster-management.io/placement={placement
name} to reference a certain placement. \n If a placement has spec.numberOfClusters
specified, the total number of decisions contained in status.decisions of
PlacementDecisions should always be NumberOfClusters; otherwise, the total
number of decisions should be the number of ManagedClusters which match
the placement requirements. \n Some of the decisions might be empty when
there are no enough ManagedClusters meet the placement requirements."
description: "PlacementDecision indicates a decision from a placement. PlacementDecision
must have a cluster.open-cluster-management.io/placement={placement name}
label to reference a certain placement. \n If a placement has spec.numberOfClusters
specified, the total number of decisions contained in the status.decisions
of PlacementDecisions must be the same as NumberOfClusters. Otherwise, the
total number of decisions must equal the number of ManagedClusters that
match the placement requirements. \n Some of the decisions might be empty
when there are not enough ManagedClusters to meet the placement requirements."
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand Down
8 changes: 4 additions & 4 deletions cluster/v1beta1/types_placement.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import (
// of potential ManagedClusters;
// 5. Then Placements subselect from that working set using label/claim selection.
//
// No ManagedCluster will be selected if no ManagedClusterSet is bound to the placement
// namespace. User is able to bind a ManagedClusterSet to a namespace by creating a
// ManagedClusterSetBinding in that namespace if they have a RBAC rule to CREATE on the virtual
// A ManagedCluster will not be selected if no ManagedClusterSet is bound to the placement
// namespace. A user is able to bind a ManagedClusterSet to a namespace by creating a
// ManagedClusterSetBinding in that namespace if they have an RBAC rule to CREATE on the virtual
// subresource of `managedclustersets/bind`.
//
// A slice of PlacementDecisions with label cluster.open-cluster-management.io/placement={placement name}
// A slice of PlacementDecisions with the label cluster.open-cluster-management.io/placement={placement name}
// will be created to represent the ManagedClusters selected by this placement.
//
// If a ManagedCluster is selected and added into the PlacementDecisions, other components may
Expand Down
13 changes: 6 additions & 7 deletions cluster/v1beta1/types_placementdecision.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +kubebuilder:resource:scope="Namespaced"
// +kubebuilder:subresource:status

// PlacementDecision indicates a decision from a placement
// PlacementDecision should has a label cluster.open-cluster-management.io/placement={placement name}
// to reference a certain placement.
// PlacementDecision indicates a decision from a placement.
// PlacementDecision must have a cluster.open-cluster-management.io/placement={placement name} label to reference a certain placement.
//
// If a placement has spec.numberOfClusters specified, the total number of decisions contained in
// status.decisions of PlacementDecisions should always be NumberOfClusters; otherwise, the total
// number of decisions should be the number of ManagedClusters which match the placement requirements.
// the status.decisions of PlacementDecisions must be the same as NumberOfClusters. Otherwise, the
// total number of decisions must equal the number of ManagedClusters that
// match the placement requirements.
//
// Some of the decisions might be empty when there are no enough ManagedClusters meet the placement
// requirements.
// Some of the decisions might be empty when there are not enough ManagedClusters to meet the placement requirements.
type PlacementDecision struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand Down
Loading

0 comments on commit 480f8ab

Please sign in to comment.