Skip to content

Conversation

@Joibel
Copy link
Member

@Joibel Joibel commented Oct 31, 2025

This change adds the capability to install full CRDs (with complete OpenAPI schemas) instead of the minified ones. This is controlled by a new configuration option crds.full which defaults to false (minified CRDs).

Changes:

  • Add new crds.full configuration option in values.yaml (defaults to false)
  • Create templates/crds-full/ directory with full CRDs from upstream v3.7.3
  • Move existing minified CRDs to templates/crds-minified/
  • Add conditional logic to install either full or minified CRDs based on config
  • Update README.md with documentation about the new option
  • Update CONTRIBUTING.md with namespace creation
  • Update default namespace documentation for argo-workflows
  • Use /usr/bin/env bash for better compatibility in scripts

Possibly in 4.0 we (the workflows team) will suggest switching this to default true.

If you don't like my "minor fixes along the way" in this PR, I'm happy to split it.

3 of the 8 CRDs are already "full" so we have duplicates of them in the current format. We could put them in a common place if that is preferred. I'm new to this repo and your preferred practices.

Checklist:

  • I have bumped the chart version according to versioning
  • I have updated the documentation according to documentation
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.
  • I have created a separate pull request for each chart according to pull requests
  • My build is green (troubleshooting builds).

@Joibel Joibel marked this pull request as draft October 31, 2025 14:21
@Joibel Joibel force-pushed the argo-workflows-crds branch from b39b58e to 72cbf33 Compare October 31, 2025 14:27
@Joibel Joibel marked this pull request as ready for review October 31, 2025 14:53
jmeridth
jmeridth previously approved these changes Oct 31, 2025
Copy link
Member

@jmeridth jmeridth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the "housekeeping" items also. Excellent updates on the README.

@vladlosev
Copy link
Collaborator

I would like to sound a note of caution here. Full Argo Workflows CRDs are very large and will slow down the processing substantially. It my work we use A GitOps automated sync deployments, and when we tried to use full CRDs, the process slowed down enough to start timing out. This change does not default to full CRDs, but there are still costs being added

  • The download size increases significantly. That might affect both bandwidth consumed and time spent on downloading the charts. Hopefully, most CD systems cache these downloads, though.
  • These CRDs are implemented as direct Go templates. This means Helm will have to read and parse process the entire CRD template just in order to generate an empty output from it. It's quite a bit of CPU and memory consumption. If one is running their CD solution in a container with limited memory requirements, this change is likely to exceed them and cause OOMs.

The former problem is annoying, but the latter can be a real breaking change for some. There are ways to rectify these issues. For example, the actual CRDs can be kept in flat files, and the CRD template could be a short stub loading them via Helm's File feature, like this:

{{- if .Values.crds.install }}
{{- $pattern := ternary "files/crds/full/*.yaml" "files/crds/minimal/*.yaml" .Values.crds.full }}
{{- range $path, $_ :=  .Files.Glob  $pattern }}
---
{{ $.Files.Get $path }}
{{- end }}
{{- end }}

This approach avoids the overhead of processing large CRD templates when they are not required. Incidentally, it will also let us copy the CRDs files verbatim from the Argo Workflows project, reducing maintenance burden of turning them into templates.

@Joibel
Copy link
Member Author

Joibel commented Oct 31, 2025

@vladlosev, lets hold on merging this, and I'll do that (next week now), it's a very neat pattern.

Thank you.

@Joibel Joibel marked this pull request as draft October 31, 2025 16:24
@jmeridth jmeridth dismissed their stale review November 1, 2025 13:14

Back in draft

@Joibel
Copy link
Member Author

Joibel commented Nov 7, 2025

It doesn't seem it's possible to modify files from Files.Get, which makes adding the annotations impossible - is there a way around that? I've pushed up a new version with something like the modifications suggested, but it's broken CI and it's broken crds.keep and crds.annotations.

I don't have a way to fix this, but I'm no helm expert - asking for assistance with that.

{{- range $path, $_ := .Files.Glob $pattern }}
{{- if not (contains "clusterworkflowtemplates" $path) }}
---
{{ $.Files.Get $path }}
Copy link
Collaborator

@vladlosev vladlosev Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may be able do something like this here:

{{ regexReplaceAllLiteral "\n  annotations:\n" ($.Files.Get $path) "\n    annotations:\n  helm.sh/resource-policy: keep\n" }}

May even abstract it into a function call, e.g.,

{{ include "argo-workflows.insertResourcePolicyAnnotation" (dict "input" ($.Files.Get $path) "value" "keep" }

The function may look like this:

{{- define "argo-workflows.insertResourcePolicyAnnotation" -}}
{{ regexReplaceAllLiteral "\n  annotations:\n" .input (format "\n    annotations:\n  helm.sh/resource-policy: %s\n" .value) }}
{{- end -}}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to implement this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a neat trick, I hadn't realised this was possible - thank you.

claude and others added 3 commits November 25, 2025 10:25
This change adds the capability to install full CRDs (with complete OpenAPI schemas)
instead of the minified ones. This is controlled by a new configuration option
crds.fullCRDs which defaults to false (minified CRDs).

Changes:
- Add new crds.full configuration option in values.yaml (defaults to `false`)
- Create templates/crds-full/ directory with full CRDs from upstream v3.7.3
- Move existing minified CRDs to templates/crds-minified/
- Add conditional logic to install either full or minified CRDs based on config
- Update README.md with documentation about the new option
- Update CONTRIBUTING.md with namespace creation
- Update default namespace documentation for argo-workflows
- Use `/usr/bin/env bash` for scripts (making them compatible with nixos

Possibly in 4.0 we will suggest switching this to default `true`.

I'm happy to split this commit if you don't like my "minor fixes along
the way".

Signed-off-by: Alan Clucas <[email protected]>
Signed-off-by: Alan Clucas <[email protected]>
@Joibel Joibel force-pushed the argo-workflows-crds branch from 96bed6d to d34f459 Compare November 25, 2025 10:35
@Joibel
Copy link
Member Author

Joibel commented Nov 25, 2025

@vladlosev I have rebased, but the actual changes requested are in d34f459

@Joibel Joibel marked this pull request as ready for review November 25, 2025 10:42
Copy link
Collaborator

@vladlosev vladlosev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new full CRDs seem to lack the metadata.name fields.

Signed-off-by: Alan Clucas <[email protected]>
@Joibel Joibel force-pushed the argo-workflows-crds branch from 41fb93f to 11b344c Compare November 26, 2025 09:22
Copy link
Collaborator

@vladlosev vladlosev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other issues have been fixed, but the new full CRDs still lack the metadata.name fields. They are not valid without it.

Signed-off-by: Alan Clucas <[email protected]>
@Joibel
Copy link
Member Author

Joibel commented Nov 27, 2025

Other issues have been fixed, but the new full CRDs still lack the metadata.name fields. They are not valid without it.

Apologies, missed this. Done now

@tico24 tico24 enabled auto-merge (squash) December 1, 2025 13:12
@tico24 tico24 merged commit 712562b into argoproj:main Dec 1, 2025
6 checks passed
@Joibel Joibel deleted the argo-workflows-crds branch December 1, 2025 14:49
@Joibel
Copy link
Member Author

Joibel commented Dec 1, 2025

Thank you all

@Joibel
Copy link
Member Author

Joibel commented Dec 3, 2025

I successfully deployed this via ArgoCD with an application with SSA enabled. application-controller needed more memory limit to work, but it did the update. (Kube-prom-stack would deploy with the old memory limit, so this was a bit surprising)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants