Custom Sync Ignore Configuration Template
This feature is used to create GitOps applications and allows selecting a custom template from the Synchronization Ignore Configuration template list to implement ignore configuration.
Procedure of operation
-
In the left navigation bar, click Clusters > Management of resources.
-
Switch to the global cluster and click on Create Resource Object.
-
Write the following configuration information into a YAML file.
apiVersion: gitops.app.alauda.io/v1alpha1 kind: GitOpsIgnoreDifferences metadata: name: hpa namespace: kube-public displayName: zh: 水平伸缩(HPA)场景忽略配置 en: Ignore configurations in Horizontal Pod Autoscaling (HPA) scenarios description: zh: 忽略部署和有状态副本集资源对象的副本数字段,由水平伸缩控制器根据metrics动态设置副本数。 en: The replica count fields in Deployment and StatefulSet resources will be ignored. The number of replicas will be dynamically adjusted by the HPA controller based on monitoring metrics. ignoreDifferences: - group: apps jsonPointers: - /spec/replicas kind: Deployment - group: apps jsonPointers: - /spec/replicas kind: StatefulSetField Description:
-
name(string): The name of the field. -
type(string): The data type of the field. -
description(string): A brief description of the field. -
required(boolean): Indicates whether the field is required or optional. -
default(string): The default value of the field if it is not provided. -
example(string): An example value for the field. -
constraints(string): Any constraints or limitations on the field’s value. -
deprecated(boolean): Indicates whether the field is deprecated. -
deprecatedMessage(string): A message explaining why the field is deprecated. -
deprecatedVersion(string): The version in which the field was deprecated.-
name: Custom template name, it is forbidden to have the same name as existing templates in the platform.
-
displayName: The name displayed in the dropdown selection box when selecting the “Sync Ignore Configuration” template.
-
description: Description information of the template. It is recommended to provide a complete description of the fields that should be ignored for future reference. For example, the replica count field of deployment and statefulset resource objects is ignored and dynamically set by the horizontal pod autoscaler based on metrics.
-
ignoreDifferences: Used to identify the fields that need to be ignored in the corresponding resource file.
-