Skip to content

Commit

Permalink
Merge pull request #6918 from granular-ryanbonham/cherrypick_5961_rel…
Browse files Browse the repository at this point in the history
…ease-1.12

Cherry pick of #5961 onto release-1.12
  • Loading branch information
k8s-ci-robot committed May 10, 2019
2 parents 5838992 + 1ad9c1b commit 949e453
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,16 @@ spec:
enableCustomMetrics: true
```

#### Setting kubelet CPU management policies
To enable cpu management policies in kubernetes as per [cpu management doc](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies)
we have to set the flag `--cpu-manager-policy` to the appropriate value on all the kubelets. This must be specified in the `kubelet` spec in our cluster.yml.

```
spec:
kubelet:
cpuManagerPolicy: static
```

#### Setting kubelet configurations together with the Amazon VPC backend
Setting kubelet configurations together with the networking Amazon VPC backend requires to also set the `cloudProvider: aws` setting in this block. Example:

Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ type KubeletConfigSpec struct {
CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty" flag:"cpu-cfs-quota"`
// CPUCFSQuotaPeriod sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default
CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty" flag:"cpu-cfs-quota-period"`
// CpuManagerPolicy allows for changing the default policy of None to static
CpuManagerPolicy string `json:"cpuManagerPolicy,omitempty" flag:"cpu-manager-policy"`
}

// KubeProxyConfig defines the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ type KubeletConfigSpec struct {
CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty" flag:"cpu-cfs-quota"`
// CPUCFSQuotaPeriod sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default
CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty" flag:"cpu-cfs-quota-period"`
// CpuManagerPolicy allows for changing the default policy of None to static
CpuManagerPolicy string `json:"cpuManagerPolicy,omitempty" flag:"cpu-manager-policy"`
}

// KubeProxyConfig defines the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ type KubeletConfigSpec struct {
CPUCFSQuota *bool `json:"cpuCFSQuota,omitempty" flag:"cpu-cfs-quota"`
// CPUCFSQuotaPeriod sets CPU CFS quota period value, cpu.cfs_period_us, defaults to Linux Kernel default
CPUCFSQuotaPeriod *metav1.Duration `json:"cpuCFSQuotaPeriod,omitempty" flag:"cpu-cfs-quota-period"`
// CpuManagerPolicy allows for changing the default policy of None to static
CpuManagerPolicy string `json:"cpuManagerPolicy,omitempty" flag:"cpu-manager-policy"`
}

// KubeProxyConfig defines the configuration for a proxy
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 949e453

Please sign in to comment.