Introduce the ability to provision SSCSI roles on hubs and spokes when needed#119
Introduce the ability to provision SSCSI roles on hubs and spokes when needed#119mhjacks wants to merge 26 commits into
Conversation
- Read ssCsiWorkloadAuth from values-<clustergroup>.yaml applications - Hub roles auth/hub/role/hub-sscsi-*; spoke roles per cluster vault_path - New tasks: workload auth collection, spoke role loop; defaults for TTL and paths - Legacy vault_csi_kubernetes_auth supported via synthetic hub row - Include from vault_secrets_init and vault_spokes_init Made-with: Cursor
- Default pattern_dir from PATTERN_DIR when unset (vault.yml had no pattern_settings). - Alias main_clustergroupname from main_clustergroup after pattern_settings. - Run pattern_settings before vault_utils in vault.yml so hub values file can load. - Emit a single debug line with values path, app count, ssCsiWorkloadAuth identity count, and hub role count so operators can confirm SSCSI Vault auth wiring. Made-with: Cursor
Parse clusterGroup.managedClusterGroups alongside applications from the hub values file. For each group with a mapping applications.*.ssCsiWorkloadAuth, reuse the same collection logic with cluster defaulting to group name (managedClusterGroup.name, else YAML key) so spoke Vault roles match ACM. Pass explicit hub default for clusterGroup.applications; thread default through collect_one_entry for inner_item.cluster. Made-with: Cursor
vault-only plays (e.g. collection vault.yml with only vault_utils) never set pattern_dir or main_clustergroup, so ssCsiWorkloadAuth discovery saw an empty values path. Include pattern_settings resolve_overrides and load main.clusterGroupName from values-global when main_clustergroup is unset, matching load_secrets / full vault play behavior. Made-with: Cursor
Restore inline hub k8s_exec (apply_one task file was missing). When ssCsiWorkloadAuth entry sets roleSlug, use it as the vault role suffix; otherwise keep SHA1 hash. Spoke rows use the same rule so chart stable slugs can match Ansible. Made-with: Cursor
…sscsi workload auth elements from managed clustergroups
dminnear-rh
left a comment
There was a problem hiding this comment.
Looks good as far as I can tell, might be worth waiting an letting Michele or somebody more familiar with the secrets roles take a look as well before merging. I didn't see anything that looked like a breaking change but I'm definitely not the most knowledgeable
|
Thanks - the whole point is that the SSCSI stuff is additive, and is designed not to interfere with any of the existing secrets flows. But there's a lot and it makes sense to be careful with it. I'll ask for Michele's review as well. |
|
(Side note: I'm thinking of adding a similar mechanism for creating an AAP-specific role in preference to the current aap-config mechanism, if this approach is deemed good enough. I'll document that too. I'm also planning on a further follow-up PR to clustergroup to document the use of the CSI elements, and plug some legacy holes) |
Add mechanism to cluster_utils to create kubernetes auth for SS-CSI after the manner of ESO. CA trusts are expected to be provided separately