Kubernetes Object | Type | Required Resources | Namespaces |
horizontalpodcronscalers.autoscaling.cloud.tencent.com | CustomResourceDefinition | - | - |
hpc-leader-election-role | Role | - | kube-system |
hpc-leader-election-rolebinding | RoleBinding | - | kube-system |
hpc-manager-role | ClusterRole | - | - |
hpc-manager-rolebinding | ClusterRoleBinding | - | - |
cronhpa-controller-manager-metrics-service | Service | - | kube-system |
hpc-manager | ServiceAccount | - | kube-system |
tke-hpc-controller | Deployment | 100mCPU, 100Mi/pod | kube-system |
--feature-gates=CustomResourceSubresources=true
./etc/localtime
file exists in the node.Feature | Involved Object | Involved Operation Permission |
Monitoring changes of horizontalpodcronscalers | horizontalpodcronscalers | create/delete/get/list/patch/watch |
The replicas of deployments/statefulsets that required modification | deployments/statefulsets | get/list/patch/watch |
Modifying the minReplicas/maxReplicas of horizontalpodautoscalers | horizontalpodautoscalers | get/list/patch/watc |
Synchronizing the events of HPC scheduled task execution | events | create/patch |
apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:creationTimestamp: nullname: hpc-manager-rolerules:- apiGroups:- ""resources:- eventsverbs:- create- patch- apiGroups:- appsresources:- deploymentsverbs:- get- list- patch- watch- apiGroups:- appsresources:- statefulsetsverbs:- get- list- patch- watch- apiGroups:- autoscalingresources:- horizontalpodautoscalersverbs:- get- list- patch- watch- apiGroups:- autoscaling.cloud.tencent.comresources:- horizontalpodcronscalersverbs:- create- delete- get- list- patch- update- watch- apiGroups:- autoscaling.cloud.tencent.comresources:- horizontalpodcronscalers/statusverbs:- get- patch- update- apiGroups:- apiextensions.k8s.ioresources:- customresourcedefinitionsresourceNames:- horizontalpodcronscalers.autoscaling.cloud.tencent.comverbs:- get- list- delete- watch
apiVersion: autoscaling.cloud.tencent.com/v1kind: HorizontalPodCronscalermetadata:name: hpc-deploymentnamespace: defaultspec:scaleTarget:apiVersion: apps/v1kind: Deploymentname: nginx-deploymentnamespace: defaultcrons:- name: "scale-down"excludeDates:- "* * * 15 11 *"- "* * * * * 5"schedule: "30 */1 * * * *"targetSize: 1- name: "scale-up"excludeDates:- "* * * 15 11 *"- "* * * * * 5"schedule: "0 */1 * * * *"targetSize: 3
apiVersion: autoscaling.cloud.tencent.com/v1kind: HorizontalPodCronscalermetadata:name: hpc-statefulsetnamespace: defaultspec:scaleTarget:apiVersion: apps/v1kind: Statefulsetname: nginx-statefulsetnamespace: defaultcrons:- name: "scale-down"excludeDates:- "* * * 15 11 *"schedule: "0 */2 * * * *"targetSize: 1- name: "scale-up"excludeDates:- "* * * 15 11 *"schedule: "30 */2 * * * *"targetSize: 4
apiVersion: autoscaling.cloud.tencent.com/v1kind: HorizontalPodCronscalermetadata:labels:controller-tools.k8s.io: "1.0"name: hpc-hpaspec:scaleTarget:apiVersion: autoscaling/v1kind: HorizontalPodAutoscalername: nginx-hpanamespace: defaultcrons:- name: "scale-up"schedule: "30 */1 * * * *"minSize: 2maxSize: 6- name: "scale-down"schedule: "0 */1 * * * *"minSize: 1maxSize: 5
Field Name | Required | Value Range | Allowed Special Characters |
Seconds | Yes | 0 - 59 | * / , - |
Minutes | Yes | 0 - 59 | * / , - |
Hours | Yes | 0 - 23 | * / , - |
Day of month | Yes | 1 - 31 | * / , - ? |
Month | Yes | 1 - 12 or JAN - DEC | * / , - |
Day of week | Yes | 0 - 6 or SUN - SAT | * / , - ? |
Was this page helpful?