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

Kube mapping value not detected #107

Open
rasta-rocket opened this issue Mar 28, 2023 · 0 comments
Open

Kube mapping value not detected #107

rasta-rocket opened this issue Mar 28, 2023 · 0 comments

Comments

@rasta-rocket
Copy link

Hi folks 👋

I would like to raise you a recent issue I have with this amazing tool.
Indeed I noticed recently that I wasn't able to update deprecated resource in my helm releases

By looking at the code and making some try I finally came to the conclusion that the comparison between the modifiedManifest and the deprecatedAPI failed every time since the modifiedManifest yaml contains double quotes (") for each values and the map in the config file don't : so the plugin never try to apply the update on the resource 😅

Here is the line of the comparison

Here is a sample of the modifiedManifest when I print it through the code

apiVersion: "networking.k8s.io/v1beta1"
kind: "Ingress"

Also I noticed this is not consistent for all resources, for example we have custom resources called DNSEndpoint (from the external-dns project)

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint

When I modify the map file and I manually add the escaped double quote, it works:

 - deprecatedAPI: "apiVersion: \"networking.k8s.io/v1beta1\"\nkind: \"Ingress\"\n"
    newAPI: "apiVersion: \"networking.k8s.io/v1\"\nkind: \"Ingress\"\n"
    deprecatedInVersion: "v1.19"
    removedInVersion: "v1.22"

Maybe some kind of sanitization is required here I don't know, let me know 😉

I'm not sure when it starts to do that, so here is my config:

  • kube client v1.26.3
  • kube server v1.23.16
  • helm v3.11.2
  • helm plugin mapkubeapis 0.4.1

Don't hesitate to reach me if you need more details
Cheers 😉

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

No branches or pull requests

1 participant