charts icon indicating copy to clipboard operation
charts copied to clipboard

Error with Type Mismatch in deployment-worker.yaml Template

Open alaturqua opened this issue 9 months ago • 4 comments

Description

The Helm chart produces a type mismatch error when deploying the worker component due to an incompatible comparison between a float and an integer in the deployment-worker.yaml template. The issue arises in the following logic:

<gt (mulf 2.0 .Values.worker.gracefulShutdown.gracePeriodSeconds) .Values.worker.terminationGracePeriodSeconds>

When the result of mulf 2.0 is a float and .Values.worker.terminationGracePeriodSeconds is an integer, the gt function fails because it cannot compare different types.


Steps to Reproduce

  1. Configure worker.gracefulShutdown.gracePeriodSeconds via helm command
  2. Deploy the Helm chart:
    helm install my-trino trino/trino \
     --set "worker.gracefulShutdown.enabled=true" \
     --set "worker.terminationGracePeriodSeconds=600"
    
  3. Observe the following error:
     Error: template: /charts/trino/templates/deployment-worker.yaml:111:58: executing "/charts/trino/templates/deployment-worker.yaml" at <gt 
    (mulf 2.0 .Values.worker.gracefulShutdown.gracePeriodSeconds) .Values.worker.terminationGracePeriodSeconds>: error calling gt: incompatible 
    types for comparison
    

Expected Behavior

The comparison should work without error, ensuring compatibility between worker.gracefulShutdown.gracePeriodSeconds and worker.terminationGracePeriodSeconds.

alaturqua avatar Jan 20 '25 14:01 alaturqua