apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: nodenetworkstates.nmstate.io
spec:
  group: nmstate.io
  names:
    kind: NodeNetworkState
    listKind: NodeNetworkStateList
    plural: nodenetworkstates
    shortNames:
    - nns
    singular: nodenetworkstate
  scope: Cluster
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: NodeNetworkState is the Schema for the nodenetworkstates API
        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
          status:
            description: NodeNetworkStateStatus is the status of the NodeNetworkState
              of a specific node
            properties:
              conditions:
                items:
                  properties:
                    lastHearbeatTime:
                      format: date-time
                      type: string
                    lastTransitionTime:
                      format: date-time
                      type: string
                    message:
                      type: string
                    reason:
                      type: string
                    status:
                      type: string
                    type:
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              currentState:
                description: "State contains the namestatectl yaml [1] as string instead
                  of golang struct so we don't need to be in sync with the schema.
                  \n [1] https://github.com/nmstate/nmstate/blob/master/libnmstate/schemas/operational-state.yaml"
                type: object
                x-kubernetes-preserve-unknown-fields: true
              lastSuccessfulUpdateTime:
                format: date-time
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
