{
  "description": "A CronOperation creates Operations on a cron schedule.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "CronOperationSpec specifies the desired state of a CronOperation.",
      "properties": {
        "concurrencyPolicy": {
          "default": "Allow",
          "description": "ConcurrencyPolicy specifies how to treat concurrent executions of an\noperation.",
          "enum": [
            "Allow",
            "Forbid",
            "Replace"
          ],
          "type": "string"
        },
        "failedHistoryLimit": {
          "default": 1,
          "description": "FailedHistoryLimit is the number of failed Operations to retain.",
          "format": "int32",
          "type": "integer"
        },
        "operationTemplate": {
          "description": "OperationTemplate is the template for the Operation to be created.",
          "properties": {
            "metadata": {
              "description": "Standard object metadata.",
              "type": "object"
            },
            "spec": {
              "description": "Spec is the specification of the Operation to be created.",
              "properties": {
                "mode": {
                  "default": "Pipeline",
                  "description": "Mode controls what type or \"mode\" of operation will be used.\n\n\"Pipeline\" indicates that an Operation specifies a pipeline of\nfunctions, each of which is responsible for implementing its logic.",
                  "enum": [
                    "Pipeline"
                  ],
                  "type": "string"
                },
                "pipeline": {
                  "description": "Pipeline is a list of operation function steps that will be used when\nthis operation runs.",
                  "items": {
                    "description": "A PipelineStep in an operation function pipeline.",
                    "properties": {
                      "credentials": {
                        "description": "Credentials are optional credentials that the operation function needs.",
                        "items": {
                          "description": "FunctionCredentials are optional credentials that a function\nneeds to run.",
                          "properties": {
                            "name": {
                              "description": "Name of this set of credentials.",
                              "type": "string"
                            },
                            "secretRef": {
                              "description": "A SecretRef is a reference to a secret containing credentials that should\nbe supplied to the function.",
                              "properties": {
                                "name": {
                                  "description": "Name of the secret.",
                                  "type": "string"
                                },
                                "namespace": {
                                  "description": "Namespace of the secret.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "name",
                                "namespace"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "source": {
                              "description": "Source of the function credentials.",
                              "enum": [
                                "None",
                                "Secret"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "source"
                          ],
                          "type": "object",
                          "additionalProperties": false
                        },
                        "type": "array",
                        "x-kubernetes-list-map-keys": [
                          "name"
                        ],
                        "x-kubernetes-list-type": "map"
                      },
                      "functionRef": {
                        "description": "FunctionRef is a reference to the function this step should\nexecute.",
                        "properties": {
                          "name": {
                            "description": "Name of the referenced function.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "name"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "input": {
                        "description": "Input is an optional, arbitrary Kubernetes resource (i.e. a resource\nwith an apiVersion and kind) that will be passed to the unction as\nthe 'input' of its RunFunctionRequest.",
                        "type": "object",
                        "x-kubernetes-embedded-resource": true,
                        "x-kubernetes-preserve-unknown-fields": true
                      },
                      "requirements": {
                        "description": "Requirements are resource requirements that will be satisfied before\nthis pipeline step is called for the first time. This allows\npre-populating required resources without requiring a function to\nrequest them first.",
                        "properties": {
                          "requiredResources": {
                            "description": "RequiredResources that will be fetched before this pipeline step\nis called for the first time.",
                            "items": {
                              "description": "RequiredResourceSelector selects resources that should be fetched before\na pipeline step runs.",
                              "properties": {
                                "apiVersion": {
                                  "description": "APIVersion of resources to select.",
                                  "type": "string"
                                },
                                "kind": {
                                  "description": "Kind of resources to select.",
                                  "type": "string"
                                },
                                "matchLabels": {
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "MatchLabels matches resources by label selector. Only one of Name or\nMatchLabels may be specified.",
                                  "type": "object"
                                },
                                "name": {
                                  "description": "Name matches a single resource by name. Only one of Name or\nMatchLabels may be specified.",
                                  "type": "string"
                                },
                                "namespace": {
                                  "description": "Namespace to search for resources. Optional for cluster-scoped resources.",
                                  "type": "string"
                                },
                                "requirementName": {
                                  "description": "RequirementName uniquely identifies this group of resources.\nThis name will be used as the key in RunFunctionRequest.required_resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "apiVersion",
                                "kind",
                                "requirementName"
                              ],
                              "type": "object",
                              "x-kubernetes-validations": [
                                {
                                  "message": "Either name or matchLabels must be specified, but not both",
                                  "rule": "(has(self.name) && !has(self.matchLabels)) || (!has(self.name) && has(self.matchLabels))"
                                }
                              ],
                              "additionalProperties": false
                            },
                            "type": "array",
                            "x-kubernetes-list-map-keys": [
                              "requirementName"
                            ],
                            "x-kubernetes-list-type": "map"
                          }
                        },
                        "type": "object",
                        "additionalProperties": false
                      },
                      "step": {
                        "description": "Step name. Must be unique within its Pipeline.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "functionRef",
                      "step"
                    ],
                    "type": "object",
                    "additionalProperties": false
                  },
                  "maxItems": 99,
                  "minItems": 1,
                  "type": "array",
                  "x-kubernetes-list-map-keys": [
                    "step"
                  ],
                  "x-kubernetes-list-type": "map"
                },
                "retryLimit": {
                  "description": "RetryLimit configures how many times the operation may fail. When the\nfailure limit is exceeded, the operation will not be retried.",
                  "format": "int64",
                  "type": "integer"
                }
              },
              "required": [
                "mode",
                "pipeline"
              ],
              "type": "object",
              "additionalProperties": false
            }
          },
          "required": [
            "spec"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "schedule": {
          "description": "Schedule is the cron schedule for the operation.",
          "type": "string"
        },
        "startingDeadlineSeconds": {
          "description": "StartingDeadlineSeconds is the deadline in seconds for starting the\noperation if it misses its scheduled time for any reason.",
          "format": "int64",
          "type": "integer"
        },
        "successfulHistoryLimit": {
          "default": 3,
          "description": "SuccessfulHistoryLimit is the number of successful Operations to retain.",
          "format": "int32",
          "type": "integer"
        }
      },
      "required": [
        "operationTemplate",
        "schedule"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "CronOperationStatus represents the observed state of a CronOperation.",
      "properties": {
        "conditions": {
          "description": "Conditions of the resource.",
          "items": {
            "description": "A Condition that may apply to a resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "LastTransitionTime is the last time this condition transitioned from one\nstatus to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "A Message containing details about this condition's last transition from\none status to another, if any.",
                "type": "string"
              },
              "observedGeneration": {
                "description": "ObservedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "type": "integer"
              },
              "reason": {
                "description": "A Reason for this condition's last transition from one status to another.",
                "type": "string"
              },
              "status": {
                "description": "Status of this condition; is it currently True, False, or Unknown?",
                "type": "string"
              },
              "type": {
                "description": "Type of this condition. At most one of each condition type may apply to\na resource at any point in time.",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "lastScheduleTime": {
          "description": "LastScheduleTime is the last time the CronOperation was scheduled.",
          "format": "date-time",
          "type": "string"
        },
        "lastSuccessfulTime": {
          "description": "LastSuccessfulTime is the last time the CronOperation was successfully\ncompleted.",
          "format": "date-time",
          "type": "string"
        },
        "runningOperationRefs": {
          "description": "RunningOperationRefs is a list of currently running Operations.",
          "items": {
            "description": "A RunningOperationRef is a reference to a running operation.",
            "properties": {
              "name": {
                "description": "Name of the active operation.",
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
