mirror of https://github.com/kubernetes/kops.git
Make CPU Requests for Calico configurable instead of hard-coded
Update bindata.go Apply suggestions from code review Applying suggested changes. Co-Authored-By: Ciprian Hacman <ciprianhacman@gmail.com> Applying changes after running `make gofmt` Applying changes after running `make crds` Apply suggestions from code review Applying suggested changes. Co-Authored-By: Ciprian Hacman <ciprianhacman@gmail.com> Applying changes after running `make gofmt` Fixing broken things Typo fixes Apply suggestions from code review Co-Authored-By: Ciprian Hacman <ciprianhacman@gmail.com> Apply suggested changes and run necessary `make` steps
This commit is contained in:
parent
b0ed737899
commit
9fffc5f8e0
|
@ -2601,7 +2601,17 @@ spec:
|
|||
description: CalicoNetworkingSpec declares that we want Calico
|
||||
networking
|
||||
properties:
|
||||
cpuRequest:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'CPURequest CPU request of Calico container.
|
||||
Default: 100m'
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
crossSubnet:
|
||||
description: CrossSubnet enables Calico's cross-subnet mode
|
||||
when set to true
|
||||
type: boolean
|
||||
ipipMode:
|
||||
description: IPIPMode is mode for CALICO_IPV4POOL_IPIP
|
||||
|
@ -2666,6 +2676,14 @@ spec:
|
|||
breaking connectivity. Default: ''insert'' (other options:
|
||||
''append'')'
|
||||
type: string
|
||||
cpuRequest:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: 'CPURequest CPU request of Canal container. Default:
|
||||
100m'
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
defaultEndpointToHostAction:
|
||||
description: 'DefaultEndpointToHostAction allows users to
|
||||
configure the default behaviour for traffic between pod
|
||||
|
|
|
@ -100,7 +100,10 @@ type FlannelNetworkingSpec struct {
|
|||
|
||||
// CalicoNetworkingSpec declares that we want Calico networking
|
||||
type CalicoNetworkingSpec struct {
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
// CPURequest CPU request of Calico container. Default: 100m
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
// CrossSubnet enables Calico's cross-subnet mode when set to true
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"`
|
||||
// LogSeverityScreen lets us set the desired log level. (Default: info)
|
||||
LogSeverityScreen string `json:"logSeverityScreen,omitempty"`
|
||||
// MTU to be set in the cni-network-config for calico.
|
||||
|
@ -138,6 +141,8 @@ type CanalNetworkingSpec struct {
|
|||
// appends to the bottom. Leaving the default option is safest to prevent accidentally
|
||||
// breaking connectivity. Default: 'insert' (other options: 'append')
|
||||
ChainInsertMode string `json:"chainInsertMode,omitempty"`
|
||||
// CPURequest CPU request of Canal container. Default: 100m
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
// DefaultEndpointToHostAction allows users to configure the default behaviour
|
||||
// for traffic between pod to host after calico rules have been processed.
|
||||
// Default: ACCEPT (other options: DROP, RETURN)
|
||||
|
|
|
@ -100,7 +100,10 @@ type FlannelNetworkingSpec struct {
|
|||
|
||||
// CalicoNetworkingSpec declares that we want Calico networking
|
||||
type CalicoNetworkingSpec struct {
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"` // Enables Calico's cross-subnet mode when set to true
|
||||
// CPURequest CPU request of Calico container. Default: 100m
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
// CrossSubnet enables Calico's cross-subnet mode when set to true
|
||||
CrossSubnet bool `json:"crossSubnet,omitempty"`
|
||||
// LogSeverityScreen lets us set the desired log level. (Default: info)
|
||||
LogSeverityScreen string `json:"logSeverityScreen,omitempty"`
|
||||
// MTU to be set in the cni-network-config for calico.
|
||||
|
@ -138,6 +141,8 @@ type CanalNetworkingSpec struct {
|
|||
// appends to the bottom. Leaving the default option is safest to prevent accidentally
|
||||
// breaking connectivity. Default: 'insert' (other options: 'append')
|
||||
ChainInsertMode string `json:"chainInsertMode,omitempty"`
|
||||
// CPURequest CPU request of Canal container. Default: 100m
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
// DefaultEndpointToHostAction allows users to configure the default behaviour
|
||||
// for traffic between pod to host after calico rules have been processed.
|
||||
// Default: ACCEPT (other options: DROP, RETURN)
|
||||
|
|
|
@ -1281,6 +1281,7 @@ func Convert_kops_CNINetworkingSpec_To_v1alpha2_CNINetworkingSpec(in *kops.CNINe
|
|||
}
|
||||
|
||||
func autoConvert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *CalicoNetworkingSpec, out *kops.CalicoNetworkingSpec, s conversion.Scope) error {
|
||||
out.CPURequest = in.CPURequest
|
||||
out.CrossSubnet = in.CrossSubnet
|
||||
out.LogSeverityScreen = in.LogSeverityScreen
|
||||
out.MTU = in.MTU
|
||||
|
@ -1303,6 +1304,7 @@ func Convert_v1alpha2_CalicoNetworkingSpec_To_kops_CalicoNetworkingSpec(in *Cali
|
|||
}
|
||||
|
||||
func autoConvert_kops_CalicoNetworkingSpec_To_v1alpha2_CalicoNetworkingSpec(in *kops.CalicoNetworkingSpec, out *CalicoNetworkingSpec, s conversion.Scope) error {
|
||||
out.CPURequest = in.CPURequest
|
||||
out.CrossSubnet = in.CrossSubnet
|
||||
out.LogSeverityScreen = in.LogSeverityScreen
|
||||
out.MTU = in.MTU
|
||||
|
@ -1326,6 +1328,7 @@ func Convert_kops_CalicoNetworkingSpec_To_v1alpha2_CalicoNetworkingSpec(in *kops
|
|||
|
||||
func autoConvert_v1alpha2_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *CanalNetworkingSpec, out *kops.CanalNetworkingSpec, s conversion.Scope) error {
|
||||
out.ChainInsertMode = in.ChainInsertMode
|
||||
out.CPURequest = in.CPURequest
|
||||
out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction
|
||||
out.DisableFlannelForwardRules = in.DisableFlannelForwardRules
|
||||
out.IptablesBackend = in.IptablesBackend
|
||||
|
@ -1348,6 +1351,7 @@ func Convert_v1alpha2_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *CanalN
|
|||
|
||||
func autoConvert_kops_CanalNetworkingSpec_To_v1alpha2_CanalNetworkingSpec(in *kops.CanalNetworkingSpec, out *CanalNetworkingSpec, s conversion.Scope) error {
|
||||
out.ChainInsertMode = in.ChainInsertMode
|
||||
out.CPURequest = in.CPURequest
|
||||
out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction
|
||||
out.DisableFlannelForwardRules = in.DisableFlannelForwardRules
|
||||
out.IptablesBackend = in.IptablesBackend
|
||||
|
|
|
@ -290,6 +290,11 @@ func (in *CNINetworkingSpec) DeepCopy() *CNINetworkingSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CalicoNetworkingSpec) DeepCopyInto(out *CalicoNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MTU != nil {
|
||||
in, out := &in.MTU, &out.MTU
|
||||
*out = new(int32)
|
||||
|
@ -311,6 +316,11 @@ func (in *CalicoNetworkingSpec) DeepCopy() *CalicoNetworkingSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CanalNetworkingSpec) DeepCopyInto(out *CanalNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MTU != nil {
|
||||
in, out := &in.MTU, &out.MTU
|
||||
*out = new(int32)
|
||||
|
|
|
@ -306,6 +306,11 @@ func (in *CNINetworkingSpec) DeepCopy() *CNINetworkingSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CalicoNetworkingSpec) DeepCopyInto(out *CalicoNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MTU != nil {
|
||||
in, out := &in.MTU, &out.MTU
|
||||
*out = new(int32)
|
||||
|
@ -327,6 +332,11 @@ func (in *CalicoNetworkingSpec) DeepCopy() *CalicoNetworkingSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *CanalNetworkingSpec) DeepCopyInto(out *CanalNetworkingSpec) {
|
||||
*out = *in
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MTU != nil {
|
||||
in, out := &in.MTU, &out.MTU
|
||||
*out = new(int32)
|
||||
|
|
|
@ -7639,7 +7639,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 90m
|
||||
cpu: {{ or .Networking.Calico.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
@ -8754,7 +8754,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 90m
|
||||
cpu: {{ or .Networking.Calico.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
@ -10863,7 +10863,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
cpu: {{ or .Networking.Canal.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /liveness
|
||||
|
@ -11776,7 +11776,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
cpu: {{ or .Networking.Canal.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
@ -12693,7 +12693,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 90m
|
||||
cpu: {{ or .Networking.Canal.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -509,7 +509,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
cpu: {{ or .Networking.Canal.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /liveness
|
||||
|
|
|
@ -797,7 +797,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
cpu: {{ or .Networking.Canal.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -787,7 +787,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 90m
|
||||
cpu: {{ or .Networking.Canal.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -838,7 +838,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 90m
|
||||
cpu: {{ or .Networking.Calico.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -849,7 +849,7 @@ spec:
|
|||
privileged: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 90m
|
||||
cpu: {{ or .Networking.Calico.CPURequest "100m" }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
|
|
|
@ -725,8 +725,8 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
|
|||
versions := map[string]string{
|
||||
"k8s-1.7": "2.6.12-kops.1",
|
||||
"k8s-1.7-v3": "3.8.0-kops.2",
|
||||
"k8s-1.12": "3.9.5-kops.2",
|
||||
"k8s-1.16": "3.13.3-kops.1",
|
||||
"k8s-1.12": "3.9.5-kops.3",
|
||||
"k8s-1.16": "3.13.3-kops.2",
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -792,9 +792,9 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
|
|||
key := "networking.projectcalico.org.canal"
|
||||
versions := map[string]string{
|
||||
"k8s-1.9": "3.2.3-kops.1",
|
||||
"k8s-1.12": "3.7.5-kops.1",
|
||||
"k8s-1.15": "3.12.1-kops.1",
|
||||
"k8s-1.16": "3.13.3-kops.1",
|
||||
"k8s-1.12": "3.7.5-kops.2",
|
||||
"k8s-1.15": "3.12.1-kops.2",
|
||||
"k8s-1.16": "3.13.3-kops.2",
|
||||
}
|
||||
{
|
||||
id := "k8s-1.9"
|
||||
|
|
Loading…
Reference in New Issue