You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nrashok (via GitHub)" <gi...@apache.org> on 2023/12/22 09:23:19 UTC

[I] Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

nrashok opened a new issue, #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419

   I am currently encountering an issue while upgrading Apache Pulsar from version 2.x to 3.x. I executed a Helm command to detect the Kubernetes APIs, and the Kubernetes setup seems to be in order. However, the upgrade process fails with the following error:
   
   `helm upgrade --namespace pulsar --version 3.0.0 -f customized-values-pulsar-3x.yaml pulsar apache/pulsar --wait --timeout 10m`
   
   ```
   Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: [resource mapping not found for name: "pulsar-bookie" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
   ensure CRDs are installed first, resource mapping not found for name: "pulsar-broker" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
   ensure CRDs are installed first, resource mapping not found for name: "pulsar-zookeeper" namespace: "pulsar" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"
   ensure CRDs are installed first]
   ```
   
   
   
   **Screenshot**
   
   ![image](https://github.com/apache/pulsar-helm-chart/assets/20737358/fbc0cb51-6a6d-4f31-8696-6738c261dc39)
   
   
   **Additional info**
   Helm version 3.11.3
   K8 Server Version: v1.25.16-eks-8cb36c9
   kubectl Client Version: v1.28.4
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867480348

   Issue reported in Helm, won't be fixed: https://github.com/helm/helm/issues/12053 . 
   
   This is a problem with EKS k8s version string.
   
   https://github.com/DefectDojo/django-DefectDojo/issues/6466#issuecomment-1168309518
   > EKS (AWS) is not respecting the semVer standard of versioning
   
   One possible solution would be something like https://github.com/atlassian/data-center-helm-charts/blob/cad6bb41b5b1d3078a0cc422a33837297620a9f3/src/main/charts/bitbucket/templates/_helpers.tpl#L39-L40
   ```
   {{- $sanitizedMinorVersion := regexReplaceAll "[^0-9]" .Capabilities.KubeVersion.Minor "" }}
     "k8sVersion": "{{ .Capabilities.KubeVersion.Major }}.{{ $sanitizedMinorVersion }}",
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867559275

   https://github.com/helm/helm-mapkubeapis?tab=readme-ov-file#background-to-the-issue
   
   > The Helm documentation describes the problem when Helm releases that are already deployed with APIs that are no longer supported. If the Kubernetes cluster (containing such releases) is updated to a version where the APIs are removed, then Helm becomes unable to manage such releases anymore. It does not matter if the chart being passed in the upgrade contains the supported API versions or not.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867561460

   @nrashok Please verify if using mapkubeapis solves your problem.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867794564

   Addressed by #420 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari closed issue #419: Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure
URL: https://github.com/apache/pulsar-helm-chart/issues/419


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867503831

   Helm docs about semVerCompare https://helm.sh/docs/chart_template_guide/function_list/#semvercompare . 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867550641

   @nrashok  You might need https://github.com/helm/helm-mapkubeapis


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867543806

   @nrashok This might not an issue with the chart. 
   
   ```
   mkdir test-semverCompare
   cd test-semverCompare
   
   cat <<'EOF' >Chart.yaml
   name: test
   version: 1.0
   EOF
   
   mkdir -p templates
   cat <<'EOF' >templates/test.yaml
   compare1: {{ semverCompare "<1.21-0" "1.25.16-eks-8cb36c9" | quote }}
   compare2: {{ semverCompare "<1.21-0" "1.25.16" | quote }}
   EOF
   
   helm template .
   
   ```
   
   this outputs
   ```
   ---
   # Source: test/templates/test.yaml
   compare1: "false"
   compare2: "false"
   ```
   
   which is expected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867547371

   @nrashok could you first verify with `helm diff` that the chart is really adding new policy/v1beta1 objects? it might actually be a problem with the existing installation that k8s / helm cannot handle a broken installation when the current installation contains policy/v1beta1 objects and k8s 1.25 no longer understands that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867555943

   ```
   helm plugin install https://github.com/helm/helm-mapkubeapis
   helm mapkubeapis --namespace pulsar
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Semver Issue with Pulsar Upgrade from Version 2.x to 3.x - Helm Upgrade Failure [pulsar-helm-chart]

Posted by "nrashok (via GitHub)" <gi...@apache.org>.
nrashok commented on issue #419:
URL: https://github.com/apache/pulsar-helm-chart/issues/419#issuecomment-1867606483

   > usage example:
   > 
   > ```
   > helm plugin install https://github.com/helm/helm-mapkubeapis
   > helm mapkubeapis --namespace pulsar pulsar
   > ```
   
   🎉 **Resolved!** 🎉
   
   I'm happy to report that the provided solution has successfully addressed the issue. Many thanks to @lhotari  for his invaluable help and support throughout.
   
   Attached are the screenshots for your reference below
   ![image](https://github.com/apache/pulsar-helm-chart/assets/20737358/a191e645-e837-4e49-842f-f8fbf8d53779)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org