Skip to content

Commit

Permalink
Expose CPUManager policy and set reservations
Browse files Browse the repository at this point in the history
  • Loading branch information
discordianfish committed Mar 9, 2018
1 parent a8ca715 commit 59a283b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
19 changes: 12 additions & 7 deletions kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Parameters:
Type: String
Default: ""

WorkerCPUManagerPolicy:
Type: String
Default: "none"

KubeadmVersion:
Type: String
Default: v1.9.2
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions templates/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 59a283b

Please sign in to comment.