Updated on 2024-05-25 GMT+08:00

Editing an AS Policy

This section describes how to edit an AS policy.

Procedure

  1. Log in to CAE.
  2. Choose Component Configurations.
  3. Select the target component from the drop-down list in the upper part of the page.

    Figure 1 Selecting a component

  4. Click Edit in the AS Policies module.
  5. Update configuration parameters.

    • Configure a metric AS policy
      1. Select Metric.
      1. Reconfigure the metric AS policy by referring to the following table.
        Table 1 Parameters

        Parameter

        Description

        Max. Instances

        Max. number of instances that can be reached during scale-out.

        Value range: 1 to 99.

        NOTE:

        Max. Instances must be greater than Min Instances.

        Min Instances

        Min number of instances that can be reached during scale-in.

        Value range: 1 to 99.

        Metric

        • CPU usage, a preset metric in the system
        • Memory usage, a preset metric in the system
        • Custom metrics.

          Click Add Expected Value and select a custom metric from the drop-down list to add a custom metric. For details about how to create a custom metric, see Configuring Custom Metrics.

          You can add multiple custom metrics.

          NOTE:
          • You must enter a PromQL statement. PromQL is a built-in data query language from Prometheus, and is used to select, aggregate, and perform logical calculation on time series data. For details, see Prometheus.
          • The query result of the PromQL statement must be a single value of the vector or scalar type.
          • Upgrade the component created/upgraded before November 3, 2023 for the custom scaling policy to take effect.
        Figure 2 Configure a metric AS policy
      2. (Optional) Expand Advanced Settings and configure advanced settings by referring to Table 2.
        Table 2 Configuring advanced settings

        Parameter

        Description

        Scale-out Step

        Number of pods to be added per minute.

        Value range: 1 to 99. Default value: 4.

        Stable Scale-out Window (s)

        Value range: 1 to 3600, in seconds. Default value: 0.

        Scale-in Step

        Number of pods to be reduced per minute.

        Value range: 1 to 99. Default value: 99.

        Stable Scale-in Window (s)

        Value range: 1 to 3600, in seconds. Default value: 300.

        Disable Scale-in

        Click to disable scale-in.

    • Configure a time AS policy
      1. Select Time.
      1. Reconfigure the time AS policy by referring to the following table.
        Table 3 Parameters

        Parameter

        Description

        Max. Instances

        Max. number of instances that can be reached during scale-out.

        Value range: 1 to 99.

        NOTE:

        Max. Instances must be greater than Min Instances.

        Min Instances

        Min number of instances that can be reached during scale-in.

        Value range: 1 to 99.

        Trigger Cycle

        The policy is expected to be executed at a specified interval. Value: Every day, Every day, or Monthly.

        Trigger Time in a Day

        This parameter is mandatory when Trigger Cycle is set to Every day.

        Configure the policy triggered every day.

        For example, the number of instances remains 5 after 11:00 every day.

        Click Add Trigger Time to add more time policies.

        Trigger Time in a Week

        This parameter is mandatory when Trigger Cycle is set to Every week.

        Configure the policy triggered every week.

        For example, the number of instances remains 2 after 08:00 on every Monday.

        Click Add Trigger Time to add more time policies.

        Trigger Time in a Month

        This parameter is mandatory when Trigger Cycle is set to Monthly.

        Configure the policy triggered every month.

        For example, the number of instances remains 3 after 06:00 on the fifth day of each month.

        Click Add Trigger Time to add more time policies.

        Figure 3 Configuring a time policy
      • Configure a hybrid AS policy
        1. Select Hybrid.
        2. Reconfigure the hybrid AS policy by referring to the following table.
          Table 4 Configuring a hybrid policy

          Parameter

          Description

          Max. Instances

          Max. number of instances that can be reached during scale-out.

          Value range: 1 to 99.

          NOTE:

          Max. Instances must be greater than Min Instances.

          Min Instances

          Min number of instances that can be reached during scale-in.

          Value range: 1 to 99.

          Metric

          • CPU usage, a preset metric in the system
          • Memory usage, a preset metric in the system
          • Custom metrics.

            Click Add Expected Value and select a custom metric from the drop-down list to add a custom metric. For details about how to create a custom metric, see Configuring Custom Metrics.

            You can add multiple custom metrics.

            NOTE:
            • You must enter a PromQL statement. PromQL is a built-in data query language from Prometheus, and is used to select, aggregate, and perform logical calculation on time series data. For details, see Prometheus.
            • The query result of the PromQL statement must be a single value of the vector or scalar type.
            • Upgrade the component created/upgraded before November 3, 2023 for the custom scaling policy to take effect.

          Trigger Cycle

          The policy is expected to be executed at a specified interval. Value: Every day, Every day, or Monthly.

          Trigger Time in a Day

          This parameter is mandatory when Trigger Cycle is set to Every day.

          Configure the policy triggered every day.

          For example, the number of instances remains 3 after 18:00 every day.

          Click Add Trigger Time to add more time policies.

          Trigger Time in a Week

          This parameter is mandatory when Trigger Cycle is set to Every week.

          Configure the policy triggered every week.

          For example, the number of instances remains 4 after 08:00 on every Monday.

          Click Add Trigger Time to add more time policies.

          Trigger Time in a Month

          This parameter is mandatory when Trigger Cycle is set to Monthly.

          Configure the policy triggered every month.

          For example, the number of instances remains 4 after 06:00 on the fifth day of each month.

          Click Add Trigger Time to add more time policies.

        3. (Optional) Expand Advanced Settings and configure advanced settings by referring to Table 5.
          Table 5 Configuring advanced settings

          Parameter

          Description

          Scale-out Step

          Number of pods to be added per minute.

          Value range: 1 to 99. Default value: 4.

          Stable Scale-out Window (s)

          Value range: 1 to 3600, in seconds. Default value: 0.

          Scale-in Step

          Number of pods to be reduced per minute.

          Value range: 1 to 99. Default value: 99.

          Stable Scale-in Window (s)

          Value range: 1 to 3600, in seconds. Default value: 300.

          Disable Scale-in

          Click to disable scale-in.

          Figure 4 Advanced settings

  6. Click OK.
  7. Click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.