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

feat: implement image cache configuration #9768

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

smira
Copy link
Member

@smira smira commented Nov 20, 2024

Implement a feature flag, a resource which controls the flow.

This controls the volume configuration, mounting, etc.

Fixes #9767

@smira smira added this to the v1.9 milestone Nov 20, 2024
@smira

This comment was marked as outdated.

@smira smira force-pushed the feat/image-cache-configuration branch from 09555ac to 11d246f Compare November 20, 2024 16:57
@smira smira force-pushed the feat/image-cache-configuration branch from 11d246f to 554bc64 Compare November 21, 2024 15:22
@smira smira force-pushed the feat/image-cache-configuration branch from 554bc64 to 66617b4 Compare November 21, 2024 17:01
@smira
Copy link
Member Author

smira commented Nov 21, 2024

Example machine config patch to activate this feature:

machine:
  features:
    imageCache: true
---
apiVersion: v1alpha1
kind: VolumeConfig
name: IMAGECACHE
provisioning:
    diskSelector:
        match: disk.transport == "nvme" && !system_disk

Implement a feature flag, a resource which controls the flow.

This controls the volume configuration, mounting, etc.

Fixes siderolabs#9767

Signed-off-by: Andrey Smirnov <[email protected]>
@smira smira force-pushed the feat/image-cache-configuration branch from 66617b4 to 5f68c17 Compare November 21, 2024 17:24
@smira smira marked this pull request as ready for review November 21, 2024 17:24
@smira
Copy link
Member Author

smira commented Nov 21, 2024

# talosctl -n 172.20.0.5 get imagecacheconfig -o yaml 
node: 172.20.0.5
metadata:
    namespace: cri
    type: ImageCacheConfigs.cri.talos.dev
    id: image-cache
    version: 4
    owner: cri.ImageCacheConfigController
    phase: running
    created: 2024-11-21T17:21:14Z
    updated: 2024-11-21T17:21:17Z
spec:
    status: ready
    roots:
        - /system/imagecache/disk

@smira
Copy link
Member Author

smira commented Nov 21, 2024

$ talosctl -n 172.20.0.5 get mountstatus                  
NODE         NAMESPACE   TYPE          ID           VERSION   SOURCE           TARGET                    FILESYSTEM TYPE
172.20.0.5   runtime     MountStatus   EPHEMERAL    1         /dev/vda6        /var                      xfs
172.20.0.5   runtime     MountStatus   IMAGECACHE   1         /dev/nvme0n1p1   /system/imagecache/disk   ext4
172.20.0.5   runtime     MountStatus   STATE        1         /dev/vda5        /system/state             xfs

Copy link
Member

@frezbo frezbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒

@smira
Copy link
Member Author

smira commented Nov 21, 2024

/m

@talos-bot talos-bot merged commit 5f68c17 into siderolabs:main Nov 21, 2024
50 checks passed
@frezbo
Copy link
Member

frezbo commented Nov 22, 2024

machine:
  features:
    imageCache: true

seems this patch needs a reboot, I guess that was not intended 🤔

@smira
Copy link
Member Author

smira commented Nov 25, 2024

machine:
  features:
    imageCache: true

seems this patch needs a reboot, I guess that was not intended 🤔

ah, true, I'll get it fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

image cache: volume config, mounting, feature, image cache config
3 participants