Skip to content

Commit 28454ab

Browse files
authored
chore(nodeadm): rename feature flag (#2381)
Change to this name since it's less confusing, and the docs sufficiently describe the possible downsides of this flag.
1 parent 4103be7 commit 28454ab

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

nodeadm/api/v1alpha1/nodeconfig_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,16 @@ const (
129129
)
130130

131131
// Feature specifies which feature gate should be toggled
132-
// +kubebuilder:validation:Enum={InstanceIdNodeName,AggressiveImagePull}
132+
// +kubebuilder:validation:Enum={InstanceIdNodeName,FastImagePull}
133133
type Feature string
134134

135135
const (
136136
// InstanceIdNodeName will use EC2 instance ID as node name
137137
InstanceIdNodeName Feature = "InstanceIdNodeName"
138138

139-
// AggressiveImagePull enables a parallel image pull for container
140-
// images. This will use more instance CPU and Memory during image pull, but
139+
// FastImagePull enables a parallel image pull for container images. This
140+
// will use more instance CPU, Memory, and EBS I/O during image pull, but
141141
// may result in faster image pull times. This flag will be ignored on
142142
// instances with memory and vCPU below a certain threshold.
143-
AggressiveImagePull Feature = "AggressiveImagePull"
143+
FastImagePull Feature = "FastImagePull"
144144
)

nodeadm/doc/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ _Appears in:_
6262
- [NodeConfigSpec](#nodeconfigspec)
6363

6464
.Validation:
65-
- Enum: [InstanceIdNodeName AggressiveImagePull]
65+
- Enum: [InstanceIdNodeName FastImagePull]
6666

6767
#### InstanceOptions
6868

nodeadm/doc/examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ spec:
9292
```
9393

9494
---
95-
## Enabling aggressive image pull (experimental)
95+
## Enabling fast image pull (experimental)
9696

97-
When the `AggressiveImagePull` feature gate is enabled, `nodeadm` will configure the container runtime to pull and unpack container images in parallel.
97+
When the `FastImagePull` feature gate is enabled, `nodeadm` will configure the container runtime to pull and unpack container images in parallel.
9898

9999
This has the benefit of potentially decreasing image pull time, at the cost of increased CPU, memory and EBS usage during image pull.
100100

@@ -111,7 +111,7 @@ apiVersion: node.eks.aws/v1alpha1
111111
kind: NodeConfig
112112
spec:
113113
featureGates:
114-
AggressiveImagePull: true
114+
FastImagePull: true
115115
```
116116

117117
---

nodeadm/internal/api/featuregates.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ var featureVerifiers = map[Feature]func(Feature, map[Feature]bool) bool{
1515
// By default, this feature is disabled, and the private DNS Name will be used.
1616
InstanceIdNodeName: DefaultFalse,
1717

18-
// AggressiveImagePull enables a parallel image pull for container
19-
// images. This will use more instance CPU and Memory during image pull, but
18+
// FastImagePull enables a parallel image pull for container images. This
19+
// will use more instance CPU, Memory, and EBS I/O during image pull, but
2020
// may result in faster image pull times. This flag will be ignored on
2121
// instances with memory and vCPU below a certain threshold.
22-
AggressiveImagePull: DefaultFalse,
22+
FastImagePull: DefaultFalse,
2323
}
2424

2525
func IsFeatureEnabled(feature Feature, featureGates map[Feature]bool) bool {

nodeadm/internal/api/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,5 @@ const (
123123
// InstanceIdNodeName will use EC2 instance ID as node name
124124
InstanceIdNodeName Feature = "InstanceIdNodeName"
125125

126-
AggressiveImagePull Feature = "AggressiveImagePull"
126+
FastImagePull Feature = "FastImagePull"
127127
)

nodeadm/internal/containerd/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func writeSnapshotterConfig(cfg *api.NodeConfig, resources system.Resources) err
165165
}
166166

167167
func UseSOCISnapshotter(cfg *api.NodeConfig, resources system.Resources) bool {
168-
if !api.IsFeatureEnabled(api.AggressiveImagePull, cfg.Spec.FeatureGates) {
168+
if !api.IsFeatureEnabled(api.FastImagePull, cfg.Spec.FeatureGates) {
169169
return false
170170
}
171171

nodeadm/internal/containerd/containerd_config_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import (
99
"github.com/stretchr/testify/assert"
1010
)
1111

12-
func TestContainerdConfigWithUserConfigAndAggressiveImagePullFeature(t *testing.T) {
12+
func TestContainerdConfigWithUserConfigAndFastImagePullFeature(t *testing.T) {
1313
cfg := &api.NodeConfig{
1414
Spec: api.NodeConfigSpec{
1515
FeatureGates: map[api.Feature]bool{
16-
api.AggressiveImagePull: true,
16+
api.FastImagePull: true,
1717
},
1818
Containerd: api.ContainerdOptions{
1919
Config: api.ContainerdConfig(`
@@ -76,7 +76,7 @@ func TestContainerdConfig(t *testing.T) {
7676
cfg: &api.NodeConfig{
7777
Spec: api.NodeConfigSpec{
7878
FeatureGates: map[api.Feature]bool{
79-
api.AggressiveImagePull: true,
79+
api.FastImagePull: true,
8080
},
8181
},
8282
},
@@ -89,7 +89,7 @@ func TestContainerdConfig(t *testing.T) {
8989
cfg: &api.NodeConfig{
9090
Spec: api.NodeConfigSpec{
9191
FeatureGates: map[api.Feature]bool{
92-
api.AggressiveImagePull: true,
92+
api.FastImagePull: true,
9393
},
9494
},
9595
},
@@ -102,7 +102,7 @@ func TestContainerdConfig(t *testing.T) {
102102
cfg: &api.NodeConfig{
103103
Spec: api.NodeConfigSpec{
104104
FeatureGates: map[api.Feature]bool{
105-
api.AggressiveImagePull: true,
105+
api.FastImagePull: true,
106106
},
107107
},
108108
},
@@ -121,7 +121,7 @@ func TestContainerdConfig(t *testing.T) {
121121
cfg: &api.NodeConfig{
122122
Spec: api.NodeConfigSpec{
123123
FeatureGates: map[api.Feature]bool{
124-
api.AggressiveImagePull: true,
124+
api.FastImagePull: true,
125125
},
126126
},
127127
},
@@ -134,7 +134,7 @@ func TestContainerdConfig(t *testing.T) {
134134
cfg: &api.NodeConfig{
135135
Spec: api.NodeConfigSpec{
136136
FeatureGates: map[api.Feature]bool{
137-
api.AggressiveImagePull: true,
137+
api.FastImagePull: true,
138138
},
139139
},
140140
},
@@ -147,7 +147,7 @@ func TestContainerdConfig(t *testing.T) {
147147
cfg: &api.NodeConfig{
148148
Spec: api.NodeConfigSpec{
149149
FeatureGates: map[api.Feature]bool{
150-
api.AggressiveImagePull: true,
150+
api.FastImagePull: true,
151151
},
152152
},
153153
},

0 commit comments

Comments
 (0)