apiVersion: apps.grafana.app/v1alpha1
kind: AppManifest
metadata:
  name: custom-app
spec:
  appDisplayName: custom-app
  appName: custom-app
  group: customapp.ext.grafana.app
  preferredVersion: v1-0
  roleBindings:
    admin:
    - custom-app:admin
    editor:
    - custom-app:editor
    viewer:
    - custom-app:reader
  roles:
    custom-app:admin:
      description: Allows all actions on CustomKinds
      kinds:
      - kind: CustomKind
        permissionSet: admin
      - kind: CustomKind/status
        permissionSet: admin
      title: custom-app Admin
    custom-app:editor:
      description: Create, Read, Update, and Delete CustomKinds
      kinds:
      - kind: CustomKind
        permissionSet: editor
      title: custom-app Editor
    custom-app:reader:
      description: Read CustomKinds
      kinds:
      - kind: CustomKind
        permissionSet: viewer
      title: custom-app Reader
  versions:
  - kinds:
    - conversion: false
      kind: CustomKind
      plural: CustomKinds
      schema:
        spec:
          properties:
            deprecatedField:
              type: string
            field1:
              type: string
          required:
          - field1
          - deprecatedField
          type: object
        status:
          properties:
            additionalFields:
              description: additionalFields is reserved for future use
              type: object
              x-kubernetes-preserve-unknown-fields: true
            operatorStates:
              additionalProperties:
                properties:
                  descriptiveState:
                    description: descriptiveState is an optional more descriptive
                      state field which has no requirements on format
                    type: string
                  details:
                    description: details contains any extra information that is operator-specific
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  lastEvaluation:
                    description: lastEvaluation is the ResourceVersion last evaluated
                    type: string
                  state:
                    description: |-
                      state describes the state of the lastEvaluation.
                      It is limited to three possible states for machine evaluation.
                    enum:
                    - success
                    - in_progress
                    - failed
                    type: string
                required:
                - lastEvaluation
                - state
                type: object
              description: |-
                operatorStates is a map of operator ID to operator state evaluations.
                Any operator which consumes this kind SHOULD add its state evaluation information to this field.
              type: object
          type: object
      scope: Namespaced
    name: v0-0
    served: true
  - kinds:
    - conversion: false
      kind: CustomKind
      plural: CustomKinds
      schema:
        spec:
          properties:
            boolField:
              default: false
              type: boolean
            enum:
              default: default
              enum:
              - val1
              - val2
              - val3
              - val4
              - default
              type: string
            exclusiveInt:
              exclusiveMaximum: true
              exclusiveMinimum: true
              maximum: 100
              minimum: 10
              type: integer
            field1:
              type: string
            floatField:
              type: number
            i32:
              maximum: 123456
              type: integer
            i64:
              minimum: 123456
              type: integer
            inner:
              properties:
                innerField1:
                  type: string
                innerField2:
                  items:
                    type: string
                  type: array
                innerField3:
                  items:
                    properties:
                      details:
                        type: object
                        x-kubernetes-preserve-unknown-fields: true
                      name:
                        type: string
                    required:
                    - name
                    - details
                    type: object
                  type: array
                innerField4:
                  items:
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  type: array
              required:
              - innerField1
              - innerField2
              - innerField3
              - innerField4
              type: object
            linkedList:
              properties:
                next:
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                val:
                  type: string
              required:
              - val
              type: object
            map:
              additionalProperties:
                properties:
                  details:
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  group:
                    type: string
                required:
                - group
                - details
                type: object
              type: object
            timestamp:
              format: date-time
              type: string
            union:
              oneOf:
              - not:
                  anyOf:
                  - required:
                    - details
                required:
                - group
              - required:
                - group
                - details
              properties:
                details:
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                group:
                  type: string
                options:
                  items:
                    type: string
                  type: array
              type: object
          required:
          - field1
          - inner
          - union
          - map
          - timestamp
          - enum
          - i32
          - i64
          - boolField
          - floatField
          - linkedList
          - exclusiveInt
          type: object
        status:
          properties:
            additionalFields:
              description: additionalFields is reserved for future use
              type: object
              x-kubernetes-preserve-unknown-fields: true
            operatorStates:
              additionalProperties:
                properties:
                  descriptiveState:
                    description: descriptiveState is an optional more descriptive
                      state field which has no requirements on format
                    type: string
                  details:
                    description: details contains any extra information that is operator-specific
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  lastEvaluation:
                    description: lastEvaluation is the ResourceVersion last evaluated
                    type: string
                  state:
                    description: |-
                      state describes the state of the lastEvaluation.
                      It is limited to three possible states for machine evaluation.
                    enum:
                    - success
                    - in_progress
                    - failed
                    type: string
                required:
                - lastEvaluation
                - state
                type: object
              description: |-
                operatorStates is a map of operator ID to operator state evaluations.
                Any operator which consumes this kind SHOULD add its state evaluation information to this field.
              type: object
            statusField1:
              type: string
          required:
          - statusField1
          type: object
          x-kubernetes-preserve-unknown-fields: true
      scope: Namespaced
    name: v1-0
    served: true
