Change how Typha CPU / replias are determined.

This commit is contained in:
Casey Davenport
2017-06-10 16:58:16 -07:00
parent 83ec0d87ff
commit 948c6c8027
6 changed files with 99 additions and 32 deletions

View File

@@ -6,7 +6,6 @@ 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

View File

@@ -28,7 +28,7 @@ spec:
# container programs network policy and routes on each
# host.
- name: calico-node
image: calico/node:v1.3.0-rc1
image: calico/node:v1.3.0
env:
- name: CALICO_DISABLE_FILE_LOGGING
value: "true"
@@ -128,7 +128,7 @@ spec:
# Used to install CNI binaries.
- name: cni-bin-dir
hostPath:
path: /home/kubernetes/bin
path: __CALICO_CNI_DIR__
# Used to install CNI network config.
- name: cni-net-dir
hostPath:

View File

@@ -1,17 +0,0 @@
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

View File

@@ -1,5 +1,5 @@
kind: Deployment
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: calico-typha
namespace: kube-system
@@ -8,7 +8,7 @@ metadata:
addonmanager.kubernetes.io/mode: Reconcile
k8s-app: calico-typha
spec:
replicas: 1
replicas: __CALICO_TYPHA_REPLICAS__
revisionHistoryLimit: 2
template:
metadata:
@@ -24,7 +24,7 @@ spec:
projectcalico.org/ds-ready: "true"
hostNetwork: true
containers:
- image: calico/typha:v0.1.7
- image: calico/typha:v0.2.2
name: calico-typha
ports:
- containerPort: 5473
@@ -39,10 +39,22 @@ spec:
value: "info"
- name: TYPHA_PROMETHEUSMETRICSENABLED
value: "true"
- name: TYPHA_CONNECTIONREBALANCINGMODE
value: "kubernetes"
- name: TYPHA_PROMETHEUSMETRICSPORT
value: "9093"
- name: TYPHA_DATASTORETYPE
value: "kubernetes"
- name: TYPHA_MAXCONNECTIONSLOWERLIMIT
value: "1"
volumeMounts:
- mountPath: /etc/calico
name: etc-calico
readOnly: true
resources:
requests:
cpu: 200m
cpu: __CALICO_TYPHA_CPU__
volumes:
- name: etc-calico
hostPath:
path: /etc/calico