Skip to content

Kube mapping value not detected #107

Open
@rasta-rocket

Description

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 😉

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions