Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting Limit & Request for aws-iam-authenticator #7260

Merged
merged 2 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/apis/kops/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@ type KopeioAuthenticationSpec struct {
type AwsAuthenticationSpec struct {
// Image is the AWS IAM Authenticator docker image to use
Image string `json:"image,omitempty"`
// MemoryRequest memory request of AWS IAM Authenticator container. Default 20Mi
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
// CPURequest CPU request of AWS IAM Authenticator container. Default 10m
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
// MemoryLimit memory limit of AWS IAM Authenticator container. Default 20Mi
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
// CPULimit CPU limit of AWS IAM Authenticator container. Default 10m
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
}

type AuthorizationSpec struct {
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/kops/v1alpha1/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ type KopeioAuthenticationSpec struct {
type AwsAuthenticationSpec struct {
// Image is the AWS IAM Authenticator docker image to use
Image string `json:"image,omitempty"`
// MemoryRequest memory request of AWS IAM Authenticator container. Default 20Mi
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
// CPURequest CPU request of AWS IAM Authenticator container. Default 10m
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
// MemoryLimit memory limit of AWS IAM Authenticator container. Default 20Mi
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
// CPULimit CPU limit of AWS IAM Authenticator container. Default 10m
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
}

type AuthorizationSpec struct {
Expand Down
8 changes: 8 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.

22 changes: 21 additions & 1 deletion pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go

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

8 changes: 8 additions & 0 deletions pkg/apis/kops/v1alpha2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@ type KopeioAuthenticationSpec struct {
type AwsAuthenticationSpec struct {
// Image is the AWS IAM Authenticator docker image to uses
Image string `json:"image,omitempty"`
// MemoryRequest memory request of AWS IAM Authenticator container. Default 20Mi
MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
// CPURequest CPU request of AWS IAM Authenticator container. Default 10m
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
// MemoryLimit memory limit of AWS IAM Authenticator container. Default 20Mi
MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"`
// CPULimit CPU limit of AWS IAM Authenticator container. Default 10m
CPULimit *resource.Quantity `json:"cpuLimit,omitempty"`
}

type AuthorizationSpec struct {
Expand Down
8 changes: 8 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.

22 changes: 21 additions & 1 deletion pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

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

22 changes: 21 additions & 1 deletion pkg/apis/kops/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ spec:

resources:
requests:
memory: 20Mi
cpu: 10m
memory: {{ or .Authentication.Aws.MemoryRequest "20Mi" }}
cpu: {{ or .Authentication.Aws.CPURequest "10m" }}
limits:
memory: 20Mi
cpu: 100m
memory: {{ or .Authentication.Aws.MemoryLimit "20Mi" }}
cpu: {{ or .Authentication.Aws.CPULimit "10m" }}

volumeMounts:
- name: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ spec:

resources:
requests:
memory: 20Mi
cpu: 10m
memory: {{ or .Authentication.Aws.MemoryRequest "20Mi" }}
cpu: {{ or .Authentication.Aws.CPURequest "10m" }}
limits:
memory: 20Mi
cpu: 100m
memory: {{ or .Authentication.Aws.MemoryLimit "20Mi" }}
cpu: {{ or .Authentication.Aws.CPULimit "10m" }}

volumeMounts:
- name: config
Expand Down