Why Do I Get This Error ‘More than one workload found in the Manifests. Canary deploy supports only one workload.’ While Deploying ESO On Harness Using Helm Template?

Module

  • Harness Continuous Delivery

Environment

  • Infrastructure: Harness Saas
  • OS: Mac, Windows, Linux

Issue

I am using a Helm Template to deploy ESO on Harness and the deployment fails with the error.
More than one workload found in the Manifests. Canary deploy supports only one workload.

I was able to deploy manually on the cluster using the chart with the command: helm template external-secrets --name-template=dev --namespace=external-secrets | kubectl apply -f harness-delegate.yml

Here is the logs for your reference.

INFO   2022-12-29 13:04:56    Initializing..
INFO   2022-12-29 13:04:56    
INFO   2022-12-29 13:04:56    
INFO   2022-12-29 13:04:56    Rendering manifest files using go template
INFO   2022-12-29 13:04:56    Only manifest files with [.yaml] or [.yml] extension will be processed
ERROR  2022-12-29 13:04:57    Error: template: tpl:5: function "include" not defined
ERROR  2022-12-29 13:04:57    Invalid request: Failed to render template for templates/webhook-serviceaccount.yaml.
INFO   2022-12-29 13:04:57    
INFO   2022-12-29 13:04:57    Failed.

Resolution

  • As per this use-case, Manifests are rendered from Go-template and not from Helm. Make sure you choose a Helm for Service Manifests.

  • If more than one workload is present in the service Manifest files, you will need to use the annotation harness.io/direct-apply and set the value “true”|”false”. You can set it to true to make a Manifest an unmanaged workload.