Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-1480

Improve API validation of MCP's `maxUnavailable`

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • 0
    • 0

      As a user of the MCO, I want to be alerted when I make a mistake, such as defining a field with an incorrect data type, so I can feel confident using the operator and reduce future debugging efforts.

      Currently, the MCO has some level of type validation in the API for fields that can be defined by a user, such as requiring the “paused” field to be of type `bool`. However, some fields would benefit from validation rules beyond simple type requirements.

      An example of a field needing additional validation in the API is maxUnavailable. Users are able to define either an integer or a string for maxUnavailable and, upon doing so, such change will apply to the MCP successfully. What is not captured in the validation is that if the value is defined as a string then it must represent a percentage and, thus, include a percent sign (%). This additional validation takes place in the MCO’s node controller, leading changes after the initial, seemingly successful, update of “maxUnavailable” to fail and contribute to confusion.

      Acceptance Criteria:

      • Implement rules to improve type validation of the MCP's `maxUnavailable` field
      • Confirm validation errors are handled gracefully and alerts are clear and actionable

              rh-ee-ijanssen Isabella Janssen
              rh-ee-ijanssen Isabella Janssen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: