Skip to content

Commit

Permalink
feat: implement image cache configuration
Browse files Browse the repository at this point in the history
Implement a feature flag, a resource which controls the flow.

This controls the volume configuration, mounting, etc.

Fixes #9767

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Nov 20, 2024
1 parent 7ffcf5b commit 09555ac
Show file tree
Hide file tree
Showing 20 changed files with 656 additions and 93 deletions.
7 changes: 7 additions & 0 deletions api/resource/definitions/cri/cri.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ option go_package = "github.com/siderolabs/talos/pkg/machinery/api/resource/defi
option java_package = "dev.talos.api.resource.definitions.cri";

import "google/protobuf/struct.proto";
import "resource/definitions/enums/enums.proto";

// ImageCacheConfigSpec represents the ImageCacheConfig.
message ImageCacheConfigSpec {
talos.resource.definitions.enums.CriImageCacheStatus status = 1;
repeated string roots = 2;
}

// SeccompProfileSpec represents the SeccompProfile.
message SeccompProfileSpec {
Expand Down
8 changes: 8 additions & 0 deletions api/resource/definitions/enums/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,14 @@ enum BlockVolumeType {
VOLUME_TYPE_TMPFS = 2;
}

// CriImageCacheStatus describes image cache status type.
enum CriImageCacheStatus {
IMAGE_CACHE_STATUS_UNKNOWN = 0;
IMAGE_CACHE_STATUS_DISABLED = 1;
IMAGE_CACHE_STATUS_PREPARING = 2;
IMAGE_CACHE_STATUS_READY = 3;
}

// KubespanPeerState is KubeSpan peer current state.
enum KubespanPeerState {
PEER_STATE_UNKNOWN = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func NewState() (*State, error) {
&cluster.Member{},
&config.MachineConfig{},
&config.MachineType{},
&cri.ImageCacheConfig{},
&cri.SeccompProfile{},
&etcd.Config{},
&etcd.PKIStatus{},
Expand Down
123 changes: 96 additions & 27 deletions pkg/machinery/api/resource/definitions/cri/cri.pb.go

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

Loading

0 comments on commit 09555ac

Please sign in to comment.