Fix mage k8s:generatePermissionsDocs intermittent test faliures
What does this MR do?
Previously the k8s:generatePermissionsDocs job was failing
depending on which file was parsed first:
- executors/kubernetes/kubernetes.go
- executors/kubernetes/util.go
The parser looks for comments in the form:
// kubeAPI: <Resource>, <Verb>, <FF=VALUE>(optional)
executors/kubernetes/kubernetes.go has get and list verbs, but
executors/kubernetes/util.go only has get. If the former were parsed
first, everything works fine because list is available as a verb.
However, if the former were parsed second, the generating
documentation omitted the list feature flags because only get were
available.
This commit fixes that problem by reconciling the missing verbs and ensures that all the feature flags are added, regardless of which order they were parsed.
Why was this MR needed?
We were seeing intermittent test failures.
What's the best way to test this MR?
Run mage k8s:generatePermissionsDocs and git diff many times.
What are the relevant issue numbers?
No issues created.