Skip to content

Commit 9f3ba19

Browse files
committed
📝 docs: restructure README and upgrade chart to v0.1.2
- Reorganize README structure with clear Installation and Usage sections - Add Artifact Hub badge and repository metadata - Upgrade Helm Chart to v0.1.2 with comprehensive annotations - Simplify CI workflow helm install command - Improve values.yaml with English comments and better descriptions - Consolidate documentation across both English and Chinese versions
1 parent 8b7b8c0 commit 9f3ba19

6 files changed

Lines changed: 171 additions & 252 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ jobs:
113113
114114
```bash
115115
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
116-
--namespace cert-manager \
117-
--create-namespace \
118116
--version ${{ steps.version.outputs.version }}
119117
```
120118
env:

README.md

Lines changed: 58 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
<a href="https://github.com/crazygit/cert-manager-alidns-webhook/actions/workflows/ci.yaml">
1313
<img src="https://img.shields.io/github/actions/workflow/status/crazygit/cert-manager-alidns-webhook/ci.yaml?branch=master" alt="CI Status" />
1414
</a>
15-
1615
<a href="https://github.com/crazygit/cert-manager-alidns-webhook/releases">
1716
<img src="https://img.shields.io/github/v/release/crazygit/cert-manager-alidns-webhook" alt="Latest Release" />
1817
</a>
1918
<a href="https://github.com/crazygit/cert-manager-alidns-webhook/pkgs/container/cert-manager-alidns-webhook">
2019
<img src="https://img.shields.io/github/v/release/crazygit/cert-manager-alidns-webhook?include_prereleases&label=ghcr.io" alt="Docker Package" />
2120
</a>
21+
<a href="https://artifacthub.io/packages/search?repo=cert-manager-alidns-webhook">
22+
<img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/cert-manager-alidns-webhook" alt="Artifact Hub" />
23+
</a>
2224
<a href="https://codecov.io/github/crazygit/cert-manager-alidns-webhook" >
2325
<img src="https://codecov.io/github/crazygit/cert-manager-alidns-webhook/graph/badge.svg?token=SE1CACI9FY"/>
2426
</a>
@@ -33,9 +35,9 @@
3335

3436
## Introduction
3537

36-
This webhook enables cert-manager to solve DNS-01 challenges using Alibaba Cloud DNS.
38+
This webhook enables cert-manager to solve DNS-01 challenges using Alibaba Cloud DNS (AliDNS).
3739

38-
Unlike traditional solutions, this project adopts an **Infrastructure as Identity** design philosophy. By decoupling authentication from application configuration, the webhook server authenticates using its runtime environment identity (such as RRSA in ACK or ECS Instance Roles).
40+
Unlike traditional solutions, this project adopts an **Infrastructure as Identity** design philosophy. By decoupling authentication from application configuration, the webhook server authenticates using its runtime environment identity (such as RRSA in ACK or ECS Instance Roles), supporting the standard default credential chain of the Alibaba Cloud SDK.
3941

4042
### Core Features
4143

@@ -52,6 +54,8 @@ Unlike traditional solutions, this project adopts an **Infrastructure as Identit
5254

5355
### Design Philosophy Comparison
5456

