Skip to content

Commit 075e159

Browse files
committed
update doc
1 parent 44b8308 commit 075e159

File tree

4 files changed

+56
-2
lines changed

4 files changed

+56
-2
lines changed

versions/kruise-game/next/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,56 @@ The following table lists the configurable parameters of the kruise-game chart a
3131
| `network.totalWaitTime` | Maximum time to wait for network ready, the unit is seconds | `60` |
3232
| `network.probeIntervalTime` | Time interval for detecting network status, the unit is seconds | `5` |
3333
| `cloudProvider.installCRD` | Whether to install CloudProvider CRD | `true` |
34+
| `certificates.autoGenerated` | Whether to auto-generate webhook certificates | `true` |
35+
| `certificates.secretName` | Name of the secret containing webhook certificates | `kruise-game-certs` |
36+
| `certificates.mountPath` | Path to mount webhook certificates in container | `/tmp/webhook-certs/` |
37+
| `certificates.certManager.enabled` | Whether to use cert-manager for certificate management | `false` |
38+
| `certificates.certManager.duration` | Certificate validity duration | `8760h0m0s` |
39+
| `certificates.certManager.renewBefore` | Time before expiry to renew certificate | `5840h0m0s` |
40+
| `certificates.certManager.generateCA` | Whether to generate a Certificate Authority | `true` |
41+
| `certificates.certManager.caSecretName` | Name of the secret containing the CA certificate | `kruise-game-ca` |
42+
| `certificates.certManager.issuer.generate` | Whether to generate the issuer automatically | `true` |
43+
| `certificates.certManager.issuer.name` | Name of the certificate issuer | `kruise-ca` |
44+
| `certificates.certManager.issuer.kind` | Type of the certificate issuer | `ClusterIssuer` |
45+
| `certificates.certManager.issuer.group` | API group of the certificate issuer | `cert-manager.io` |
3446

3547

3648
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
3749

50+
### Certificate Management
51+
52+
> **Important**: Kruise Game webhook requires TLS certificates for secure communication. Regardless of which certificate management method you choose, you must ensure that the webhook certificate is signed by a trusted CA certificate, and that the CA certificate is properly configured in the Kubernetes cluster so that the API Server can verify the webhook's identity.
53+
54+
Kruise Game supports two methods for webhook certificate management:
55+
56+
#### Auto-generated Certificates (Default)
57+
58+
By default, kruise-game uses auto-generated certificates for webhook TLS:
59+
60+
```bash
61+
$ helm install kruise-game https://... --set certificates.autoGenerated=true
62+
```
63+
64+
#### cert-manager Integration
65+
66+
For production environments, you can use cert-manager to manage webhook certificates:
67+
68+
```bash
69+
$ helm install kruise-game https://... \
70+
--set certificates.autoGenerated=false \
71+
--set certificates.certManager.enabled=true \
72+
```
73+
74+
You can also use a custom issuer instead of generating one:
75+
76+
```bash
77+
$ helm install kruise-game https://... \
78+
--set certificates.certManager.enabled=true \
79+
--set certificates.certManager.issuer.generate=false \
80+
--set certificates.certManager.issuer.name=my-custom-issuer \
81+
--set certificates.certManager.issuer.kind=Issuer
82+
```
83+
3884
### Optional: the local image for China
3985

4086
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:

versions/kruise-game/next/templates/manager.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ spec:
101101
volumeMounts:
102102
- mountPath: /etc/kruise-game
103103
name: provider-config
104+
{{- if not .Values.certificates.autoGenerated}}
104105
- mountPath: {{ .Values.certificates.mountPath }}
105106
name: certificates
107+
{{- end }}
106108
topologySpreadConstraints:
107109
- labelSelector:
108110
matchLabels:
@@ -124,8 +126,10 @@ spec:
124126
path: config.toml
125127
name: kruise-game-manager-config
126128
name: provider-config
129+
{{- if not .Values.certificates.autoGenerated }}
127130
- name: certificates
128131
secret:
129132
defaultMode: 420
130133
secretName: {{ .Values.certificates.secretName}}
131134
optional: {{ and .Values.certificates.autoGenerated ( not .Values.certificates.certManager.enabled ) }}
135+
{{- end }}

versions/kruise-game/next/templates/webhooks/mutatingconfiguration.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.certificates.autoGenerated }}
12
apiVersion: admissionregistration.k8s.io/v1
23
kind: MutatingWebhookConfiguration
34
metadata:
@@ -39,4 +40,5 @@ webhooks:
3940
matchExpressions:
4041
- key: game.kruise.io/owner-gss
4142
operator: Exists
42-
sideEffects: None
43+
sideEffects: None
44+
{{- end}}

versions/kruise-game/next/templates/webhooks/validatingconfiguration.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.certificates.autoGenerated }}
12
apiVersion: admissionregistration.k8s.io/v1
23
kind: ValidatingWebhookConfiguration
34
metadata:
@@ -37,4 +38,5 @@ webhooks:
3738
resources:
3839
- gameserversets
3940
sideEffects: None
40-
timeoutSeconds: 10
41+
timeoutSeconds: 10
42+
{{- end}}

0 commit comments

Comments
 (0)