diff --git a/api/jsonschema/schema.json b/api/jsonschema/schema.json index d0e7c5366a63..0daa6360b31f 100644 --- a/api/jsonschema/schema.json +++ b/api/jsonschema/schema.json @@ -4424,6 +4424,9 @@ }, "spec": { "$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowSpec" + }, + "status": { + "$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTemplateStatus" } }, "required": [ diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 005cb7c20606..fe77ef32c4eb 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -8469,6 +8469,9 @@ }, "spec": { "$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowSpec" + }, + "status": { + "$ref": "#/definitions/io.argoproj.workflow.v1alpha1.WorkflowTemplateStatus" } } }, diff --git a/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml b/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml index 0cc5f7ca2477..1f6e0d6a1000 100644 --- a/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml +++ b/manifests/base/crds/full/argoproj.io_clusterworkflowtemplates.yaml @@ -21752,6 +21752,12 @@ spec: type: string type: object type: object + status: + properties: + lastRunAt: + format: date-time + type: string + type: object required: - metadata - spec diff --git a/manifests/base/crds/minimal/argoproj.io_clusterworkflowtemplates.yaml b/manifests/base/crds/minimal/argoproj.io_clusterworkflowtemplates.yaml index 889dfe2f508f..028ee1eb433e 100644 --- a/manifests/base/crds/minimal/argoproj.io_clusterworkflowtemplates.yaml +++ b/manifests/base/crds/minimal/argoproj.io_clusterworkflowtemplates.yaml @@ -28,6 +28,10 @@ spec: type: object x-kubernetes-map-type: atomic x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true required: - metadata - spec diff --git a/manifests/quick-start-minimal.yaml b/manifests/quick-start-minimal.yaml index 855c5f3ef80b..1ade59633ab6 100644 --- a/manifests/quick-start-minimal.yaml +++ b/manifests/quick-start-minimal.yaml @@ -29,6 +29,10 @@ spec: type: object x-kubernetes-map-type: atomic x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true required: - metadata - spec diff --git a/manifests/quick-start-mysql.yaml b/manifests/quick-start-mysql.yaml index 230fa7b009c3..9ded98259d68 100644 --- a/manifests/quick-start-mysql.yaml +++ b/manifests/quick-start-mysql.yaml @@ -29,6 +29,10 @@ spec: type: object x-kubernetes-map-type: atomic x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true required: - metadata - spec diff --git a/manifests/quick-start-postgres.yaml b/manifests/quick-start-postgres.yaml index 0c5d082e8678..11e6e1f87e5e 100644 --- a/manifests/quick-start-postgres.yaml +++ b/manifests/quick-start-postgres.yaml @@ -29,6 +29,10 @@ spec: type: object x-kubernetes-map-type: atomic x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true required: - metadata - spec diff --git a/pkg/apis/workflow/v1alpha1/cluster_workflow_template_types.go b/pkg/apis/workflow/v1alpha1/cluster_workflow_template_types.go index a9c27f620e8d..9a462edee0d3 100644 --- a/pkg/apis/workflow/v1alpha1/cluster_workflow_template_types.go +++ b/pkg/apis/workflow/v1alpha1/cluster_workflow_template_types.go @@ -15,7 +15,8 @@ import ( type ClusterWorkflowTemplate struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Spec WorkflowSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + Spec WorkflowSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + Status WorkflowTemplateStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } type ClusterWorkflowTemplates []ClusterWorkflowTemplate diff --git a/pkg/apis/workflow/v1alpha1/generated.pb.go b/pkg/apis/workflow/v1alpha1/generated.pb.go index 59c8e9f90f80..5ffaac2a7462 100644 --- a/pkg/apis/workflow/v1alpha1/generated.pb.go +++ b/pkg/apis/workflow/v1alpha1/generated.pb.go @@ -6786,6 +6786,16 @@ func (m *ClusterWorkflowTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenerated(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -14831,6 +14841,8 @@ func (m *ClusterWorkflowTemplate) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) + l = m.Status.Size() + n += 1 + l + sovGenerated(uint64(l)) return n } @@ -17922,6 +17934,7 @@ func (this *ClusterWorkflowTemplate) String() string { s := strings.Join([]string{`&ClusterWorkflowTemplate{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "WorkflowSpec", "WorkflowSpec", 1), `&`, ``, 1) + `,`, + `Status:` + strings.Replace(strings.Replace(this.Status.String(), "WorkflowTemplateStatus", "WorkflowTemplateStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -24963,6 +24976,39 @@ func (m *ClusterWorkflowTemplate) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenerated + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenerated + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenerated + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) diff --git a/pkg/apis/workflow/v1alpha1/generated.proto b/pkg/apis/workflow/v1alpha1/generated.proto index 44547ee793ad..7769f5f07256 100644 --- a/pkg/apis/workflow/v1alpha1/generated.proto +++ b/pkg/apis/workflow/v1alpha1/generated.proto @@ -367,6 +367,8 @@ message ClusterWorkflowTemplate { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional WorkflowSpec spec = 2; + + optional WorkflowTemplateStatus status = 3; } // ClusterWorkflowTemplateList is list of ClusterWorkflowTemplate resources diff --git a/pkg/apis/workflow/v1alpha1/openapi_generated.go b/pkg/apis/workflow/v1alpha1/openapi_generated.go index 64cd123d0540..28431d4a99c6 100644 --- a/pkg/apis/workflow/v1alpha1/openapi_generated.go +++ b/pkg/apis/workflow/v1alpha1/openapi_generated.go @@ -1533,12 +1533,18 @@ func schema_pkg_apis_workflow_v1alpha1_ClusterWorkflowTemplate(ref common.Refere Ref: ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.WorkflowSpec"), }, }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.WorkflowTemplateStatus"), + }, + }, }, Required: []string{"metadata", "spec"}, }, }, Dependencies: []string{ - "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.WorkflowSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.WorkflowSpec", "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1.WorkflowTemplateStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, } } diff --git a/pkg/apis/workflow/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/workflow/v1alpha1/zz_generated.deepcopy.go index 89fd13e461a7..765f8fe26403 100644 --- a/pkg/apis/workflow/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/workflow/v1alpha1/zz_generated.deepcopy.go @@ -776,6 +776,7 @@ func (in *ClusterWorkflowTemplate) DeepCopyInto(out *ClusterWorkflowTemplate) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) return } diff --git a/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md b/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md index 353b7076e538..0df7c064c95b 100644 --- a/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md +++ b/sdks/java/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **kind** | **String** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] **metadata** | [**io.kubernetes.client.openapi.models.V1ObjectMeta**](io.kubernetes.client.openapi.models.V1ObjectMeta.md) | | **spec** | [**IoArgoprojWorkflowV1alpha1WorkflowSpec**](IoArgoprojWorkflowV1alpha1WorkflowSpec.md) | | +**status** | [**IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus**](IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus.md) | | [optional] diff --git a/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_cluster_workflow_template.py b/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_cluster_workflow_template.py index b9b2c127ad4d..bc8f1e1fa411 100644 --- a/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_cluster_workflow_template.py +++ b/sdks/python/client/argo_workflows/model/io_argoproj_workflow_v1alpha1_cluster_workflow_template.py @@ -31,8 +31,10 @@ def lazy_import(): from argo_workflows.model.io_argoproj_workflow_v1alpha1_workflow_spec import IoArgoprojWorkflowV1alpha1WorkflowSpec + from argo_workflows.model.io_argoproj_workflow_v1alpha1_workflow_template_status import IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus from argo_workflows.model.object_meta import ObjectMeta globals()['IoArgoprojWorkflowV1alpha1WorkflowSpec'] = IoArgoprojWorkflowV1alpha1WorkflowSpec + globals()['IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus'] = IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus globals()['ObjectMeta'] = ObjectMeta @@ -93,6 +95,7 @@ def openapi_types(): 'spec': (IoArgoprojWorkflowV1alpha1WorkflowSpec,), # noqa: E501 'api_version': (str,), # noqa: E501 'kind': (str,), # noqa: E501 + 'status': (IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus,), # noqa: E501 } @cached_property @@ -105,6 +108,7 @@ def discriminator(): 'spec': 'spec', # noqa: E501 'api_version': 'apiVersion', # noqa: E501 'kind': 'kind', # noqa: E501 + 'status': 'status', # noqa: E501 } read_only_vars = { @@ -154,6 +158,7 @@ def _from_openapi_data(cls, metadata, spec, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) api_version (str): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#resources. [optional] # noqa: E501 kind (str): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. [optional] # noqa: E501 + status (IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -243,6 +248,7 @@ def __init__(self, metadata, spec, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) api_version (str): APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#resources. [optional] # noqa: E501 kind (str): Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. [optional] # noqa: E501 + status (IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus): [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/sdks/python/client/docs/ClusterWorkflowTemplateServiceApi.md b/sdks/python/client/docs/ClusterWorkflowTemplateServiceApi.md index f0d815b1073b..7224ba74df65 100644 --- a/sdks/python/client/docs/ClusterWorkflowTemplateServiceApi.md +++ b/sdks/python/client/docs/ClusterWorkflowTemplateServiceApi.md @@ -11293,6 +11293,9 @@ with argo_workflows.ApiClient(configuration) as api_client: name="name_example", ), ), + status=IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus( + last_run_at=dateutil_parser('1970-01-01T00:00:00.00Z'), + ), ), ) # IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateCreateRequest | @@ -22800,6 +22803,9 @@ with argo_workflows.ApiClient(configuration) as api_client: name="name_example", ), ), + status=IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus( + last_run_at=dateutil_parser('1970-01-01T00:00:00.00Z'), + ), ), ) # IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateLintRequest | @@ -34213,6 +34219,9 @@ with argo_workflows.ApiClient(configuration) as api_client: name="name_example", ), ), + status=IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus( + last_run_at=dateutil_parser('1970-01-01T00:00:00.00Z'), + ), ), ) # IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplateUpdateRequest | diff --git a/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md b/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md index 5f7ef820c86a..863652f37a70 100644 --- a/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md +++ b/sdks/python/client/docs/IoArgoprojWorkflowV1alpha1ClusterWorkflowTemplate.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **spec** | [**IoArgoprojWorkflowV1alpha1WorkflowSpec**](IoArgoprojWorkflowV1alpha1WorkflowSpec.md) | | **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#resources | [optional] **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.io.k8s.community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | [optional] +**status** | [**IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus**](IoArgoprojWorkflowV1alpha1WorkflowTemplateStatus.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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)