Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.15] OCPBUGS-30570: Fix for ACM Policy Generator Plugin #756

Merged

Commits on Feb 26, 2024

  1. OCPBUGS-29208: Fix for ACM Policy Generator Plugin (openshift-kni#751)

    * This commit fixes an issue happening when using policies generated with ACM Policy Generator Plugin.
    For ConfigurationPolicy kind, the name of the object and the inner template are the same when generated with ACM Gen.
    In comparison the PGT plugin, adds "-config" to the name of the inner template. this leads to overloaded keys in the
    clusterGroupUpgrade.Status.SafeResourceNames map.
    
    Changes:
     - namespace+"/"+name key used in the clusterGroupUpgrade.Status.SafeResourceNames map
     - use of namespace instead of namespace length in GetSafeResourceName
     - use of utf8.RuneCountInString() instead of len to support non english characters (see policy web hook at https://github.com/stolostron/governance-policy-propagator/blob/feb9abb241954d7ce64054d7c621b423deece8cf/api/v1/policy_webhook.go#L86-L87 ).
     - adding logs to display the safenames and lenghts
    
    * Addressing Jun's comments
    
    * Addinitonal fixes for map key
    
    * fix kuttl test
    edcdavid committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    a5359fd View commit details
    Browse the repository at this point in the history