Skip to content

Commit 3a4c220

Browse files
Wei WengWei Weng
authored andcommitted
fix read me
Signed-off-by: Wei Weng <[email protected]>
1 parent c7f378f commit 3a4c220

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

charts/hub-agent/README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documen
5959
| `enableGuardRail` | Enable guard rail webhook configurations | `true` |
6060
| `webhookClientConnectionType` | Connection type for webhook client (service or url) | `service` |
6161
| `useCertManager` | Use cert-manager for webhook certificate management | `false` |
62-
| `cert-manager.installCRDs` | Install cert-manager CRDs (only when useCertManager=true) | `true` |
6362
| `enableV1Beta1APIs` | Watch for v1beta1 APIs | `true` |
6463
| `hubAPIQPS` | QPS for fleet-apiserver (not including events/node heartbeat) | `250` |
6564
| `hubAPIBurst` | Burst for fleet-apiserver (not including events/node heartbeat) | `1000` |
@@ -75,25 +74,32 @@ _See [helm install](https://helm.sh/docs/helm/helm_install/) for command documen
7574

7675
The hub-agent supports two modes for webhook certificate management:
7776

78-
### Self-Signed Certificates (Default)
77+
### Automatic Certificate Generation (Default)
7978

80-
By default, the hub-agent generates self-signed certificates automatically. This mode:
79+
By default, the hub-agent generates certificates automatically at startup. This mode:
8180
- Requires no external dependencies
8281
- Works out of the box
8382
- Certificates are valid for 10 years
84-
- Suitable for most use cases
8583

8684
### cert-manager (Optional)
8785

8886
When `useCertManager=true`, certificates are managed by cert-manager. This mode:
89-
- Automatically installs cert-manager as a dependency
90-
- Handles certificate rotation automatically
87+
- Requires cert-manager to be installed as a prerequisite
88+
- Handles certificate rotation automatically (90-day certificates)
9189
- Follows industry-standard certificate management practices
92-
- Requires running `helm dependency update` before installation
90+
- Suitable for production environments
9391

9492
To switch to cert-manager mode:
9593
```console
96-
cd charts/hub-agent
97-
helm dependency update
98-
helm install hub-agent . --set useCertManager=true
94+
# Install cert-manager first
95+
helm repo add jetstack https://charts.jetstack.io
96+
helm repo update
97+
helm install cert-manager jetstack/cert-manager \
98+
--namespace cert-manager \
99+
--create-namespace \
100+
--version v1.16.2 \
101+
--set crds.enabled=true
102+
103+
# Then install hub-agent with cert-manager enabled
104+
helm install hub-agent ./charts/hub-agent --set useCertManager=true
99105
```

charts/hub-agent/templates/certificate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ spec:
1111
# Secret name where cert-manager will store the certificate
1212
secretName: fleet-webhook-server-cert
1313

14-
# Certificate duration (10 years to match self-signed cert behavior)
15-
duration: 87600h # 10 years
14+
# Certificate duration (90 days is cert-manager's default and recommended)
15+
duration: 2160h # 90 days
1616

1717
# Renew certificate 30 days before expiry
1818
renewBefore: 720h # 30 days

0 commit comments

Comments
 (0)