apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: besunodes.hyperledger.org
spec:
  group: hyperledger.org
  names:
    kind: BesuNode
    listKind: BesuNodeList
    plural: besunodes
    singular: besunode
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.replicas
      name: Replicas
      type: string
    - jsonPath: .status.readyreplicas
      name: ReadyReplicas
      type: string
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: BesuNode is the Schema for the besunodes 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
          spec:
            description: BesuNodeSpec defines the desired state of BesuNode
            properties:
              bootnodes:
                type: integer
              graphql:
                default:
                  authenticationEnabled: false
                  enabled: false
                  host: 0.0.0.0
                  port: 8547
                description: GraphQl
                properties:
                  api:
                    type: string
                  authenticationEnabled:
                    type: boolean
                  corsOrigins:
                    type: string
                  discovery:
                    type: boolean
                  enabled:
                    description: Port is enabled or not
                    type: boolean
                  host:
                    description: Host
                    type: string
                  port:
                    description: Port
                    type: integer
                type: object
              httpwhitelist:
                description: Defaults to ["*"]
                type: string
              image:
                default:
                  pullPolicy: IfNotPresent
                  repository: hyperledger/besu
                  tag: 1.4.6
                description: Besu Image Configuration
                properties:
                  pullPolicy:
                    default: IfNotPresent
                    description: Image pull policy
                    type: string
                  repository:
                    description: Image repository
                    type: string
                  tag:
                    description: Image tag
                    type: string
                type: object
              metrics:
                default:
                  enabled: true
                  host: 0.0.0.0
                  port: 9545
                description: PortConfig defines port configurations of different types
                  of ports
                properties:
                  api:
                    type: string
                  authenticationEnabled:
                    type: boolean
                  corsOrigins:
                    type: string
                  discovery:
                    type: boolean
                  enabled:
                    description: Port is enabled or not
                    type: boolean
                  host:
                    description: Host
                    type: string
                  port:
                    description: Port
                    type: integer
                type: object
              p2p:
                default:
                  authenticationEnabled: false
                  discovery: true
                  enabled: true
                  host: 0.0.0.0
                  port: 30303
                description: P2P Port configuration
                properties:
                  api:
                    type: string
                  authenticationEnabled:
                    type: boolean
                  corsOrigins:
                    type: string
                  discovery:
                    type: boolean
                  enabled:
                    description: Port is enabled or not
                    type: boolean
                  host:
                    description: Host
                    type: string
                  port:
                    description: Port
                    type: integer
                type: object
              pvcSizeLimit:
                description: Size of the Volume
                type: string
              pvcStorageClass:
                description: Storage class of the Volume
                type: string
              replicas:
                default: 2
                description: Number of replica pods corresponding to this node
                format: int32
                type: integer
              resources:
                default:
                  cpuLimit: 500m
                  cpuRequest: 100m
                  memLimit: 2048Mi
                  memRequest: 1024Mi
                description: Requests and limits
                properties:
                  cpuLimit:
                    description: CPU Limit
                    type: string
                  cpuRequest:
                    description: CPU Request
                    type: string
                  memLimit:
                    description: Memory Limit
                    type: string
                  memRequest:
                    description: Memory Request
                    type: string
                type: object
              rpc:
                default:
                  authenticationEnabled: false
                  enabled: true
                  host: 0.0.0.0
                  port: 8545
                description: RPC Port Configuration
                properties:
                  api:
                    type: string
                  authenticationEnabled:
                    type: boolean
                  corsOrigins:
                    type: string
                  discovery:
                    type: boolean
                  enabled:
                    description: Port is enabled or not
                    type: boolean
                  host:
                    description: Host
                    type: string
                  port:
                    description: Port
                    type: integer
                type: object
              type:
                default: Member
                description: 'Type of node, takes one of the values : Bootnode, Validator,
                  Member'
                type: string
              ws:
                default:
                  authenticationEnabled: false
                  enabled: false
                  host: 0.0.0.0
                  port: 8546
                description: WS
                properties:
                  api:
                    type: string
                  authenticationEnabled:
                    type: boolean
                  corsOrigins:
                    type: string
                  discovery:
                    type: boolean
                  enabled:
                    description: Port is enabled or not
                    type: boolean
                  host:
                    description: Host
                    type: string
                  port:
                    description: Port
                    type: integer
                type: object
            type: object
          status:
            description: BesuNodeStatus defines the observed state of BesuNode
            properties:
              readyreplicas:
                format: int32
                type: integer
              replicas:
                format: int32
                type: integer
            required:
            - readyreplicas
            - replicas
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
