Skip to content

fix acm policies without clustergroup label#19

Merged
mbaldessari merged 2 commits intovalidatedpatterns:mainfrom
mbaldessari:fix-acm-policies-without-clustergroup-label
Oct 1, 2025
Merged

fix acm policies without clustergroup label#19
mbaldessari merged 2 commits intovalidatedpatterns:mainfrom
mbaldessari:fix-acm-policies-without-clustergroup-label

Conversation

@mbaldessari
Copy link
Contributor

  • Use clustergroups on all policies
  • Drop dependencies and make the configmaps non-optional

We don't want any policy that applies to just any cluster.
We need to make sure that every policy is tight to some
managedClusterGroup.

This way we avoid pushing stuff on clusters imported to ACM
that have nothing to do with the patterns.

We do this by creating a small template to support all the
existing ways to set labels.

Tested as follows:

  1. Deployed one hub and 4 spokes. Three group-one spokes and one
     group-two spokes via stock mcg -> All policies green and spokes
     correctly deployed everywhere

  2. Deployed one hub and 4 spokes via a private git repo.
     Three group-one spokes and one group-two spokes via stock mcg ->
     All policies green and spokes correctly deployed everywhere

Fixes: validatedpatterns#16
The dependencies were introduces so that the spoke cluster would have
all the right CAs from the hub, before creating the argo instance.

More often than not though these policy dependencies show up as yellow
for no clear reason (the dependencies show Compliant but the main policy
says it is not compliant due to the dependencies not being compliant)

So let's drop the dependencies and make the volume mounts for the argo
initcontainers non-optional. This way argo won't start until the
configmaps with the hub CAs are in place and we avoid this more complex
way of managing policies.
@mhjacks mhjacks self-requested a review October 1, 2025 13:56
Copy link

@mhjacks mhjacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deployed cleanly on the ramendr-starter-kit pattern, which uses 2 clustergroups. LGTM

@mbaldessari mbaldessari merged commit f95608f into validatedpatterns:main Oct 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants