Skip to content

Commit 415d3fc

Browse files
authored
feat: allow disabling mount of SOCI directory (#2588)
Some instance types have instance stores that can be slower than EBS. Add an option to disable the mount of the SOCI directory if desired.
1 parent 14ad3b1 commit 415d3fc

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

nodeadm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ update-deps:
138138
go get $(shell go list -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' -mod=mod -m all) && go mod tidy && go mod vendor
139139

140140
generate-instance-info:
141-
go run ./tools/instance-info/main.go > internal/kubelet/instance-info.jsonl
141+
go run ./tools/instance-info/main.go > internal/kubelet/instance-info.jsonl

nodeadm/api/v1alpha1/nodeconfig_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,14 @@ const (
145145
//
146146
// * `Containerd` refers to `/var/lib/containerd`
147147
// * `PodLogs` refers to `/var/log/pods`
148-
// +kubebuilder:validation:Enum={Containerd, PodLogs}
148+
// * `SOCI` refers to `/var/lib/soci-snapshotter-grpc`
149+
// +kubebuilder:validation:Enum={Containerd, PodLogs, SOCI}
149150
type DisabledMount string
150151

151152
const (
152153
DisabledMountContainerd DisabledMount = "Containerd"
153154
DisabledMountPodLogs DisabledMount = "PodLogs"
155+
DisabledMountSOCI DisabledMount = "SOCI"
154156
)
155157

156158
// Feature specifies which feature gate should be toggled

nodeadm/crds/node.eks.aws_nodeconfigs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ spec:
122122
123123
* `Containerd` refers to `/var/lib/containerd`
124124
* `PodLogs` refers to `/var/log/pods`
125+
* `SOCI` refers to `/var/lib/soci-snapshotter-grpc`
125126
enum:
126127
- Containerd
127128
- PodLogs
129+
- SOCI
128130
type: string
129131
type: array
130132
mountPath:

nodeadm/doc/api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ DisabledMount specifies a directory that should not be mounted onto local storag
4545

4646
* `Containerd` refers to `/var/lib/containerd`
4747
* `PodLogs` refers to `/var/log/pods`
48+
* `SOCI` refers to `/var/lib/soci-snapshotter-grpc`
4849

4950
_Appears in:_
5051
- [LocalStorageOptions](#localstorageoptions)
5152

5253
.Validation:
53-
- Enum: [Containerd PodLogs]
54+
- Enum: [Containerd PodLogs SOCI]
5455

5556
#### EnvironmentOptions
5657

nodeadm/internal/api/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ type DisabledMount string
131131
const (
132132
DisabledMountContainerd DisabledMount = "Containerd"
133133
DisabledMountPodLogs DisabledMount = "PodLogs"
134+
DisabledMountSOCI DisabledMount = "SOCI"
134135
)
135136

136137
type Feature string

nodeadm/internal/system/local_disk.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ func (a *localDiskAspect) Setup(cfg *api.NodeConfig) error {
3737
args = append(args, "--no-bind-pods-logs")
3838
case api.DisabledMountContainerd:
3939
args = append(args, "--no-bind-containerd")
40+
case api.DisabledMountSOCI:
41+
args = append(args, "--no-bind-soci")
4042
}
4143
}
4244

0 commit comments

Comments
 (0)