Diagnostic resource

Available since 2.28.0 (17.3.0 and 16.3.0)

This section describes the Diagnostic custom resource (CR) used in Mirantis Container Cloud API to trigger self-diagnostics for management or managed clusters.

The Container Cloud Diagnostic CR contains the following fields:

  • apiVersion

    API version of the object that is diagnostic.mirantis.com/v1alpha1.

  • kind

    Object type that is Diagnostic.

  • metadata

    Object metadata that contains the following fields:

    • name

      Name of the Diagnostic object.

    • namespace

      Namespace used to create the Diagnostic object. Must be equal to the namespace of the target cluster.

  • spec

    Resource specification that contains the following fields:

    • cluster

      Name of the target cluster to run diagnostics on.

    • checks

      Reserved for internal usage, any override will be discarded.

  • status
    • finishedAt

      Completion timestamp of diagnostics. If the Diagnostic Controller version is outdated, this field is not set and the corresponding error message is displayed in the error field.

    • error

      Error that occurs during diagnostics or if the Diagnostic Controller version is outdated. Omitted if empty.

    • controllerVersion

      Version of the controller that launched diagnostics.

    • result

      Map of check statuses where the key is the check name and the value is the result of the corresponding diagnostic check:

      • description

        Description of the check in plain text.

      • result

        Result of diagnostics. Possible values are PASS, ERROR, FAIL, WARNING, INFO.

      • message

        Optional. Explanation of the check results. It may optionally contain a reference to the documentation describing a known issue related to the check results, including the existing workaround for the issue.

      • success

        Success status of the check. Boolean.

      • ticketInfo

        Optional. Information about the ticket to track the resolution progress of the known issue related to the check results. For example, FIELD-12345.

The Diagnostic resource example:

apiVersion: diagnostic.mirantis.com/v1alpha1
kind: Diagnostic
metadata:
  name: test-diagnostic
  namespace: test-namespace
spec:
  cluster: test-cluster
status:
  finishedAt: 2024-07-01T11:27:14Z
  error: ""
  controllerVersion: v1.40.11
  result:
    bm_address_capacity:
      description: Baremetal addresses capacity
      message: LCM Subnet 'default/k8s-lcm-nics' has 8 allocatable addresses (threshold
        is 5) - OK; PXE-NIC Subnet 'default/k8s-pxe-nics' has 7 allocatable addresses
        (threshold is 5) - OK; Auto-assignable address pool 'default' from MetallbConfig
        'default/kaas-mgmt-metallb' has left 21 available IP addresses (threshold
        is 10) - OK
      result: INFO
      success: true
    bm_artifacts_overrides:
      description: Baremetal overrides check
      message: BM operator has no undesired overrides
      result: PASS
      success: true