mirror of https://github.com/kubernetes/kops.git
Configure Karpenter resources.
This commit is contained in:
parent
bd6c6852dc
commit
32b0416547
|
@ -1505,6 +1505,12 @@ spec:
|
|||
karpenter:
|
||||
description: Karpenter defines the Karpenter configuration.
|
||||
properties:
|
||||
cpuRequest:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
enabled:
|
||||
type: boolean
|
||||
image:
|
||||
|
@ -1513,6 +1519,18 @@ spec:
|
|||
type: string
|
||||
logLevel:
|
||||
type: string
|
||||
memoryLimit:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
memoryRequest:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
keyStore:
|
||||
description: KeyStore is the VFS path to where SSL keys and certificates
|
||||
|
|
|
@ -254,10 +254,13 @@ type ScalewaySpec struct {
|
|||
}
|
||||
|
||||
type KarpenterConfig struct {
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
LogEncoding string `json:"logFormat,omitempty"`
|
||||
LogLevel string `json:"logLevel,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
LogEncoding string `json:"logFormat,omitempty"`
|
||||
LogLevel string `json:"logLevel,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
|
||||
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceAccountIssuerDiscoveryConfig configures an OIDC Issuer.
|
||||
|
|
|
@ -261,10 +261,13 @@ type PodIdentityWebhookSpec struct {
|
|||
}
|
||||
|
||||
type KarpenterConfig struct {
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
LogEncoding string `json:"logEncoding,omitempty"`
|
||||
LogLevel string `json:"logLevel,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
LogEncoding string `json:"logEncoding,omitempty"`
|
||||
LogLevel string `json:"logLevel,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
|
||||
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceAccountIssuerDiscoveryConfig configures an OIDC Issuer.
|
||||
|
|
|
@ -4605,6 +4605,9 @@ func autoConvert_v1alpha2_KarpenterConfig_To_kops_KarpenterConfig(in *KarpenterC
|
|||
out.LogEncoding = in.LogEncoding
|
||||
out.LogLevel = in.LogLevel
|
||||
out.Image = in.Image
|
||||
out.MemoryLimit = in.MemoryLimit
|
||||
out.MemoryRequest = in.MemoryRequest
|
||||
out.CPURequest = in.CPURequest
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -4618,6 +4621,9 @@ func autoConvert_kops_KarpenterConfig_To_v1alpha2_KarpenterConfig(in *kops.Karpe
|
|||
out.LogEncoding = in.LogEncoding
|
||||
out.LogLevel = in.LogLevel
|
||||
out.Image = in.Image
|
||||
out.MemoryLimit = in.MemoryLimit
|
||||
out.MemoryRequest = in.MemoryRequest
|
||||
out.CPURequest = in.CPURequest
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1368,7 +1368,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
|||
if in.Karpenter != nil {
|
||||
in, out := &in.Karpenter, &out.Karpenter
|
||||
*out = new(KarpenterConfig)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.PodIdentityWebhook != nil {
|
||||
in, out := &in.PodIdentityWebhook, &out.PodIdentityWebhook
|
||||
|
@ -2735,6 +2735,21 @@ func (in *InstanceRequirementsSpec) DeepCopy() *InstanceRequirementsSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *KarpenterConfig) DeepCopyInto(out *KarpenterConfig) {
|
||||
*out = *in
|
||||
if in.MemoryLimit != nil {
|
||||
in, out := &in.MemoryLimit, &out.MemoryLimit
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MemoryRequest != nil {
|
||||
in, out := &in.MemoryRequest, &out.MemoryRequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -250,10 +250,13 @@ type ScalewaySpec struct {
|
|||
}
|
||||
|
||||
type KarpenterConfig struct {
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
LogEncoding string `json:"logEncoding,omitempty"`
|
||||
LogLevel string `json:"logLevel,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
Enabled bool `json:"enabled,omitempty"`
|
||||
LogEncoding string `json:"logEncoding,omitempty"`
|
||||
LogLevel string `json:"logLevel,omitempty"`
|
||||
Image string `json:"image,omitempty"`
|
||||
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
|
||||
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
|
||||
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceAccountIssuerDiscoveryConfig configures an OIDC Issuer.
|
||||
|
|
|
@ -4998,6 +4998,9 @@ func autoConvert_v1alpha3_KarpenterConfig_To_kops_KarpenterConfig(in *KarpenterC
|
|||
out.LogEncoding = in.LogEncoding
|
||||
out.LogLevel = in.LogLevel
|
||||
out.Image = in.Image
|
||||
out.MemoryLimit = in.MemoryLimit
|
||||
out.MemoryRequest = in.MemoryRequest
|
||||
out.CPURequest = in.CPURequest
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -5011,6 +5014,9 @@ func autoConvert_kops_KarpenterConfig_To_v1alpha3_KarpenterConfig(in *kops.Karpe
|
|||
out.LogEncoding = in.LogEncoding
|
||||
out.LogLevel = in.LogLevel
|
||||
out.Image = in.Image
|
||||
out.MemoryLimit = in.MemoryLimit
|
||||
out.MemoryRequest = in.MemoryRequest
|
||||
out.CPURequest = in.CPURequest
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1263,7 +1263,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
|||
if in.Karpenter != nil {
|
||||
in, out := &in.Karpenter, &out.Karpenter
|
||||
*out = new(KarpenterConfig)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -2704,6 +2704,21 @@ func (in *InstanceRootVolumeSpec) DeepCopy() *InstanceRootVolumeSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *KarpenterConfig) DeepCopyInto(out *KarpenterConfig) {
|
||||
*out = *in
|
||||
if in.MemoryLimit != nil {
|
||||
in, out := &in.MemoryLimit, &out.MemoryLimit
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MemoryRequest != nil {
|
||||
in, out := &in.MemoryRequest, &out.MemoryRequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -1360,7 +1360,7 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
|||
if in.Karpenter != nil {
|
||||
in, out := &in.Karpenter, &out.Karpenter
|
||||
*out = new(KarpenterConfig)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -2867,6 +2867,21 @@ func (in *InstanceRootVolumeSpec) DeepCopy() *InstanceRootVolumeSpec {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *KarpenterConfig) DeepCopyInto(out *KarpenterConfig) {
|
||||
*out = *in
|
||||
if in.MemoryLimit != nil {
|
||||
in, out := &in.MemoryLimit, &out.MemoryLimit
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.MemoryRequest != nil {
|
||||
in, out := &in.MemoryRequest, &out.MemoryRequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
if in.CPURequest != nil {
|
||||
in, out := &in.CPURequest, &out.CPURequest
|
||||
x := (*in).DeepCopy()
|
||||
*out = &x
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -55,10 +55,13 @@ spec:
|
|||
legacy: false
|
||||
useServiceAccountExternalPermissions: true
|
||||
karpenter:
|
||||
cpuRequest: 100m
|
||||
enabled: true
|
||||
image: public.ecr.aws/karpenter/controller:v0.28.1
|
||||
logEncoding: console
|
||||
logLevel: debug
|
||||
memoryLimit: 2Gi
|
||||
memoryRequest: 500Mi
|
||||
keyStore: memfs://clusters.example.com/minimal.example.com/pki
|
||||
kubeAPIServer:
|
||||
allowPrivileged: true
|
||||
|
|
|
@ -120,7 +120,7 @@ spec:
|
|||
version: 9.99.0
|
||||
- id: k8s-1.19
|
||||
manifest: karpenter.sh/k8s-1.19.yaml
|
||||
manifestHash: ff8aea6ec871d9b7d8482dab9831d002de4466243c9df7c10b363e47ccc58601
|
||||
manifestHash: 83732936b11b5830020d8af7bf0955c4b6334c7a1ba93bf051b40bb79294075d
|
||||
name: karpenter.sh
|
||||
prune:
|
||||
kinds:
|
||||
|
|
|
@ -1744,10 +1744,10 @@ spec:
|
|||
timeoutSeconds: 30
|
||||
resources:
|
||||
limits:
|
||||
memory: 1Gi
|
||||
memory: 2Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
volumeMounts:
|
||||
- mountPath: /var/run/secrets/amazonaws.com/
|
||||
name: token-amazonaws-com
|
||||
|
|
|
@ -21,7 +21,10 @@ spec:
|
|||
iam:
|
||||
useServiceAccountExternalPermissions: true
|
||||
karpenter:
|
||||
cpuRequest: 100m
|
||||
enabled: true
|
||||
memoryRequest: 500Mi
|
||||
memoryLimit: 2Gi
|
||||
kubelet:
|
||||
anonymousAuth: false
|
||||
kubernetesVersion: v1.25.0
|
||||
|
|
|
@ -1526,10 +1526,10 @@ spec:
|
|||
port: http
|
||||
resources:
|
||||
limits:
|
||||
memory: 1Gi
|
||||
memory: {{ or .Karpenter.MemoryLimit "1Gi" }}
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
cpu: {{ or .Karpenter.CPURequest "500m" }}
|
||||
memory: {{ or .Karpenter.MemoryRequest "1Gi" }}
|
||||
nodeSelector: null
|
||||
# The template below patches the .Values.affinity to add a default label selector where not specificed
|
||||
affinity:
|
||||
|
|
Loading…
Reference in New Issue