Editing an AS Policy
This section describes how to edit an AS policy.
Procedure
- Log in to CAE.
- Choose Component Configurations.
- Select the target component from the drop-down list in the upper part of the page.
Figure 1 Selecting a component
- Click Edit in the AS Policies module.
- Update configuration parameters.
- Configure a metric AS policy
- Select Metric.
- 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
- (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
- Select Time.
- 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
- Select Hybrid.
- 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.
- (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
- Configure a metric AS policy
- Click OK.
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot