diff --git a/api/jsonschema/schema.json b/api/jsonschema/schema.json index df07b21a36ca..bef180071978 100644 --- a/api/jsonschema/schema.json +++ b/api/jsonschema/schema.json @@ -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": { diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 3238b4f0f01a..1784b01a48c6 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -10434,9 +10434,6 @@ }, "io.argoproj.workflow.v1alpha1.LifecycleHook": { "type": "object", - "required": [ - "template" - ], "properties": { "arguments": { "description": "Arguments hold arguments to the template", diff --git a/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml b/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml index 34279f03638a..40dd0cebac32 100644 --- a/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml +++ b/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml @@ -1293,8 +1293,6 @@ spec: template: type: string type: object - required: - - template type: object type: object hostAliases: @@ -4377,8 +4375,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -11239,8 +11235,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} diff --git a/manifests/base/crds/full/argoproj.io_cronworkflows.yaml b/manifests/base/crds/full/argoproj.io_cronworkflows.yaml index 702fdf86c499..6faa445846d9 100644 --- a/manifests/base/crds/full/argoproj.io_cronworkflows.yaml +++ b/manifests/base/crds/full/argoproj.io_cronworkflows.yaml @@ -1314,8 +1314,6 @@ spec: template: type: string type: object - required: - - template type: object type: object hostAliases: @@ -4398,8 +4396,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -11260,8 +11256,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} diff --git a/manifests/base/crds/full/argoproj.io_workflows.yaml b/manifests/base/crds/full/argoproj.io_workflows.yaml index bff05514e2c3..9a2fcac4f105 100644 --- a/manifests/base/crds/full/argoproj.io_workflows.yaml +++ b/manifests/base/crds/full/argoproj.io_workflows.yaml @@ -1307,8 +1307,6 @@ spec: template: type: string type: object - required: - - template type: object type: object hostAliases: @@ -4391,8 +4389,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -11253,8 +11249,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -21292,8 +21286,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -26639,8 +26631,6 @@ spec: template: type: string type: object - required: - - template type: object type: object hostAliases: @@ -29723,8 +29713,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -36585,8 +36573,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} diff --git a/manifests/base/crds/full/argoproj.io_workflowtasksets.yaml b/manifests/base/crds/full/argoproj.io_workflowtasksets.yaml index d89fb17a4d47..4e8e6314e7d0 100644 --- a/manifests/base/crds/full/argoproj.io_workflowtasksets.yaml +++ b/manifests/base/crds/full/argoproj.io_workflowtasksets.yaml @@ -2810,8 +2810,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} diff --git a/manifests/base/crds/full/argoproj.io_workflowtemplates.yaml b/manifests/base/crds/full/argoproj.io_workflowtemplates.yaml index 6f10464ebad8..ddece7003d5b 100644 --- a/manifests/base/crds/full/argoproj.io_workflowtemplates.yaml +++ b/manifests/base/crds/full/argoproj.io_workflowtemplates.yaml @@ -1292,8 +1292,6 @@ spec: template: type: string type: object - required: - - template type: object type: object hostAliases: @@ -4376,8 +4374,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} @@ -11238,8 +11234,6 @@ spec: template: type: string type: object - required: - - template type: object type: object inline: {} diff --git a/pkg/apis/workflow/v1alpha1/openapi_generated.go b/pkg/apis/workflow/v1alpha1/openapi_generated.go index 64c250bd4b9a..f5dc6a7f5127 100644 --- a/pkg/apis/workflow/v1alpha1/openapi_generated.go +++ b/pkg/apis/workflow/v1alpha1/openapi_generated.go @@ -2974,7 +2974,6 @@ func schema_pkg_apis_workflow_v1alpha1_LifecycleHook(ref common.ReferenceCallbac "template": { SchemaProps: spec.SchemaProps{ Description: "Template is the name of the template to execute by the hook", - Default: "", Type: []string{"string"}, Format: "", }, @@ -3000,7 +2999,6 @@ func schema_pkg_apis_workflow_v1alpha1_LifecycleHook(ref common.ReferenceCallbac }, }, }, - Required: []string{"template"}, }, }, Dependencies: []string{ diff --git a/pkg/apis/workflow/v1alpha1/workflow_types.go b/pkg/apis/workflow/v1alpha1/workflow_types.go index 90d1ceb9c178..7aac5502420c 100644 --- a/pkg/apis/workflow/v1alpha1/workflow_types.go +++ b/pkg/apis/workflow/v1alpha1/workflow_types.go @@ -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 diff --git a/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md b/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md index c4b0ff16703f..f5ac1bf2a5a4 100644 --- a/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md +++ b/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md @@ -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] diff --git a/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_lifecycle_hook.py b/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_lifecycle_hook.py index 770a33a644ab..0f22b6f4644a 100644 --- a/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_lifecycle_hook.py +++ b/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_lifecycle_hook.py @@ -89,9 +89,9 @@ def openapi_types(): """ lazy_import() return { - 'template': (str,), # noqa: E501 'arguments': (IoArgoprojWorkflowV1alpha1Arguments,), # noqa: E501 'expression': (str,), # noqa: E501 + 'template': (str,), # noqa: E501 'template_ref': (IoArgoprojWorkflowV1alpha1TemplateRef,), # noqa: E501 } @@ -101,9 +101,9 @@ def discriminator(): attribute_map = { - 'template': 'template', # noqa: E501 'arguments': 'arguments', # noqa: E501 'expression': 'expression', # noqa: E501 + 'template': 'template', # noqa: E501 'template_ref': 'templateRef', # noqa: E501 } @@ -114,12 +114,9 @@ def discriminator(): @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 + def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """IoArgoprojWorkflowV1alpha1LifecycleHook - a model defined in OpenAPI - Args: - template (str): Template is the name of the template to execute by the hook - Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -153,6 +150,7 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) arguments (IoArgoprojWorkflowV1alpha1Arguments): [optional] # noqa: E501 expression (str): 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] # noqa: E501 + template (str): Template is the name of the template to execute by the hook. [optional] # noqa: E501 template_ref (IoArgoprojWorkflowV1alpha1TemplateRef): [optional] # noqa: E501 """ @@ -181,7 +179,6 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.template = template for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ @@ -202,12 +199,9 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 ]) @convert_js_args_to_python_args - def __init__(self, template, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """IoArgoprojWorkflowV1alpha1LifecycleHook - a model defined in OpenAPI - Args: - template (str): Template is the name of the template to execute by the hook - Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be @@ -241,6 +235,7 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) arguments (IoArgoprojWorkflowV1alpha1Arguments): [optional] # noqa: E501 expression (str): 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] # noqa: E501 + template (str): Template is the name of the template to execute by the hook. [optional] # noqa: E501 template_ref (IoArgoprojWorkflowV1alpha1TemplateRef): [optional] # noqa: E501 """ @@ -267,7 +262,6 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.template = template for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ diff --git a/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md b/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md index 283ca30e77fd..b269599dd23b 100644 --- a/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md +++ b/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1LifecycleHook.md @@ -4,9 +4,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**template** | **str** | Template is the name of the template to execute by the hook | **arguments** | [**IoArgoprojWorkflowV1alpha1Arguments**](IoArgoprojWorkflowV1alpha1Arguments.md) | | [optional] **expression** | **str** | 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** | **str** | Template is the name of the template to execute by the hook | [optional] **template_ref** | [**IoArgoprojWorkflowV1alpha1TemplateRef**](IoArgoprojWorkflowV1alpha1TemplateRef.md) | | [optional] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]