argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
15k stars 3.2k forks source link

Workflow Spec should include version information #13544

Open isubasinghe opened 1 month ago

isubasinghe commented 1 month ago

Summary

A new Version field would need to be added into the Workflow specification.

Use Cases

  1. Rely explicitly on this version field instead of deducing versions through other missing fields/present fields to provide backwards compatibility.
  2. As an operator, I would be able to determine if my current running workflow can be safely upgraded to use a newer controller. This is a far weaker argument, admittedly.
Joibel commented 1 month ago

This is in theory already in the API version at the top of the CR:

apiVersion: argoproj.io/v1alpha1
kind: Workflow

Currently it's set at v1alpha1, which is often treated as "anything goes", as this project is treating it.

https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/ explains how this is supposed to be implemented.

A version bump would be required for incompatible changes with the mutating webhook knowing how to convert versions.

I'd suggest the Validating Webhook (#13503) is a more important thing to get in at the moment and we need to be more careful with API (CRD) changes in future.