mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Make calico/node resource requests dynamic based on cluster size
This commit is contained in:
@@ -6,6 +6,7 @@ Calico is an implementation of the Kubernetes network policy API. The provided
|
||||
- A DaemonSet which runs Calico on each node in the cluster.
|
||||
- A Deployment which installs the Calico Typha agent.
|
||||
- A Service for the Calico Typha agent.
|
||||
- A HorizontalPodAutoscaler to dynamically adjust the Typha Deployment.
|
||||
|
||||
### Learn More
|
||||
|
||||
|
@@ -11,6 +11,8 @@ spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: calico-node
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
@@ -58,7 +60,7 @@ spec:
|
||||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
cpu: __CALICO_NODE_CPU__
|
||||
volumeMounts:
|
||||
- mountPath: /lib/modules
|
||||
name: lib-modules
|
||||
|
@@ -0,0 +1,17 @@
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: calico-typha
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
k8s-app: calico-typha
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: calico-typha
|
||||
minReplicas: 1
|
||||
maxReplicas: 20
|
||||
targetCPUUtilizationPercentage: 75
|
@@ -45,4 +45,4 @@ spec:
|
||||
value: "kubernetes"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1000m
|
||||
cpu: 200m
|
||||
|
@@ -15,4 +15,3 @@ spec:
|
||||
name: calico-typha
|
||||
selector:
|
||||
k8s-app: calico-typha
|
||||
|
||||
|
Reference in New Issue
Block a user