57+
Traditional cert-manager webhook solutions often require explicit configuration of AccessKey/SecretKey in the `Issuer` or `ClusterIssuer` resource. This approach has several issues:
58+
5559
| Feature | Traditional Solutions | This Project |
5660
| :--------------------------- | :-------------------------- | :-------------------------------- |
5761
| **Auth Config Location** | In Issuer/ClusterIssuer | In Webhook Server itself |
@@ -100,11 +104,11 @@ This webhook uses Alibaba Cloud [`credentials-go`](https://github.com/aliyun/cre
100104

101105
---
102106

103-
## Quick Start
107+
## Installation
104108

105109
### Prerequisites
106110

107-
- Kubernetes 1.19+
111+
- Kubernetes 1.34+
108112
- Helm 3.0+
109113
- cert-manager v1.19.0+ installed
110114
- Alibaba Cloud DNS account
@@ -118,22 +122,22 @@ RRSA (RAM Roles for Service Accounts) is the recommended authentication method f
118122

119123
- RRSA feature enabled in your ACK cluster
120124
- `ack-pod-identity-webhook` component installed
121-
- Namespace labeled with `pod-identity.alibabacloud.com/injection: on` OR `AutoInjectSTSEnvVars` set to `true` in `ack-pod-identity-webhook`
125+
- Namespace labeled with `pod-identity.alibabacloud.com/injection: on`
122126

123-
If you're unsure whether these conditions are met, refer to the documentation:
127+
If you're unsure whether these conditions are met, refer to the documentation to check and configure step by step:
124128

125129
[Use RRSA to Authorize Pods to Access Different Cloud Services](https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/use-rrsa-to-authorize-pods-to-access-different-cloud-services)
126130

127131
```bash
128-
# 3. Install webhook using Helm
129-
helm install cert-manager-alidns-webhook ./deploy/cert-manager-alidns-webhook \
130-
--namespace cert-manager \
131-
--create-namespace \
132+
# Install webhook using Helm
133+
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
132134
--set aliyunAuth.rrsa.enabled=true \
133-
--set aliyunAuth.rrsa.roleName="<ROLE_NAME>"
135+
--set aliyunAuth.rrsa.roleName=<YOUR_ROLE_NAME>
134136
```
135137

136-
**Note**: Replace `<ROLE_NAME>` with your RAM role name (not the full ARN), and ensure the role has AliDNS operation permissions:
138+
#### Authorize RRSA Role
139+
140+
Please replace `<YOUR_ROLE_NAME>` with your RAM role name. Ensure the role has AliDNS operation permissions:
137141

138142
```json
139143
{
@@ -149,36 +153,20 @@ helm install cert-manager-alidns-webhook ./deploy/cert-manager-alidns-webhook \
149153
"Resource": "*",
150154
"Effect": "Allow"
151155
},
152-
{
153-
"Action": "alidns:UpdateDomainRecord",
154-
"Resource": "*",
155-
"Effect": "Allow"
156-
},
157156
{
158157
"Action": "alidns:DescribeDomainRecords",
159158
"Resource": "*",
160159
"Effect": "Allow"
161-
},
162-
{
163-
"Action": "alidns:DescribeDomains",
164-
"Resource": "*",
165-
"Effect": "Allow"
166160
}
167161
]
168162
}
169163
```
170164

171-
### Method 2: Using AccessKey (For Testing Only)
172-
173-
<details>
174-
<summary>Click to expand AccessKey configuration</summary>
175-
176-
For testing or non-production environments:
165+
### Method 2: Using AccessKey
177166

178167
```bash
179-
# Method 1: Direct values (not recommended for production)
180-
helm install cert-manager-alidns-webhook ./deploy/cert-manager-alidns-webhook \
181-
--namespace cert-manager \
168+
# Method 1: Direct values
169+
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
182170
--set aliyunAuth.accessKeyID=<YOUR_ACCESS_KEY_ID> \
183171
--set aliyunAuth.accessKeySecret=<YOUR_ACCESS_KEY_SECRET>
184172

@@ -187,121 +175,92 @@ kubectl create secret generic alidns-credentials \
187175
--from-literal=accessKeyID=<YOUR_ACCESS_KEY_ID> \
188176
--from-literal=accessKeySecret=<YOUR_ACCESS_KEY_SECRET>
189177

190-
helm install cert-manager-alidns-webhook ./deploy/cert-manager-alidns-webhook \
191-
--namespace cert-manager \
178+
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
192179
--set aliyunAuth.existingSecret=alidns-credentials
193180
```
194181

195-
</details>
196-
197182
### Method 3: On ACK ECS with Instance RAM Role
198183

199-
If your Kubernetes cluster runs on Alibaba Cloud ECS with an instance RAM role assigned:
184+
If your Kubernetes cluster runs on Alibaba Cloud ECS with an instance RAM role assigned and the [required permissions](#authorize-rrsa-role) bound to that role, no additional authentication configuration is needed:
200185

201186
```bash
202-
helm install cert-manager-alidns-webhook ./deploy/cert-manager-alidns-webhook \
203-
--namespace cert-manager
187+
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook
204188
```
205189

206190
### Method 4: Using config.json File
207191

208-
For local development or special scenarios:
192+
For local development or special scenarios, mount the Alibaba Cloud configuration file via ConfigMap:
209193

210194
```bash
211195
# 1. Create ConfigMap with config.json
212196
kubectl create configmap aliyun-config \
213197
--from-file=config.json=/path/to/.aliyun/config.json
214198

215199
# 2. Install webhook using Helm
216-
helm install cert-manager-alidns-webhook ./deploy/cert-manager-alidns-webhook \
217-
--namespace cert-manager \
200+
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
218201
--set aliyunAuth.configJSON.enabled=true \
219202
--set aliyunAuth.configJSON.configMapName=aliyun-config
220203
```
221204

222-
### Installing from OCI Registry
223-
224-
You can also install the webhook directly from the GitHub Container Registry:
225-
226-
```bash
227-
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
228-
--namespace cert-manager \
229-
--create-namespace \
230-
--version 0.1.0
231-
```
232-
233-
To install the latest version:
234-
235-
```bash
236-
helm install cert-manager-alidns-webhook oci://ghcr.io/crazygit/helm-charts/cert-manager-alidns-webhook \
237-
--namespace cert-manager \
238-
--create-namespace
239-
```
240-
241205
---
242206

243207
## Usage Guide
244208

245-
### Create an Issuer
209+
### Create a ClusterIssuer
246210

247211
```yaml
248212
apiVersion: cert-manager.io/v1
249-
kind: Issuer
213+
kind: ClusterIssuer
250214
metadata:
251-
name: letsencrypt-aliyun
252-
namespace: default
215+
name: letsencrypt-prod-dns01
253216
spec:
254217
acme:
255-
server: https://acme-v02.api.letsencrypt.org/directory
256-
email: your-email@example.com
257218
privateKeySecretRef:
258-
name: letsencrypt-aliyun
219+
name: letsencrypt-prod-dns01-key
220+
server: https://acme-v02.api.letsencrypt.org/directory
259221
solvers:
260222
- dns01:
261223
webhook:
262-
groupName: alidns.crazygit.github.io
224+
groupName: alidns.crazygit.github.io # Must match the groupName used during Helm installation
263225
solverName: alidns
264226
```
265227
266-
### Create a ClusterIssuer (Recommended)
228+
### Create an Issuer
267229
268230
```yaml
269231
apiVersion: cert-manager.io/v1
270-
kind: ClusterIssuer
232+
kind: Issuer
271233
metadata:
272-
name: letsencrypt-aliyun-prod
234+
name: letsencrypt-prod-dns01
235+
namespace: default
273236
spec:
274237
acme:
275-
server: https://acme-v02.api.letsencrypt.org/directory
276-
email: your-email@example.com
277238
privateKeySecretRef:
278-
name: letsencrypt-aliyun-prod
239+
name: letsencrypt-prod-dns01-key
240+
server: https://acme-v02.api.letsencrypt.org/directory
279241
solvers:
280242
- dns01:
281243
webhook:
282-
groupName: alidns.crazygit.github.io
244+
groupName: alidns.crazygit.github.io # Must match the groupName used during Helm installation
283245
solverName: alidns
284246
```
285247
286-
### Issue a Certificate
248+
---
287249
288-
```yaml
289-
apiVersion: cert-manager.io/v1
290-
kind: Certificate
291-
metadata:
292-
name: example-com
293-
namespace: default
294-
spec:
295-
secretName: example-com-tls
296-
dnsNames:
297-
- example.com
298-
- "*.example.com"
299-
issuerRef:
300-
name: letsencrypt-aliyun
301-
kind: Issuer
302-
```
250+
## Uninstall
303251
304-
---
252+
```bash
253+
# Uninstall webhook
254+
helm uninstall cert-manager-alidns-webhook
255+
256+
# If Secret was used, delete it
257+
kubectl delete secret alidns-credentials
258+
259+
# If ConfigMap was used, delete it
260+
kubectl delete configmap aliyun-config
261+
262+
# Delete created Issuer or ClusterIssuer
263+
```
305264

306265
## Configuration Reference
307266

@@ -342,7 +301,7 @@ For development details, see [DEVELOPMENT.md](DEVELOPMENT.md).
342301
This is expected during the first attempt. cert-manager performs a dry run before creating the actual challenge. Check logs for the real error.
343302

344303
```bash
345-
kubectl logs -n cert-manager deployment/cert-manager-alidns-webhook
304+
kubectl logs deployment/cert-manager-alidns-webhook
346305
```
347306

348307
</details>
@@ -371,10 +330,10 @@ Check the following:
371330

372331
```bash
373332
# View ServiceAccount configuration
374-
kubectl get sa -n cert-manager cert-manager-alidns-webhook -o yaml
333+
kubectl get sa cert-manager-alidns-webhook -o yaml
375334

376335
# View webhook logs
377-
kubectl logs -n cert-manager deployment/cert-manager-alidns-webhook
336+
kubectl logs deployment/cert-manager-alidns-webhook
378337
```
379338

380339
</details>
@@ -383,10 +342,10 @@ kubectl logs -n cert-manager deployment/cert-manager-alidns-webhook
383342

384343
```bash
385344
# View webhook logs
386-
kubectl logs -n cert-manager deployment/cert-manager-alidns-webhook
345+
kubectl logs deployment/cert-manager-alidns-webhook
387346

388347
# View cert-manager logs
389-
kubectl logs -n cert-manager deployment/cert-manager
348+
kubectl logs deployment/cert-manager
390349
```
391350

392351
---
@@ -410,18 +369,6 @@ kubectl logs -n cert-manager deployment/cert-manager
410369

411370
---
412371

413-
## RBAC
414-
415-
The webhook requires the following Kubernetes permissions:
416-
417-
- Read access to `extension-apiserver-authentication-reader` Role
418-
- `system:auth-delegator` ClusterRole
419-
- Custom ClusterRole for API group `alidns.crazygit.github.io`
420-
421-
These are automatically created by the Helm Chart.
422-
423-
---
424-
425372
## Contributing
426373

427374
Contributions are welcome! Please feel free to submit a Pull Request.
@@ -448,4 +395,4 @@ This project is based on the [cert-manager/webhook-example](https://github.com/c
448395

449396
<p align="center">
450397
<sub>Built with ❤️ by the open source community</sub>
451-
</p>
398+
</p>

0 commit comments

Comments
 (0)