helm-mapkubeapis icon indicating copy to clipboard operation
helm-mapkubeapis copied to clipboard

No deprecated apiVersions found when generated manifest has `kind` and `apiVersion` in a different order

Open agaffney opened this issue 4 years ago • 3 comments

I came across a helm chart that generated manifests such as the following:

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1

Because the mapping file is using a multiline substring match that looks for apiVersion followed by kind, the tool did not recognize these resources as needing to be updated. I had to manually edit the map file to switch the order to get it to work.

agaffney avatar May 10 '21 20:05 agaffney

@agaffney That is the reason for the mapping file being configurable. It can be used to match different formats. See https://github.com/hickeyma/helm-mapkubeapis#api-mapping for more details.

hickeyma avatar May 11 '21 13:05 hickeyma

I created a custom map file to work around it, but the fact that it didn't find anything when I first ran it was very confusing. I do now see that this is explicitly called out in the README, but I probably wouldn't have understood that section to mean that before I encountered this problem.

agaffney avatar May 11 '21 13:05 agaffney

@agaffney That is a good point. Would you like to push a PR to improve the README?

hickeyma avatar May 12 '21 13:05 hickeyma