apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.10.0
  creationTimestamp: null
  name: operations.aep.asag.io
spec:
  group: aep.asag.io
  names:
    kind: Operation
    listKind: OperationList
    plural: operations
    shortNames:
    - op
    - ops
    - aepop
    - aepops
    singular: operation
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.procedure
      name: Procedure
      type: string
    - jsonPath: .spec.procedureKind
      name: Kind
      type: string
    - jsonPath: .spec.agentName
      name: Agent
      type: string
    - jsonPath: .status.closed
      name: Closed
      type: boolean
    - jsonPath: .status.phase
      name: Phase
      type: string
    - jsonPath: .metadata.ownerReferences[?(@.controller==true)].kind
      name: OwnerKind
      priority: 2
      type: string
    - jsonPath: .metadata.ownerReferences[?(@.controller==true)].name
      name: OwnerName
      priority: 2
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Operation is a specification for a Operation CRD
        properties:
          apiVersion:
            description: '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.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. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Spec of this resource
            properties:
              agentName:
                description: AgentName is a request to schedule this operation onto
                  a specific agent. If it is non-empty, an agent responsible (by matching
                  metadata of this operation) simply assigns this onto itself.
                type: string
              arguments:
                description: Arguments for the procedure
                type: object
                x-kubernetes-preserve-unknown-fields: true
              cancel:
                description: Cancel forces the execution of the procedure to be forcefully
                  stopped, if already running. If not yet running, the assigned operator
                  ignores the execution and set it to Closed.
                type: boolean
              procedure:
                description: Procedure is the requested command or referenced identifier
                  (depending on the implementation) to be executed.
                minLength: 1
                type: string
              procedureKind:
                description: ProcedureKind is a request to schedule this operation
                  onto a specific agent capable of running this procedure kind. If
                  it is non-empty, the agent responsible assigns his type.
                type: string
              version:
                description: Version defines the interface version for the procedure-arguments
                  signature
                type: string
            required:
            - procedure
            type: object
          status:
            description: Status of this resource
            properties:
              closed:
                description: Closed marks this operation closed and agents must not
                  process this resource
                type: boolean
              conditions:
                description: Conditions for the status
                items:
                  description: StatusCondition contains details for the current condition
                    of this resource.
                  properties:
                    message:
                      description: Human-readable message indicating details about
                        last transition.
                      type: string
                    reason:
                      description: Unique, one-word, CamelCase reason for the condition's
                        last transition.
                      type: string
                    satisfied:
                      description: Satisfied is the status of the condition. Can be
                        True, False, Unknown.
                      enum:
                      - "True"
                      - "False"
                      - Unknown
                      type: string
                    type:
                      description: Type is the type of the condition.
                      minLength: 1
                      type: string
                  required:
                  - satisfied
                  - type
                  type: object
                type: array
              phase:
                description: Phase represent the current state of the operation
                enum:
                - ""
                - assigned
                - running
                - notready
                - cancelled
                - done
                - error
                type: string
              values:
                description: The procedure on the agent returned the following additional
                  data. How they are collected is documented in the used agent. What
                  data is expected and how they are used is defined by the procedure
                  interface.
                type: object
                x-kubernetes-preserve-unknown-fields: true
            required:
            - phase
            type: object
        required:
        - metadata
        - spec
        type: object
    served: true
    storage: true
    subresources: {}

