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

Unable to apply sumo logic helm chart after upgrading k8s clusters to 1.26 #3154

Closed
jlawrienyt opened this issue Jul 13, 2023 · 0 comments
Closed
Labels
bug Something isn't working

Comments

@jlawrienyt
Copy link

jlawrienyt commented Jul 13, 2023

Describe the bug

When upgrading a k8s cluster from version 1.25 to 1.26 where the Sumo Logic helm chart had already been applied, the next time the chart was applied, we encountered the following error:

Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: resource mapping not found for name: "sumologic-sumologic-otelcol-logs" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta2"

To Reproduce

  1. Run a k8s clusters v1.25 and install the Sumo Logic helm chart.
  2. Upgrade the k8s cluster in place to v1.26
  3. Upgrade the Sumo Logic helm chart

Workaround

Use the helm mapkubeapis plugin to update the helm release metadata in the cluster before re-applying the Sumo Logic helm chart in the 1.26 k8s cluster. Note that as of 07/13/2023, the plugin's default configuration does not contain the autoscaling/v2beta2 API, so this will need to be created locally as

mappings:
  - deprecatedAPI: "apiVersion: autoscaling/v2beta2\nkind: HorizontalPodAutoscaler\n"
    newAPI: "apiVersion: autoscaling/v2\nkind: HorizontalPodAutoscaler\n"
    deprecatedInVersion: "v1.23"
    removedInVersion: "v1.26"

and then applied using

helm mapkubeapis sumologic --mapfile Map.yaml

Expected behavior

Applying the Sumo Logic helm chart should succeed. The logic in the helm chart should install the HorizontalPodAutoscaler resources using api version autoscaling/v2 when the autoscaling/v2 API was introduced, i.e. when the k8s cluster is version 1.23, not when the autoscaling/v2beta2 API was removed (v1.26).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants