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

Mark control-plane node for update when etcd volume size changes #11365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 12 additions & 9 deletions pkg/model/bootstrapscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,19 @@ func (b *BootstrapScript) Run(c *fi.Context) error {

for _, etcdCluster := range cs.EtcdClusters {
c := kops.EtcdClusterSpec{
Image: etcdCluster.Image,
Version: etcdCluster.Version,
Image: etcdCluster.Image,
Version: etcdCluster.Version,
CPURequest: etcdCluster.CPURequest,
MemoryRequest: etcdCluster.MemoryRequest,
}
// if the user has not specified memory or cpu allotments for etcd, do not
// apply one. Described in PR #6313.
if etcdCluster.CPURequest != nil {
c.CPURequest = etcdCluster.CPURequest
}
if etcdCluster.MemoryRequest != nil {
c.MemoryRequest = etcdCluster.MemoryRequest
for _, etcdMember := range etcdCluster.Members {
if fi.StringValue(etcdMember.InstanceGroup) == b.ig.Name && etcdMember.VolumeSize != nil {
m := kops.EtcdMemberSpec{
Name: etcdMember.Name,
VolumeSize: etcdMember.VolumeSize,
}
c.Members = append(c.Members, m)
}
}
spec["etcdClusters"].(map[string]kops.EtcdClusterSpec)[etcdCluster.Name] = c
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@
"Type": "AWS::EC2::Volume",
"Properties": {
"AvailabilityZone": "us-test-1a",
"Size": 20,
"Size": 50,
"VolumeType": "gp3",
"Iops": 5000,
"Throughput": 125,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,14 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom.Properties.
encryptionConfig: null
etcdClusters:
events:
etcdMembers:
- name: us-test-1a
volumeSize: 20
version: 3.4.13
main:
etcdMembers:
- name: us-test-1a
volumeSize: 50
version: 3.4.13
kubeAPIServer:
allowPrivileged: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,14 @@ docker:
encryptionConfig: null
etcdClusters:
events:
etcdMembers:
- name: us-test-1a
volumeSize: 20
version: 3.4.13
main:
etcdMembers:
- name: us-test-1a
volumeSize: 50
version: 3.4.13
kubeAPIServer:
allowPrivileged: true
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/update_cluster/minimal-gp3/in-v1alpha2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ spec:
- instanceGroup: master-us-test-1a
name: us-test-1a
volumeIops: 5000
volumeSize: 50
volumeThroughput: 125
volumeType: gp3
name: main
- etcdMembers:
- instanceGroup: master-us-test-1a
name: us-test-1a
volumeSize: 20
volumeType: gp3
name: events
iam: {}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/update_cluster/minimal-gp3/kubernetes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ resource "aws_ebs_volume" "us-test-1a-etcd-main-minimal-example-com" {
availability_zone = "us-test-1a"
encrypted = false
iops = 5000
size = 20
size = 50
tags = {
"KubernetesCluster" = "minimal.example.com"
"Name" = "us-test-1a.etcd-main.minimal.example.com"
Expand Down