Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(manifests): fix full CRDs and update tests to use them. Fixes #8532 #14044

Merged
merged 13 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions api/jsonschema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 5 additions & 13 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions docs/executor_swagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ ConfigMap volumes support ownership management and SELinux relabeling.
| template | string| `string` | | | Name of template to execute | |
| templateRef | [TemplateRef](#template-ref)| `TemplateRef` | | | | |
| when | string| `string` | | | When is an expression in which the task should conditionally execute | |
| withItems | [][Item](#item)| `[]Item` | | | WithItems expands a task into multiple parallel tasks from the items in the list | |
| withItems | [][Item](#item)| `[]Item` | | | WithItems expands a task into multiple parallel tasks from the items in the list</br>Note: The structure of WithItems is free-form, so we need</br>"x-kubernetes-preserve-unknown-fields: true" in the validation schema.</br>+kubebuilder:validation:Schemaless</br>+kubebuilder:pruning:PreserveUnknownFields | |
| withParam | string| `string` | | | WithParam expands a task into multiple parallel tasks from the value in the parameter,</br>which is expected to be a JSON list. | |
| withSequence | [Sequence](#sequence)| `Sequence` | | | | |

Expand Down Expand Up @@ -1856,7 +1856,6 @@ ISCSI volumes support ownership management and SELinux relabeling.


> +protobuf.options.(gogoproto.goproto_stringer)=false
+kubebuilder:validation:Type=object



Expand Down Expand Up @@ -2511,11 +2510,8 @@ be cluster-scoped, so there is no namespace field.
### <span id="parallel-steps"></span> ParallelSteps


> +kubebuilder:validation:Type=array




[interface{}](#interface)

### <span id="parameter"></span> Parameter
Expand Down Expand Up @@ -3391,7 +3387,7 @@ cause implementors to also use a fixed point implementation.
| resources | [ResourceRequirements](#resource-requirements)| `ResourceRequirements` | | | | |
| restartPolicy | [ContainerRestartPolicy](#container-restart-policy)| `ContainerRestartPolicy` | | | | |
| securityContext | [SecurityContext](#security-context)| `SecurityContext` | | | | |
| source | string| `string` | | | Source contains the source code of the script to execute | |
| source | string| `string` | | | Source contains the source code of the script to execute</br>+optional | |
| startupProbe | [Probe](#probe)| `Probe` | | | | |
| stdin | boolean| `bool` | | | Whether this container should allocate a buffer for stdin in the container runtime. If this</br>is not set, reads from stdin in the container will always result in EOF.</br>Default is false.</br>+optional | |
| stdinOnce | boolean| `bool` | | | Whether the container runtime should close the stdin channel after it has been opened by</br>a single attach. When stdin is true the stdin stream will remain open across multiple attach</br>sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the</br>first client attaches to stdin, and then remains open and accepts data until the client disconnects,</br>at which time stdin is closed and remains closed until the container is restarted. If this</br>flag is false, a container processes that reads from stdin will never receive an EOF.</br>Default is false</br>+optional | |
Expand Down
10 changes: 5 additions & 5 deletions docs/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ Template is a reusable and composable unit of execution in a workflow
|`nodeSelector`|`Map< string , string >`|NodeSelector is a selector to schedule this step of the workflow to be run on the selected node(s). Overrides the selector set at the workflow level.|
|`outputs`|[`Outputs`](#outputs)|Outputs describe the parameters and artifacts that this template produces|
|`parallelism`|`integer`|Parallelism limits the max total parallel pods that can execute at the same time within the boundaries of this template invocation. If additional steps/dag templates are invoked, the pods created by those templates will not be counted towards this total.|
|`plugin`|[`Plugin`](#plugin)|Plugin is a plugin template|
|`plugin`|[`Plugin`](#plugin)|Plugin is a plugin template Note: the structure of a plugin template is free-form, so we need to have "x-kubernetes-preserve-unknown-fields: true" in the validation schema.|
|`podSpecPatch`|`string`|PodSpecPatch holds strategic merge patch to apply against the pod spec. Allows parameterization of container fields which are not strings (e.g. resource limits).|
|`priority`|`integer`|Priority to apply to workflow pods.|
|`priorityClassName`|`string`|PriorityClassName to apply to workflow pods.|
Expand Down Expand Up @@ -3263,13 +3263,13 @@ WorkflowStep is a reference to a template to execute in a series of step
|`arguments`|[`Arguments`](#arguments)|Arguments hold arguments to the template|
|`continueOn`|[`ContinueOn`](#continueon)|ContinueOn makes argo to proceed with the following step even if this step fails. Errors and Failed states can be specified|
|`hooks`|[`LifecycleHook`](#lifecyclehook)|Hooks holds the lifecycle hook which is invoked at lifecycle of step, irrespective of the success, failure, or error status of the primary step|
|`inline`|[`Template`](#template)|Inline is the template. Template must be empty if this is declared (and vice-versa).|
|`inline`|[`Template`](#template)|Inline is the template. Template must be empty if this is declared (and vice-versa). Note: This struct is defined recursively, since the inline template can potentially contain steps/DAGs that also has an "inline" field. Kubernetes doesn't allow recursive types, so we need "x-kubernetes-preserve-unknown-fields: true" in the validation schema.|
|`name`|`string`|Name of the step|
|~~`onExit`~~|~~`string`~~|~~OnExit is a template reference which is invoked at the end of the template, irrespective of the success, failure, or error of the primary template.~~ DEPRECATED: Use Hooks[exit].Template instead.|
|`template`|`string`|Template is the name of the template to execute as the step|
|`templateRef`|[`TemplateRef`](#templateref)|TemplateRef is the reference to the template resource to execute as the step.|
|`when`|`string`|When is an expression in which the step should conditionally execute|
|`withItems`|`Array<`[`Item`](#item)`>`|WithItems expands a step into multiple parallel steps from the items in the list|
|`withItems`|`Array<`[`Item`](#item)`>`|WithItems expands a step into multiple parallel steps from the items in the list Note: The structure of WithItems is free-form, so we need "x-kubernetes-preserve-unknown-fields: true" in the validation schema.|
|`withParam`|`string`|WithParam expands a step into multiple parallel steps from the value in the parameter, which is expected to be a JSON list.|
|`withSequence`|[`Sequence`](#sequence)|WithSequence expands a step into a numeric sequence|

Expand Down Expand Up @@ -4020,13 +4020,13 @@ DAGTask represents a node in the graph during DAG execution
|`dependencies`|`Array< string >`|Dependencies are name of other targets which this depends on|
|`depends`|`string`|Depends are name of other targets which this depends on|
|`hooks`|[`LifecycleHook`](#lifecyclehook)|Hooks hold the lifecycle hook which is invoked at lifecycle of task, irrespective of the success, failure, or error status of the primary task|
|`inline`|[`Template`](#template)|Inline is the template. Template must be empty if this is declared (and vice-versa).|
|`inline`|[`Template`](#template)|Inline is the template. Template must be empty if this is declared (and vice-versa). Note: As mentioned in the corresponding definition in WorkflowStep, this struct is defined recursively, so we need "x-kubernetes-preserve-unknown-fields: true" in the validation schema.|
|`name`|`string`|Name is the name of the target|
|~~`onExit`~~|~~`string`~~|~~OnExit is a template reference which is invoked at the end of the template, irrespective of the success, failure, or error of the primary template.~~ DEPRECATED: Use Hooks[exit].Template instead.|
|`template`|`string`|Name of template to execute|
|`templateRef`|[`TemplateRef`](#templateref)|TemplateRef is the reference to the template resource to execute.|
|`when`|`string`|When is an expression in which the task should conditionally execute|
|`withItems`|`Array<`[`Item`](#item)`>`|WithItems expands a task into multiple parallel tasks from the items in the list|
|`withItems`|`Array<`[`Item`](#item)`>`|WithItems expands a task into multiple parallel tasks from the items in the list Note: The structure of WithItems is free-form, so we need "x-kubernetes-preserve-unknown-fields: true" in the validation schema.|
|`withParam`|`string`|WithParam expands a task into multiple parallel tasks from the value in the parameter, which is expected to be a JSON list.|
|`withSequence`|[`Sequence`](#sequence)|WithSequence expands a task into a numeric sequence|

Expand Down
10 changes: 10 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ You can use Kustomize to patch your preferred [configurations](managed-namespace

You can install Argo Workflows using the community maintained [Helm charts](https://github.com/argoproj/argo-helm).

### Full CRDs

The official release manifests come with stripped-down CRDs that omit validation information.
This is a workaround for [Kubernetes size limitations](https://github.com/kubernetes/kubernetes/issues/82292) when using client-side apply.
As of version 3.7, the full CRDs can be installed using [server-side apply](https://kubernetes.io/docs/reference/using-api/server-side-apply/) via the following command:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If this doesn't go out as part of 3.7, I'll remove this before it's merged

Copy link
Member

Choose a reason for hiding this comment

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

👍


```bash
kubectl apply --server-side --kustomize https://github.com/argoproj/argo-workflows/manifests/base/crds/full?ref=v3.7.0
```

## Installation options

Determine your base installation option.
Expand Down
2 changes: 1 addition & 1 deletion hack/manifests/crdgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_header() {
mv tmp "$1"
}

controller-gen crd:maxDescLen=0 paths=./pkg/apis/... output:dir=manifests/base/crds/full
controller-gen crd:maxDescLen=0,generateEmbeddedObjectMeta=true paths=./pkg/apis/... output:dir=manifests/base/crds/full

find manifests/base/crds/full -name 'argoproj.io*.yaml' | while read -r file; do
# remove junk fields
Expand Down
Loading