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
- No serviceAccountName field (uses default Kubernetes pod service account)
75
77
- CRDs (Custom Resource Definitions)
76
78
- Webhook configurations (MutatingWebhookConfiguration and ValidatingWebhookConfiguration)
77
79
- Webhook service
80
+
- Cert-manager resources (Issuer and Certificate)
81
+
- CA injection annotations for webhook configurations
78
82
- No RBAC for controllers
79
-
- No cert-manager configurations (certificates must be managed separately)
80
83
81
84
```bash
82
85
kubectl apply -f generated/webhook-manifests.yaml
83
86
```
84
87
85
88
## Important Notes
86
89
87
-
1.**RBAC**: Only the controller deployment includes RBAC permissions. The webhook deployment does not include RBAC or cert-manager configurations as requested.
90
+
1.**RBAC and Service Accounts**: Only the controller deployment includes RBAC permissions. Both deployments have no serviceAccountName field, relying on Kubernetes default pod service accounts. The webhook deployment does not include RBAC but includes cert-manager configurations for automatic certificate management.
88
91
89
92
2.**CRDs**: Custom Resource Definitions are included only in the webhook deployment.
90
93
91
-
3.**Certificates**: The webhook server requires TLS certificates. You need to create a secret named `capc-webhook-service-cert` with the TLS certificate and key:
3.**Certificates**: The webhook deployment includes cert-manager resources that automatically generate and manage TLS certificates. The Certificate resource will create a secret named `capc-webhook-service-cert` with the TLS certificate and key.
99
95
100
96
4.**Image**: Both deployments use the same container image. Make sure to update the image reference in `config/manager/manager.yaml` or patch files as needed.
- spectro/generate-all-manifests.sh: runs both scripts
57
74
- README in spectro/ explaining usage and that:
58
-
- Controller-only manifests: no namespace patch, no RBAC, no webhooks, no CRDs, no cert-manager
59
-
- Webhook-only manifests: include CRDs and webhook configs, no RBAC, no cert-manager, namespace is capi-webhook-system
75
+
- Controller-only manifests: no serviceAccountName field, no RBAC, no webhooks, no CRDs, no cert-manager
76
+
- Webhook-only manifests: include CRDs, webhook configs, and cert-manager resources, no serviceAccountName field, no RBAC, namespace is capi-webhook-system
60
77
- Both use the same image; functionality controlled by --webhook-port
78
+
- Automatic certificate management via cert-manager with CA injection
61
79
62
80
- Ensure generated outputs meet these checks:
63
81
- Controller manifests:
64
82
- Include args with --webhook-port=0
65
-
-Use serviceAccountName: default
83
+
- Do NOT contain serviceAccountName field (field completely absent)
66
84
- Do not contain CRDs or webhook configs
85
+
- Labels: control-plane=capc-controller-manager
67
86
- Webhook manifests:
68
-
- Include CRDs and Mutating/ValidatingWebhookConfiguration pointing to Service/webhook-service
87
+
- Include CRDs and Mutating/ValidatingWebhookConfiguration pointing to Service/capc-webhook-service
69
88
- Are in namespace capi-webhook-system
70
-
- cert-manager.io/inject-ca-from annotations resolve to capi-webhook-system/capc-webhook-service
71
-
- No RBAC or cert-manager resources included
89
+
- Include cert-manager resources (Issuer and Certificate)
90
+
- cert-manager.io/inject-ca-from annotations resolve to capi-webhook-system/capc-serving-cert (certificate name, not secret name)
91
+
- Labels: control-plane=capc-controller-manager (matches service selector)
92
+
- Do NOT contain serviceAccountName field (field completely absent)
1. **Service Selector Alignment**: Fixed webhook deployment labels to use `control-plane: capc-controller-manager` (matching service selector) instead of `capc-webhook-manager`
113
+
2. **CA Injection Reference**: Fixed `cert-manager.io/inject-ca-from` annotation to reference certificate resource name `capc-serving-cert` instead of secret name
114
+
3. **ServiceAccountName Removal**: Completely removed serviceAccountName field from both deployments using YAML patches with `op: remove`
115
+
4. **Cert-Manager Integration**: Added full cert-manager resource inclusion with automatic certificate generation and CA injection
0 commit comments