CacheWarmupRequest resource

TechPreview

This section describes the CacheWarmupRequest custom resource (CR) used in MOSK for management clusters to predownload images and store them in the mcc-cache service.

The CacheWarmupRequest object is automatically deleted once the cache warm-up completes, whether it succeeds or fails. The warm-up summary is stored in the status of the management Cluster object. For details, see Verify the cache warm-up result.

The CacheWarmupRequest CR contains the following fields:

  • apiVersion

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

  • kind

    Object type that is CacheWarmupRequest.

  • metadata

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

    • name

      Name of the CacheWarmupRequest object that must match the existing management cluster name to which the warm-up operation applies.

    • namespace

      Project in which the cluster is created. Always set to default as the only available project for management clusters creation.

  • spec

    The spec object field of the CacheWarmupRequest resource contains the settings for artifacts fetching and artifacts filtering through Cluster releases. This field contains the following fields:

    • clusterReleases

      Array of strings. Defines a set of Cluster release names to warm up in the mcc-cache service.

    • openstackReleases

      Array of strings. Defines a set of OpenStack releases to warm up in mcc-cache. Applicable only if the ClusterReleases field contains mosk releases. If not set:

      • Since MOSK management 2.32.1, all OpenStack releases supported by the specified mosk Cluster releases are warmed up.

      • Before MOSK management 2.32.1, no OpenStack images are warmed up, not even the OpenStack Controller image. Therefore, openstackReleases is required.

      To reduce the cache size, define only the OpenStack releases that you use. If you plan to upgrade an OpenStack version, define the current and the target versions including the intermediate versions, if any. For example, to upgrade OpenStack from Caracal to Gazpacho:

      openstackReleases:
      - caracal
      - epoxy
      - gazpacho
      
    • fetchRequestTimeout

      Optional. String. Time for a single request to download a single artifact. Defaults to 30m. For example, 1h2m3s.

    • clientsPerEndpoint

      Optional. Integer. Number of clients to use for fetching artifacts per each mcc-cache service endpoint. Defaults to 2.

    • openstackOnly

      Optional. Boolean. Enables fetching of the OpenStack-related artifacts for MOSK. Defaults to false. Applicable only if the ClusterReleases field contains mosk releases. Useful when you need to upgrade only an OpenStack version.

      Since MOSK management 2.32.1, can be used without openstackReleases to warm up all OpenStack releases supported by the specified mosk Cluster releases. Before MOSK management 2.32.1, requires openstackReleases to be set.

Example configuration:

apiVersion: kaas.mirantis.com/v1alpha1
kind: CacheWarmupRequest
metadata:
  name: example-cluster-name
  namespace: default
spec:
  clusterReleases:
  - k0s-22-0-1-1-33-13
  - mosk-21-2-1-26-2-1
  openstackReleases:
  - gazpacho
  fetchRequestTimeout: 30m
  clientsPerEndpoint: 2
  openstackOnly: false

In this example:

  • The CacheWarmupRequest object is created for a management cluster named example-cluster-name.

  • The CacheWarmupRequest object is created in the only allowed default MOSK management project.

  • Two Cluster releases mosk-21-2-1-26-2-1 and k0s-22-0-1-1-33-13 will be predownloaded.

  • For mosk-21-2-1-26-2-1, only images related to the OpenStack version Gazpacho will be predownloaded.

  • Maximum time-out for a single request to download a single artifact is 30 minutes.

  • Two parallel workers will fetch artifacts per each mcc-cache service endpoint.

  • All artifacts will be fetched, not only those related to OpenStack.