argoproj / argo-workflows

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

Argo Projects Shared Schema File #9273

Open zachaller opened 2 years ago

zachaller commented 2 years ago

Summary

As an end user of Argo Projects and a user of Kustomize I would like to be able to use strategic merge patching to merge arrays for both Argo Rollout and Argo Workflows. There are some major bugs with how kustomizes support for openapi schema definitions are used in that they are currently only one schema that can be defined and so you have to choose between being able to patch CRDs or patch kustom resources.

I propose that the argo project generates a schema file that all the projects can use that also includes Kubernetes native types I have a PoC here https://github.com/zachaller/argo-schema-generator this repo ideally would live under the argoproj github organization. Then each project could document and tell users how to use the generated schema's which is as simple as adding this to your kustomize file.

openapi:
  path: https://github.com/zachaller/argo-schema-generator/raw/main/schema/argo_all_k8s_kustomize_schema.json

Use Cases

Any user of Argo Projects that use kustomize would use this and find it super beneficial due to how fragile Json6902 patches are.


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

JPZ13 commented 2 years ago

Argo Rollouts Kustomize docs: https://argoproj.github.io/argo-rollouts/features/kustomize/

JPZ13 commented 2 years ago

From the community meeting:

cc @sarabala1979 @zachaller

terrytangyuan commented 2 years ago

Do you mean argoproj-labs org instead?

zachaller commented 2 years ago

I think that argoproj org makes the most sense for this particular use because the links in both documentations and usage by the end users kustomization files will go to this repo.