cw-agent-certmanager
by gnana997
CertWatch Agent for cert-manager - Monitors Kubernetes certificates managed by cert-manager
About this chart
CertWatch Agent for cert-manager
Helm chart for deploying the CertWatch cert-manager controller. This agent monitors certificates managed by cert-manager in your Kubernetes cluster and syncs them to CertWatch.
Tip: For deploying multiple CertWatch agents, consider using the cw-stack umbrella chart.
Prerequisites
- Kubernetes 1.19+
- Helm 3.8+
- cert-manager installed in your cluster
- CertWatch account and API key
Installation
Quick Start
helm install cw-agent-certmanager oci://ghcr.io/certwatch-app/helm-charts/cw-agent-certmanager \
--namespace certwatch --create-namespace \
--set agent.name=my-cluster \
--set apiKey.value=cw_your_api_key
Using an Existing Secret (Recommended for Production)
# Create the secret first
kubectl create namespace certwatch
kubectl create secret generic cw-api-key \
--namespace certwatch \
--from-literal=api-key=cw_your_api_key
# Install the chart
helm install cw-agent-certmanager oci://ghcr.io/certwatch-app/helm-charts/cw-agent-certmanager \
--namespace certwatch \
--set agent.name=my-cluster \
--set apiKey.existingSecret.name=cw-api-key
Configuration
Required Values
| Parameter | Description |
|---|---|
agent.name | Unique name identifying this agent in CertWatch |
apiKey.value OR apiKey.existingSecret.name | CertWatch API key |
Key Configuration Options
| Parameter | Description | Default |
|---|---|---|
agent.name | Agent name (required) | "" |
agent.logLevel | Log level: debug, info, warn, error | "info" |
agent.syncInterval | How often to sync certificates | "30s" |
agent.heartbeatInterval | Heartbeat interval for offline alerts | "30s" |
agent.watchAllNamespaces | Watch all namespaces | true |
agent.namespaces | Specific namespaces to watch | [] |
agent.metricsPort | Prometheus metrics port (0 to disable) | 9402 |
agent.healthPort | Health probe port | 9403 |
API Configuration
| Parameter | Description | Default |
|---|---|---|
api.endpoint | CertWatch API endpoint | "https://api.certwatch.app" |
api.timeout | API request timeout | "30s" |
apiKey.value | API key (creates a Secret) | "" |
apiKey.existingSecret.name | Name of existing Secret | "" |
apiKey.existingSecret.key | Key in the Secret | "api-key" |
Resources & Security
| Parameter | Description | Default |
|---|---|---|
resources.requests.cpu | CPU request | "10m" |
resources.requests.memory | Memory request | "64Mi" |
resources.limits.cpu | CPU limit | "100m" |
resources.limits.memory | Memory limit | "128Mi" |
securityContext.runAsNonRoot | Run as non-root | true |
securityContext.readOnlyRootFilesystem | Read-only filesystem | true |
Observability
| Parameter | Description | Default |
|---|---|---|
serviceMonitor.enabled | Create Prometheus ServiceMonitor | false |
serviceMonitor.interval | Scrape interval | "30s" |
podDisruptionBudget.enabled | Create PodDisruptionBudget | false |
Example Values File
agent:
name: production-cluster
logLevel: info
watchAllNamespaces: true
apiKey:
existingSecret:
name: cw-api-key
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
serviceMonitor:
enabled: true
interval: 30s
podDisruptionBudget:
enabled: true
minAvailable: 1
RBAC
This chart creates a ClusterRole with permissions to:
- Read cert-manager resources: certificates, certificaterequests, issuers, clusterissuers
- Read core resources: secrets (certificate data), events, namespaces
Upgrading
helm upgrade cw-agent-certmanager oci://ghcr.io/certwatch-app/helm-charts/cw-agent-certmanager \
--namespace certwatch \
--reuse-values
Uninstalling
helm uninstall cw-agent-certmanager --namespace certwatch
Note: The API key Secret has helm.sh/resource-policy: keep and will not be deleted automatically.
Troubleshooting
View Logs
kubectl logs -n certwatch -l app.kubernetes.io/name=cw-agent-certmanager -f
Check Agent Status
kubectl get pods -n certwatch -l app.kubernetes.io/name=cw-agent-certmanager
Verify RBAC
kubectl auth can-i list certificates.cert-manager.io \
--as=system:serviceaccount:certwatch:cw-agent-certmanager
Related Charts
- cw-agent - Network certificate scanner
- cw-stack - Umbrella chart for deploying both agents
Documentation
License
Apache 2.0
Deploy cw-agent-certmanager with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cw-agent-certmanager on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcw-agent-certmanager is pinned at v0.5.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply