Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Added an option to Skip IOPS verification in ETCD #1828

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
6 changes: 6 additions & 0 deletions builtin/files/cluster.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,12 @@ experimental:
# from the local VPC subnet so that load balancers can access it. Ref: https://github.com/kubernetes/kubernetes/issues/26670
disableSecurityGroupIngress: false

# When set to true will skip the IOPs performance check done when mounting Etcd volumes.
# It only makes sense if you have reserved IOPs for your etcd volumes.
# This check is by default quite slow because it depends on cloudwatch which usually has some delay for start providing metrics.
# The other check 'io-enabled' is still performed
skipIOPerformanceEtcdVolumeCheck: false

# Command line flag passed to the controller-manager. (default 40s)
# This is the amount of time which we allow running Node to be unresponsive before marking it unhealthy.
# Must be N times more than kubelet's nodeStatusUpdateFrequency (default 10s).
Expand Down
9 changes: 9 additions & 0 deletions builtin/files/userdata/cloud-config-etcd
Original file line number Diff line number Diff line change
Expand Up @@ -650,12 +650,21 @@ write_files:

done

{{- if .Experimental.SkipIOPerformanceEtcdVolumeCheck }}
# Wait until the volume attachment completes
until [ "$volume_status" = passed ]; do
sleep 3
describe_volume_status_result=$(aws ec2 describe-volume-status --volume-id $attached_vol_id)
volume_status=$(echo "$describe_volume_status_result" | jq -r '([] + .VolumeStatuses)[0].VolumeStatus.Details | .[] |select(.Name=="io-enabled") | .Status')
done
{{- else }}
# Wait until the volume attachment completes
until [ "$volume_status" = ok ]; do
sleep 3
describe_volume_status_result=$(aws ec2 describe-volume-status --volume-id $attached_vol_id)
volume_status=$(echo "$describe_volume_status_result" | jq -r "([] + .VolumeStatuses)[0].VolumeStatus.Status")
done
{{- end }}

cat ${state_prefix}.json \
| jq -r "([] + .Tags)[] | select(.Key == \"$name_tag_key\").Value" \
Expand Down
1 change: 1 addition & 0 deletions pkg/api/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func NewDefaultCluster() *Cluster {
UsernameClaim: "email",
GroupsClaim: "groups",
},
SkipIOPerformanceEtcdVolumeCheck: false,
}

ipvsMode := IPVSMode{
Expand Down
31 changes: 16 additions & 15 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ type Kubelet struct {
}

type Experimental struct {
Admission Admission `yaml:"admission"`
AuditLog AuditLog `yaml:"auditLog"`
Authentication Authentication `yaml:"authentication"`
AwsEnvironment AwsEnvironment `yaml:"awsEnvironment"`
AwsNodeLabels AwsNodeLabels `yaml:"awsNodeLabels"`
EphemeralImageStorage EphemeralImageStorage `yaml:"ephemeralImageStorage"`
GpuSupport GpuSupport `yaml:"gpuSupport,omitempty"`
KubeletOpts string `yaml:"kubeletOpts,omitempty"`
LoadBalancer LoadBalancer `yaml:"loadBalancer"`
TargetGroup TargetGroup `yaml:"targetGroup"`
NodeDrainer NodeDrainer `yaml:"nodeDrainer"`
Oidc Oidc `yaml:"oidc"`
DisableSecurityGroupIngress bool `yaml:"disableSecurityGroupIngress"`
NodeMonitorGracePeriod string `yaml:"nodeMonitorGracePeriod"`
UnknownKeys `yaml:",inline"`
Admission Admission `yaml:"admission"`
AuditLog AuditLog `yaml:"auditLog"`
Authentication Authentication `yaml:"authentication"`
AwsEnvironment AwsEnvironment `yaml:"awsEnvironment"`
AwsNodeLabels AwsNodeLabels `yaml:"awsNodeLabels"`
EphemeralImageStorage EphemeralImageStorage `yaml:"ephemeralImageStorage"`
GpuSupport GpuSupport `yaml:"gpuSupport,omitempty"`
KubeletOpts string `yaml:"kubeletOpts,omitempty"`
LoadBalancer LoadBalancer `yaml:"loadBalancer"`
TargetGroup TargetGroup `yaml:"targetGroup"`
NodeDrainer NodeDrainer `yaml:"nodeDrainer"`
Oidc Oidc `yaml:"oidc"`
DisableSecurityGroupIngress bool `yaml:"disableSecurityGroupIngress"`
NodeMonitorGracePeriod string `yaml:"nodeMonitorGracePeriod"`
SkipIOPerformanceEtcdVolumeCheck bool `yaml:"skipIOPerformanceEtcdVolumeCheck"`
UnknownKeys `yaml:",inline"`
}

func (c Experimental) Validate(name string) error {
Expand Down