This repository demonstrates how to check population of an OpenShift clusters for CNI driver configured with Red Hat OpenShift Advance Management for Kubernetes using simple Policy defined.
Older version of OpenShift could have OpenShiftSDN CNI driver configured as the one that was default back then. Recent versions, as a default have OVNKubernetes. Major change really.
Evaluating a population of clusters could be troublesome. Thanks to the simple policy that you can easily distingwished with RHACM and that fact can be demonstrated at the UI console.
- Access to an OpenShift cluster with cluster-admin privileges.
- install Red Hat Advanced Cluster Management for Kubernetes operator
- configure Red Hat Advanced Cluster Management for Kubernetes at the local cluster
ocorkubectlCLI tools installed and configured.
Run this one and only required shell script
./01-install-cni-configuration-policy.shyou shoud see a new policy named cni-configuration-policy created, reporting compliance drifts across your clusters population
In my case I had one recent version cluster (4.19) local-cluster with CNI driver OVNKubernetes and one older with OpenShiftSDN (4.14) as a CNI driver set. Therefore you see one cluster as compliant and a second as not.
if you now check 'View driff' for non compliant cluster, you can easily find out why it complains there
Contributions and suggestions are welcome! Please open an issue or submit a pull request.
This repository is licensed under the MIT License.



