From 59a283b6db1b8d0010adbb99aa65ca971f5d0d34 Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Fri, 9 Mar 2018 18:48:04 +0100 Subject: [PATCH] Expose CPUManager policy and set reservations --- kubernetes.yaml | 19 ++++++++++++------- templates/worker.yaml | 10 ++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/kubernetes.yaml b/kubernetes.yaml index ae90884..167fec2 100644 --- a/kubernetes.yaml +++ b/kubernetes.yaml @@ -46,6 +46,10 @@ Parameters: Type: String Default: "" + WorkerCPUManagerPolicy: + Type: String + Default: "none" + KubeadmVersion: Type: String Default: v1.9.2 @@ -1204,13 +1208,14 @@ Resources: - assetBucket: !Ref assetBucket DomainName: !Ref DomainName Parameters: - DomainName: !Ref DomainName - FeatureGates: !Ref WorkerFeatureGates - assetBucket: !Ref assetBucket - VPCID: !Ref VPCID - PrivateSubnetA: !Ref PrivateSubnetA - PrivateSubnetB: !Ref PrivateSubnetB - PrivateSubnetC: !Ref PrivateSubnetC + DomainName: !Ref DomainName + FeatureGates: !Ref WorkerFeatureGates + CPUManagerPolicy: !Ref WorkerCPUManagerPolicy + assetBucket: !Ref assetBucket + VPCID: !Ref VPCID + PrivateSubnetA: !Ref PrivateSubnetA + PrivateSubnetB: !Ref PrivateSubnetB + PrivateSubnetC: !Ref PrivateSubnetC Outputs: ControllerRole: diff --git a/templates/worker.yaml b/templates/worker.yaml index d0976d8..5802c07 100644 --- a/templates/worker.yaml +++ b/templates/worker.yaml @@ -24,6 +24,11 @@ Parameters: Type: String Default: "" + CPUManagerPolicy: + Description: cpu manager policy for kubelet + Type: String + Default: "none" + WorkerInstanceType: Description: EC2 instance type for controller nodes. Type: String @@ -92,6 +97,9 @@ Mappings: --cluster-domain=${KUBELET_CLUSTER_DOMAIN} \ --register-with-taints=${KUBELET_TAINTS} \ --feature-gates=${KUBELET_FEATURE_GATES} \ + --cpu-manager-policy=${KUBELET_CPU_MANAGER_POLICY} \ + --kube-reserved=cpu=100m \ + --system-reserved=cpu=100m \ --allow-privileged ExecStop=-/usr/bin/rkt stop --uuid-file=/var/run/kubelet-pod.uuid [Install] @@ -298,10 +306,12 @@ Resources: KUBELET_CLUSTER_DOMAIN=${DomainName} KUBELET_TAINTS=${Taints} KUBELET_FEATURE_GATES=${FeatureGates} + KUBELET_CPU_MANAGER_POLICY=${CPUManagerPolicy} - KubeletImageTag: !Ref KubeletImageTag DomainName: !Ref DomainName Taints: !Ref Taints FeatureGates: !Ref FeatureGates + CPUManagerPolicy: !Ref CPUManagerPolicy cloudProviderConfig: Fn::Base64: Fn::Sub: