MCCUpgrade resource

This section describes the MCCUpgrade resource used in Mirantis Container Cloud API to configure a schedule for the Container Cloud upgrade.

The Container Cloud MCCUpgrade CR contains the following fields:

  • apiVersion

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

  • kind

    Object type that is MCCUpgrade.

  • metadata

    The metadata object field of the MCCUpgrade resource contains the following fields:

    • name

      The name of MCCUpgrade object, must be mcc-upgrade.

  • spec

    The spec object field of the MCCUpgrade resource contains the schedule when Container Cloud upgrade is allowed or blocked. This field contains the following fields:

    • blockUntil

      Time stamp in the ISO 8601 format, for example, 2021-12-31T12:30:00-05:00. Upgrades will be disabled until this time. You cannot set this field to more than 7 days in the future and more than 30 days after the latest Container Cloud release.

    • timeZone

      Name of a time zone in the IANA Time Zone Database. This time zone will be used for all schedule calculations. For example: Europe/Samara, CET, America/Los_Angeles.

    • schedule

      List of schedule items that allow an upgrade at specific hours or weekdays. The upgrade process can proceed if at least one of these items allows it. Schedule items allow upgrade when both hours and weekdays conditions are met. When this list is empty or absent, upgrade is allowed at any hour of any day. Every schedule item contains the following fields:

      • hours

        Object with 2 fields: from and to. Both must be non-negative integers not greater than 24. The to field must be greater than the from one. Upgrade is allowed if the current hour in the time zone specified by timeZone is greater or equals to from and is less than to. If hours is absent, upgrade is allowed at any hour.

      • weekdays

        Object with boolean fields with these names:

        • monday

        • tuesday

        • wednesday

        • thursday

        • friday

        • saturday

        • sunday

        Upgrade is allowed only on weekdays that have the corresponding field set to true. If all fields are false or absent, or weekdays is empty or absent, upgrade is allowed on all weekdays.

    Full spec example:

    spec:
      blockUntil: 2021-12-31T00:00:00
      timeZone: CET
      schedule:
      - hours:
          from: 10
          to: 17
        weekdays:
          monday: true
          tuesday: true
      - hours:
          from: 7
          to: 10
        weekdays:
          monday: true
          friday: true
    

    In this example:

    • Upgrades are blocked until December 31, 2021

    • All schedule calculations are done in the CET timezone

    • Upgrades are allowed only:

      • From 7:00 to 17:00 on Mondays

      • From 10:00 to 17:00 on Tuesdays

      • From 7:00 to 10:00 on Fridays

  • status

    The status object field of the MCCUpgrade resource contains information about the next planned Container Cloud upgrade, if available. This field contains the following fields:

    • nextAttempt

      Time stamp in the ISO 8601 format indicating the time when the Release Controller will attempt to discover and install a new Container Cloud release. Set to the next allowed time according to the schedule configured in spec or one minute in the future if the schedule currently allows upgrade.

    • message

      Message from the last upgrade step or attempt.

    • nextRelease

      Object describing the next release that Container Cloud will be upgraded to. Absent if no new releases have been discovered. Contains the following fields:

      • version

        Semver-compatible version of the next Container Cloud release, for example, 2.22.0.

      • date

        Time stamp in the ISO 8601 format indicating the time when the Container Cloud release defined in version has been first discovered.

    • lastUpgrade

      Time stamps of the latest Container Cloud upgrade:

      • startedAt

        Time stamp in the ISO 8601 format indicating the time when the last Container Cloud upgrade started.

      • finishedAt

        Time stamp in the ISO 8601 format indicating the time when the last Container Cloud upgrade finished.