You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight framework for building Kubernetes admission webhooks with automatic TLS certificate management.
4
9
5
10
## Features
@@ -148,7 +153,7 @@ webhooks:
148
153
name: my-webhook
149
154
namespace: default
150
155
path: /mutate-pods
151
-
port: 8443
156
+
port: 443
152
157
caBundle: ""# auto-populated by the framework
153
158
rules:
154
159
- operations: ["CREATE"]
@@ -179,12 +184,35 @@ rules:
179
184
180
185
## Environment Variables
181
186
187
+
All configuration options can be set via environment variables with the `ACW_` prefix. Configuration priority: **code > environment variables > defaults**.
188
+
182
189
| Variable | Description | Default |
183
190
|----------|-------------|---------|
184
-
| `POD_NAMESPACE` | Namespace for certificate secrets | Auto-detected from ServiceAccount |
191
+
| `ACW_NAME` | Webhook name (required if not set in code) | - |
192
+
| `ACW_NAMESPACE` | Namespace for webhook resources | Auto-detected |
193
+
| `ACW_SERVICE_NAME` | Kubernetes service name | `<Name>` |
194
+
| `ACW_PORT` | Webhook server port | `8443` |
195
+
| `ACW_METRICS_ENABLED` | Enable metrics server | `true` |
196
+
| `ACW_METRICS_PORT` | Metrics server port | `8080` |
| `POD_NAME` | Pod identity for leader election | hostname |
186
214
187
-
The namespace is automatically detected from `/var/run/secrets/kubernetes.io/serviceaccount/namespace` (mounted by Kubernetes). You only need to set `POD_NAMESPACE` if running outside a Kubernetes cluster or without a ServiceAccount.
215
+
The namespace is automatically detected from `/var/run/secrets/kubernetes.io/serviceaccount/namespace` (mounted by Kubernetes). You only need to set `ACW_NAMESPACE` or `POD_NAMESPACE` if running outside a Kubernetes cluster or without a ServiceAccount.
188
216
189
217
## Metrics
190
218
@@ -211,6 +239,22 @@ groups:
211
239
summary: "Webhook certificate expiring in less than 7 days"
212
240
```
213
241
242
+
## Examples
243
+
244
+
Complete working examples with deployment manifests and test scripts:
0 commit comments