Commit cfc8f4a
Improve EDPM-aware AC revocation: dynamic discovery, Watch, simplified API
Three improvements to the EDPM application credential revocation mechanism:
1. Replace hardcoded edpmServices map with dynamic DataPlaneService discovery
- getEDPMConfigSecretNames now lists OpenStackDataPlaneService CRs and
filters by EDPMServiceType, discovering custom services (e.g., HCI nova
variants) automatically
- A small edpmACServiceTypes map bridges AC service names to EDPM service
types for ReconcilePendingEDPMSyncs (AC CR names are deterministic via
GetACCRName, but the EDPM service type can differ — e.g., "ceilometer"
maps to "telemetry")
- Add edpmServiceType parameter to EnsureApplicationCredentialForService
and CleanupApplicationCredentialForService
2. Revert CleanupApplicationCredentialForService to error-only return
- Signature reverted from (ctrl.Result, error) to error — all 12
non-EDPM service files return to the simpler calling pattern
- When EDPM sync is pending, cleanup defers deletion (returns nil)
- EDPM sync progression centralized in ReconcilePendingEDPMSyncs
(replaces HasPendingEDPMSync) at end of reconcileNormal
3. Replace 5-minute polling with NodeSet Watch
- Add Watch on OpenStackDataPlaneNodeSet with
ResourceVersionChangedPredicate in SetupWithManager
- Controller reacts when SecretHashes change after deployment
- Fallback interval increased to 30 minutes (safety net only)
Adding a new EDPM service with AC support requires:
1. Add entry to edpmACServiceTypes map in applicationcredential.go:
"newservice": "newservice-edpm-type",
2. Pass the EDPM service type in the service reconciler:
EnsureApplicationCredentialForService(..., "newservice-edpm-type")
CleanupApplicationCredentialForService(..., "newservice-edpm-type")
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d34351f commit cfc8f4a
17 files changed
Lines changed: 372 additions & 256 deletions
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
742 | 743 | | |
743 | 744 | | |
744 | 745 | | |
745 | | - | |
| 746 | + | |
746 | 747 | | |
747 | 748 | | |
748 | 749 | | |
| |||
902 | 903 | | |
903 | 904 | | |
904 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
905 | 914 | | |
906 | 915 | | |
907 | 916 | | |
| |||
0 commit comments