Skip to content

Exception thrown when using a file-based pod template #551

Closed

Description

@cdavernas

I tried this:

Configured the operator to load the Kubernetes pod template to use from a YAML file, thanks to the SYNAPSE_RUNTIME_K8S_POD environment variable.

Here's the pod template:

metadata: {}
spec:
  containers:
    - image: ghcr.io/serverlessworkflow/synapse/runner:1.0.0-alpha5.19
      imagePullPolicy: IfNotPresent
      name: runner
      ports:
        - containerPort: 8080
          name: http
          protocol: TCP
  restartPolicy: Never

This happened:

An exception is thrown, indicating that the pod template is invalid.

Here are the related logs:

[08:23:31] fail: Synapse.Runtime.Kubernetes.Services.KubernetesRuntime[0]
      An error occurred while creating a new Kubernetes process for workflow instance 'form-package-deploy-f2252b913a64.default': System.InvalidOperationException: The configured Kubernetes runtime pod template is not valid
         at Synapse.Runtime.Kubernetes.Services.KubernetesRuntime.CreateProcessAsync(Workflow workflow, WorkflowInstance workflowInstance, ServiceAccount serviceAccount, CancellationToken cancellationToken) in /src/src/runtime/Synapse.Runtime.Kubernetes/Services/KubernetesRuntime.cs:line 94
[08:23:31] fail: Synapse.Operator.Services.WorkflowInstanceController[0]
      An error occurred while handling the creation of workflow instance 'form-package-deploy-f2252b913a64.default': System.InvalidOperationException: The configured Kubernetes runtime pod template is not valid
         at Synapse.Runtime.Kubernetes.Services.KubernetesRuntime.CreateProcessAsync(Workflow workflow, WorkflowInstance workflowInstance, ServiceAccount serviceAccount, CancellationToken cancellationToken) in /src/src/runtime/Synapse.Runtime.Kubernetes/Services/KubernetesRuntime.cs:line 94
         at Synapse.Operator.Services.WorkflowInstanceHandler.StartProcessAsync(CancellationToken cancellationToken) in /src/src/operator/Synapse.Operator/Services/WorkflowInstanceHandler.cs:line 137
         at Synapse.Operator.Services.WorkflowInstanceHandler.HandleAsync(CancellationToken cancellationToken) in /src/src/operator/Synapse.Operator/Services/WorkflowInstanceHandler.cs:line 123
         at Synapse.Operator.Services.WorkflowInstanceController.OnResourceCreatedAsync(WorkflowInstance workflowInstance, CancellationToken cancellationToken) in /src/src/operator/Synapse.Operator/Services/WorkflowInstanceController.cs:line 223

After verification, the issue occurs because the V1PodTemplate is not marked with the expected YAML attributes, thus property name resolution fails.

This can be solved by using the KubernetesYaml helper class to deserialize the V1PodTemplate.

I expected this:

The defined pod template to be successfully used by the operator.

Is there a workaround?

No response

Anything else?

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞

Activity

  1. added this to the v1.0.0 milestone on Aug 26, 2025
  2. self-assigned this
    on Aug 26, 2025
  3. added
    type: bugSomething isn't working
    priority: highIndicates a high priority issue
    weight: 2An issue with a low development impact
    on Aug 26, 2025
  4. added theissue type on Aug 26, 2025
  5. cdavernas commented on Aug 26, 2025

    @cdavernas
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app: operatorConcerns the Operatorpriority: highIndicates a high priority issuetype: bugSomething isn't workingweight: 2An issue with a low development impact

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions