Skip to content

Commit 25626ff

Browse files
authored
fix: correct typos and improve clarity in documentation and code comments (#310)
1 parent 486ea02 commit 25626ff

File tree

11 files changed

+110
-110
lines changed

11 files changed

+110
-110
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
- Feat: add lifecycle field for gameserverset. https://github.com/openkruise/kruise-game/pull/162
8484

8585
### Bug Fixes
86-
- Fix the allocation error when Ali loadbalancers reache the limit of ports number. https://github.com/openkruise/kruise-game/pull/149
86+
- Fix the allocation error when Ali loadbalancers reach the limit of ports number. https://github.com/openkruise/kruise-game/pull/149
8787
- Fix: AmazonWebServices-NLB controller parameter modification. https://github.com/openkruise/kruise-game/pull/164
8888
- Fix old svc remain after pod recreate when using ali-lb models. https://github.com/openkruise/kruise-game/pull/165
8989

@@ -155,7 +155,7 @@
155155
- Change autoscaler trigger metricType from Value to AverageValue. https://github.com/openkruise/kruise-game/pull/64
156156
- Decouple triggering network update from Gs Ready. https://github.com/openkruise/kruise-game/pull/71
157157
- Add reserveIds when init asts. https://github.com/openkruise/kruise-game/pull/73
158-
- AlibabaCloud-SLB support muti-slbIds. https://github.com/openkruise/kruise-game/pull/69/commits/42b8ab3e739c872f477d4faa7286ace3a87a07d6
158+
- AlibabaCloud-SLB supports multi-slbIds. https://github.com/openkruise/kruise-game/pull/69/commits/42b8ab3e739c872f477d4faa7286ace3a87a07d6
159159

160160

161161
### Bug Fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OpenKruiseGame has the following core features:
5454
* Independent of cloud service providers
5555
* Complex game server orchestration
5656

57-
### Users of OpenKruiseGame(OKG)
57+
### Users of OpenKruiseGame (OKG)
5858

5959
<table>
6060
<tr style="border: none;">

apis/v1alpha1/gameserver_types.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ type GameServerContainer struct {
5252
// Name indicates the name of the container to update.
5353
Name string `json:"name"`
5454
// Image indicates the image of the container to update.
55-
// When Image updated, pod.spec.containers[*].image will be updated immediately.
55+
// When Image is updated, pod.spec.containers[*].image will be updated immediately.
5656
Image string `json:"image,omitempty"`
5757
// Resources indicates the resources of the container to update.
58-
// When Resources updated, pod.spec.containers[*].Resources will be not updated immediately,
59-
// which will be updated when pod recreate.
58+
// When Resources are updated, pod.spec.containers[*].Resources will not be updated immediately,
59+
// which will be updated when the pod is recreated.
6060
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
6161
}
6262

@@ -98,7 +98,7 @@ type ServiceQuality struct {
9898
type ServiceQualityCondition struct {
9999
Name string `json:"name"`
100100
Status string `json:"status,omitempty"`
101-
// Result indicate the probe message returned by the script
101+
// Result indicates the probe message returned by the script
102102
Result string `json:"result,omitempty"`
103103
LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"`
104104
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
@@ -107,8 +107,8 @@ type ServiceQualityCondition struct {
107107

108108
type ServiceQualityAction struct {
109109
State bool `json:"state"`
110-
// Result indicate the probe message returned by the script.
111-
// When Result is defined, it would exec action only when the according Result is actually returns.
110+
// Result indicates the probe message returned by the script.
111+
// When Result is defined, it would exec action only when the corresponding Result is actually returned.
112112
Result string `json:"result,omitempty"`
113113
GameServerSpec `json:",inline"`
114114
Annotations map[string]string `json:"annotations,omitempty"`
@@ -148,7 +148,7 @@ type GameServerCondition struct {
148148
// Unique, one-word, CamelCase reason for the condition's last transition.
149149
// +optional
150150
Reason string `json:"reason,omitempty"`
151-
// Human-readable message indicating details about last transition.
151+
// Human-readable message indicating details about the last transition.
152152
// +optional
153153
Message string `json:"message,omitempty"`
154154
}

apis/v1alpha1/gameserverset_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ type RollingUpdateStatefulSetStrategy struct {
137137
Paused bool `json:"paused,omitempty"`
138138
// UnorderedUpdate contains strategies for non-ordered update.
139139
// If it is not nil, pods will be updated with non-ordered sequence.
140-
// Noted that UnorderedUpdate can only be allowed to work with Parallel podManagementPolicy
140+
// Note that UnorderedUpdate can only be allowed to work with Parallel podManagementPolicy
141141
// +optional
142142
// UnorderedUpdate *kruiseV1beta1.UnorderedUpdateStrategy `json:"unorderedUpdate,omitempty"`
143143
// InPlaceUpdateStrategy contains strategies for in-place update.
@@ -199,7 +199,7 @@ type GameServerSetStatus struct {
199199
//+genclient
200200
//+kubebuilder:object:root=true
201201
//+kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of GameServers."
202-
//+kubebuilder:printcolumn:name="CURRENT",type="integer",JSONPath=".status.currentReplicas",description="The number of currently all GameServers."
202+
//+kubebuilder:printcolumn:name="CURRENT",type="integer",JSONPath=".status.currentReplicas",description="The total number of current GameServers."
203203
//+kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of GameServers updated."
204204
//+kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of GameServers ready."
205205
//+kubebuilder:printcolumn:name="Maintaining",type="integer",JSONPath=".status.maintainingReplicas",description="The number of GameServers Maintaining."

cloudprovider/amazonswebservices/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ enable = true
1515
max_port = 32050
1616
min_port = 32001
1717
```
18-
### Preparation ###
18+
### Preparation: ###
1919

2020
Due to the difference in AWS design, to achieve NLB port-to-Pod port mapping, three types of CRD resources need to be created: Listener/TargetGroup/TargetGroupBinding
2121

22-
#### Deploy elbv2-controller
22+
#### Deploy elbv2-controller:
2323

2424
Definition and controller for Listener/TargetGroup CRDs: https://github.com/aws-controllers-k8s/elbv2-controller. This project links k8s resources with AWS cloud resources. Download the chart: https://gallery.ecr.aws/aws-controllers-k8s/elbv2-chart, example value.yaml:
2525

@@ -34,14 +34,14 @@ aws:
3434
3535
The key to deploying this project lies in authorizing the k8s ServiceAccount to access the NLB SDK, which is recommended to be done through an IAM role:
3636
37-
##### Step 1Enable OIDC provider for the EKS cluster
37+
##### Step 1:Enable OIDC provider for the EKS cluster
3838
3939
1. Sign in to the AWS Management Console.
40-
2. Navigate to the EKS consolehttps://console.aws.amazon.com/eks/
40+
2. Navigate to the EKS console:https://console.aws.amazon.com/eks/
4141
3. Select your cluster.
4242
4. On the cluster details page, ensure that the OIDC provider is enabled. Obtain the OIDC provider URL for the EKS cluster. In the "Configuration" section of the cluster details page, find the "OpenID Connect provider URL".
4343
44-
##### Step 2Configure the IAM role trust policy
44+
##### Step 2:Configure the IAM role trust policy
4545
1. In the IAM console, create a new identity provider and select "OpenID Connect".
4646
- For the Provider URL, enter the OIDC provider URL of your EKS cluster.
4747
- For Audience, enter: `sts.amazonaws.com`
@@ -68,12 +68,12 @@ The key to deploying this project lies in authorizing the k8s ServiceAccount to
6868
]
6969
}
7070
```
71-
- Replace `<AWS_ACCOUNT_ID>``<REGION>``<OIDC_ID>``<NAMESPACE>` and `<SERVICE_ACCOUNT_NAME>` with your actual values.
71+
- Replace `<AWS_ACCOUNT_ID>`,`<REGION>`,`<OIDC_ID>`,`<NAMESPACE>` and `<SERVICE_ACCOUNT_NAME>` with your actual values.
7272
- Add the permission `ElasticLoadBalancingFullAccess`
7373

7474

7575

76-
#### Deploy AWS Load Balancer Controller
76+
#### Deploy AWS Load Balancer Controller:
7777

7878
CRD and controller for TargetGroupBinding: https://github.com/kubernetes-sigs/aws-load-balancer-controller/
7979

@@ -97,15 +97,15 @@ Official deployment documentation: https://docs.aws.amazon.com/eks/latest/usergu
9797
- Meaning: Fill in the health check parameters for the nlb target group, can be left blank to use default values.
9898
- Format: Separate each configuration with a comma. For example: "healthCheckEnabled:true,healthCheckIntervalSeconds:30,healthCheckPath:/health,healthCheckPort:8081,healthCheckProtocol:HTTP,healthCheckTimeoutSeconds:10,healthyThresholdCount:5,unhealthyThresholdCount:2"
9999
- Support for change: Yes
100-
- Parameter explanation
101-
- **healthCheckEnabled**Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
102-
- **healthCheckIntervalSeconds**The approximate amount of time, in seconds, between health checks of an individual target. The range is 5-300. If the target group protocol is TCP, TLS, UDP, TCP_UDP, HTTP, or HTTPS, the default is 30 seconds. If the target group protocol is GENEVE, the default is 10 seconds. If the target type is lambda, the default is 35 seconds.
103-
- **healthCheckPath**The destination for health checks on the targets. For HTTP/HTTPS health checks, this is the path. For GRPC protocol version, this is the path of a custom health check method with the format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck.
104-
- **healthCheckPort**The port the load balancer uses when performing health checks on targets. The default is traffic-port, which is the port on which each target receives traffic from the load balancer. If the protocol is GENEVE, the default is port 80.
105-
- **healthCheckProtocol**The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers and Gateway Load Balancers, the default is TCP. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.
106-
- **healthCheckTimeoutSeconds**The amount of time, in seconds, during which no response from a target means a failed health check. The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS, or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda, the default is 30 seconds.
107-
- **healthyThresholdCount**The number of consecutive health check successes required before considering a target healthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP, or HTTPS, the default is 5. For target groups with a protocol of GENEVE, the default is 5. If the target type is lambda, the default is 5.
108-
- **unhealthyThresholdCount**The number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP, or HTTPS, the default is 2. For target groups with a protocol of GENEVE, the default is 2. If the target type is lambda, the default is 5.
100+
- Parameter explanation:
101+
- **healthCheckEnabled**: Indicates whether health checks are enabled. If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance, ip, or alb, health checks are always enabled and cannot be disabled.
102+
- **healthCheckIntervalSeconds**: The approximate amount of time, in seconds, between health checks of an individual target. The range is 5-300. If the target group protocol is TCP, TLS, UDP, TCP_UDP, HTTP, or HTTPS, the default is 30 seconds. If the target group protocol is GENEVE, the default is 10 seconds. If the target type is lambda, the default is 35 seconds.
103+
- **healthCheckPath**: The destination for health checks on the targets. For HTTP/HTTPS health checks, this is the path. For GRPC protocol version, this is the path of a custom health check method with the format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck.
104+
- **healthCheckPort**: The port the load balancer uses when performing health checks on targets. The default is traffic-port, which is the port on which each target receives traffic from the load balancer. If the protocol is GENEVE, the default is port 80.
105+
- **healthCheckProtocol**: The protocol the load balancer uses when performing health checks on targets. For Application Load Balancers, the default is HTTP. For Network Load Balancers and Gateway Load Balancers, the default is TCP. The GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks.
106+
- **healthCheckTimeoutSeconds**: The amount of time, in seconds, during which no response from a target means a failed health check. The range is 2–120 seconds. For target groups with a protocol of HTTP, the default is 6 seconds. For target groups with a protocol of TCP, TLS, or HTTPS, the default is 10 seconds. For target groups with a protocol of GENEVE, the default is 5 seconds. If the target type is lambda, the default is 30 seconds.
107+
- **healthyThresholdCount**: The number of consecutive health check successes required before considering a target healthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP, or HTTPS, the default is 5. For target groups with a protocol of GENEVE, the default is 5. If the target type is lambda, the default is 5.
108+
- **unhealthyThresholdCount**: The number of consecutive health check failures required before considering a target unhealthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, UDP, TLS, HTTP, or HTTPS, the default is 2. For target groups with a protocol of GENEVE, the default is 2. If the target type is lambda, the default is 5.
109109

110110
#### PortProtocols
111111
- Meaning: Ports and protocols exposed by the pod, supports specifying multiple ports/protocols.

cloudprovider/jdcloud/README.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,36 @@ max_port = 700
1616
min_port = 500
1717
```
1818

19-
### Parameter
19+
### Parameters
2020
#### NlbIds
21-
- Meaningfill in the id of the clb. You can fill in more than one. You need to create the clb in [JdCloud].
22-
- Valueeach clbId is divided by `,` . For example`netlb-aaa,netlb-bbb,...`
23-
- ConfigurableY
21+
- Meaning: fill in the id of the clb. You can fill in more than one. You need to create the clb in [JdCloud].
22+
- Value: each clbId is divided by `,` . For example:`netlb-aaa,netlb-bbb,...`
23+
- Configurable: Y
2424

2525
#### PortProtocols
26-
- Meaningthe ports and protocols exposed by the pod, support filling in multiple ports/protocols
27-
- Value`port1/protocol1`,`port2/protocol2`,... The protocol names must be in uppercase letters.
28-
- ConfigurableY
26+
- Meaning: the ports and protocols exposed by the pod, support filling in multiple ports/protocols
27+
- Value: `port1/protocol1`,`port2/protocol2`,... The protocol names must be in uppercase letters.
28+
- Configurable: Y
2929

3030
#### Fixed
31-
- Meaningwhether the mapping relationship is fixed. If the mapping relationship is fixed, the mapping relationship remains unchanged even if the pod is deleted and recreated.
32-
- Valuefalse / true
33-
- ConfigurableY
31+
- Meaning: whether the mapping relationship is fixed. If the mapping relationship is fixed, the mapping relationship remains unchanged even if the pod is deleted and recreated.
32+
- Value: false / true
33+
- Configurable: Y
3434

3535
#### AllocateLoadBalancerNodePorts
36-
- MeaningWhether the generated service is assigned nodeport, this can be set to false only in nlb passthrough mode
37-
- Valuefalse / true
38-
- ConfigurableY
36+
- Meaning: Whether the generated service is assigned nodeport, this can be set to false only in nlb passthrough mode
37+
- Value: false / true
38+
- Configurable: Y
3939

4040
#### AllowNotReadyContainers
41-
- Meaningthe container names that are allowed not ready when inplace updating, when traffic will not be cut.
42-
- Value{containerName_0},{containerName_1},... egsidecar
43-
- ConfigurableIt cannot be changed during the in-place updating process.
41+
- Meaning: the container names that are allowed not ready when inplace updating, when traffic will not be cut.
42+
- Value:{containerName_0},{containerName_1},... eg: sidecar
43+
- Configurable: It cannot be changed during the in-place updating process.
4444

4545
#### Annotations
46-
- Meaningthe anno added to the service
47-
- Valuekey1:value1,key2:value2...
48-
- ConfigurableY
46+
- Meaning: the anno added to the service
47+
- Value: key1: value1,key2: value2...
48+
- Configurable: Y
4949

5050

5151
### Example
@@ -81,23 +81,23 @@ spec:
8181
- name: Annotations
8282
#Fill in the anno related to clb on the service
8383
#The format is as follows: {key1}:{value1},{key2}:{value2}...
84-
value: "key1:value1,key2:value2"
84+
value: "key1: value1,key2: value2"
8585
gameServerTemplate:
8686
spec:
8787
containers:
8888
- args:
8989
- /data/server/start.sh
9090
command:
9191
- /bin/bash
92-
image: gss-cn-north-1.jcr.service.jdcloud.com/gsshosting/pal:v1
92+
image: gss-cn-north-1.jcr.service.jdcloud.com/gsshosting/pal: v1
9393
name: game-server
9494
EOF
9595
```
9696

9797
Check the network status in GameServer:
9898
```
9999
networkStatus:
100-
createTime: "2024-11-04T08:00:20Z"
100+
createTime: "2024-11-04T08: 00: 20Z"
101101
currentNetworkState: Ready
102102
desiredNetworkState: Ready
103103
externalAddresses:
@@ -112,7 +112,7 @@ networkStatus:
112112
- name: "8211"
113113
port: 8211
114114
protocol: UDP
115-
lastTransitionTime: "2024-11-04T08:00:20Z"
115+
lastTransitionTime: "2024-11-04T08: 00: 20Z"
116116
networkType: JdCloud-NLB
117117
```
118118

@@ -127,27 +127,27 @@ JdCloud Container Service supports binding an Elastic Public IP directly to a po
127127
### Parameter
128128

129129
#### BandwidthConfigName
130-
- MeaningThe bandwidth of the Elastic Public IP, measured in Mbps, has a value range of [1, 1024].
131-
- ValueMust be an integer
132-
- ConfigurableY
130+
- Meaning: The bandwidth of the Elastic Public IP, measured in Mbps, has a value range of [1, 1024].
131+
- Value: Must be an integer
132+
- Configurable: Y
133133

134134
#### ChargeTypeConfigName
135-
- MeaningThe billing method for the Elastic Public IP
136-
- Valuestring, `postpaid_by_usage`/`postpaid_by_duration`
137-
- ConfigurableY
135+
- Meaning: The billing method for the Elastic Public IP
136+
- Value: string, `postpaid_by_usage`/`postpaid_by_duration`
137+
- Configurable: Y
138138

139139
#### FixedEIPConfigName
140-
- MeaningWhether to fixed the Elastic Public IP,if so, the EIP will not be changed when the pod is recreated.
141-
- Valuestring, "false" / "true"
142-
- ConfigurableY
140+
- Meaning: Whether to fixed the Elastic Public IP,if so, the EIP will not be changed when the pod is recreated.
141+
- Value: string, "false" / "true"
142+
- Configurable: Y
143143

144144
#### AssignEIPConfigName
145-
- MeaningWhether to designate a specific Elastic Public IP. If true, provide the ID of the Elastic Public IP; otherwise, an EIP will be automatically allocated.
146-
- Valuestring, "false" / "true"
145+
- Meaning: Whether to designate a specific Elastic Public IP. If true, provide the ID of the Elastic Public IP; otherwise, an EIP will be automatically allocated.
146+
- Value: string, "false" / "true"
147147

148148
#### EIPIdConfigName
149-
- MeaningIf a specific Elastic Public IP is designated, the ID of the Elastic Public IP must be provided, and the component will automatically perform the lookup and binding.
150-
- Valuestring,for example`fip-xxxxxxxx`
149+
- Meaning: If a specific Elastic Public IP is designated, the ID of the Elastic Public IP must be provided, and the component will automatically perform the lookup and binding.
150+
- Value: string,for example:`fip-xxxxxxxx`
151151

152152
### Example
153153
```yaml
@@ -163,7 +163,7 @@ spec:
163163
- /data/server/start.sh
164164
command:
165165
- /bin/bash
166-
image: gss-cn-north-1.jcr.service.jdcloud.com/gsshosting/pal:v1
166+
image: gss-cn-north-1.jcr.service.jdcloud.com/gsshosting/pal: v1
167167
name: game-server
168168
network:
169169
networkType: JdCloud-EIP
@@ -181,13 +181,13 @@ EOF
181181
Check the network status in GameServer:
182182
```
183183
networkStatus:
184-
createTime: "2024-11-04T10:53:14Z"
184+
createTime: "2024-11-04T10: 53: 14Z"
185185
currentNetworkState: Ready
186186
desiredNetworkState: Ready
187187
externalAddresses:
188188
- ip: xxx.xxx.xxx.xxx
189189
internalAddresses:
190190
- ip: 10.0.0.95
191-
lastTransitionTime: "2024-11-04T10:53:14Z"
191+
lastTransitionTime: "2024-11-04T10: 53: 14Z"
192192
networkType: JdCloud-EIP
193193
```

0 commit comments

Comments
 (0)