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: Template in Lifecycle hook should be optional #8735

Merged
merged 1 commit into from
May 11, 2022
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
3 changes: 0 additions & 3 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5998,9 +5998,6 @@
"description": "TemplateRef is the reference to the template resource to execute by the hook"
}
},
"required": [
"template"
],
"type": "object"
},
"io.argoproj.workflow.v1alpha1.Link": {
Expand Down
3 changes: 0 additions & 3 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10434,9 +10434,6 @@
},
"io.argoproj.workflow.v1alpha1.LifecycleHook": {
"type": "object",
"required": [
"template"
],
"properties": {
"arguments": {
"description": "Arguments hold arguments to the template",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1293,8 +1293,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
hostAliases:
Expand Down Expand Up @@ -4377,8 +4375,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -11239,8 +11235,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down
6 changes: 0 additions & 6 deletions manifests/base/crds/full/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1314,8 +1314,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
hostAliases:
Expand Down Expand Up @@ -4398,8 +4396,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -11260,8 +11256,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down
14 changes: 0 additions & 14 deletions manifests/base/crds/full/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1307,8 +1307,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
hostAliases:
Expand Down Expand Up @@ -4391,8 +4389,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -11253,8 +11249,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -21292,8 +21286,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -26639,8 +26631,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
hostAliases:
Expand Down Expand Up @@ -29723,8 +29713,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -36585,8 +36573,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down
2 changes: 0 additions & 2 deletions manifests/base/crds/full/argoproj.io_workflowtasksets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2810,8 +2810,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down
6 changes: 0 additions & 6 deletions manifests/base/crds/full/argoproj.io_workflowtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1292,8 +1292,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
hostAliases:
Expand Down Expand Up @@ -4376,8 +4374,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down Expand Up @@ -11238,8 +11234,6 @@ spec:
template:
type: string
type: object
required:
- template
type: object
type: object
inline: {}
Expand Down
2 changes: 0 additions & 2 deletions pkg/apis/workflow/v1alpha1/openapi_generated.go

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

2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/workflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ func (lchs LifecycleHooks) HasExitHook() bool {

type LifecycleHook struct {
// Template is the name of the template to execute by the hook
Template string `json:"template," protobuf:"bytes,1,opt,name=template"`
Template string `json:"template,omitempty" protobuf:"bytes,1,opt,name=template"`
// Arguments hold arguments to the template
Arguments Arguments `json:"arguments,omitempty" protobuf:"bytes,2,opt,name=arguments"`
// TemplateRef is the reference to the template resource to execute by the hook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**arguments** | [**IoArgoprojWorkflowV1alpha1Arguments**](IoArgoprojWorkflowV1alpha1Arguments.md) | | [optional]
**expression** | **String** | Expression is a condition expression for when a node will be retried. If it evaluates to false, the node will not be retried and the retry strategy will be ignored | [optional]
**template** | **String** | Template is the name of the template to execute by the hook |
**template** | **String** | Template is the name of the template to execute by the hook | [optional]
**templateRef** | [**IoArgoprojWorkflowV1alpha1TemplateRef**](IoArgoprojWorkflowV1alpha1TemplateRef.md) | | [optional]


Expand Down

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

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