Test a custom or Container Cloud module after creation

TechPreview since 2.26.0 (17.1.0 and 16.1.0)

Important

The cloud operator takes all risks and responsibility for module execution on cluster machines. For any questions, contact Mirantis support.

After you create a custom or configure a Container Cloud module, verify it on one machine before applying it to all target machines. This approach ensures safe and reliable cluster operability.

To test a module:

  1. Add a custom label to one Machine object:

    kubectl edit machine master-0
    
    apiVersion: cluster.k8s.io/v1alpha1
    kind: Machine
    metadata:
      ...
      labels:
        ...
        day2-module-testing-example: "true"
      name: master-0
      namespace: default
    ...
    
  2. Create the HostOSConfiguration object with machineSelector for that custom label. For example:

    apiVersion: kaas.mirantis.com/v1alpha1
    kind: HostOSConfiguration
    metadata:
      name: day2-test
      namespace: default
    spec:
      ...
      machineSelector:
        matchLabels:
          day2-module-testing-example: "true"
    
  3. Verify that the status field of modules execution is healthy, validate logs, and verify that the machine is in the ready state.

    If the execution result meets your expectations, continue applying HostOSConfiguration on other machines using one of the following options:

    • Use the same HostOSConfiguration object:

      • Change the matchLabels value in the machineSelector field to match all target machines.

      • Assign the labels from the matchLabels value to other target machines.

    • Create a new HostOSConfiguration object.

Note

Mirantis highly recommends using specific custom labels on machines and in the HostOSConfiguration selector, so that HostOSConfiguration is applied only to the machines with the specific custom label.