Skip to content

Use kubernetes device-ownership setting#329

Merged
vigh-m merged 1 commit intobottlerocket-os:developfrom
vigh-m:neuron-poc
Jan 2, 2025
Merged

Use kubernetes device-ownership setting#329
vigh-m merged 1 commit intobottlerocket-os:developfrom
vigh-m:neuron-poc

Conversation

@vigh-m
Copy link
Copy Markdown
Contributor

@vigh-m vigh-m commented Dec 21, 2024

Description of changes:

Testing done:

  • The setting shows up as expected in an AMI built using this settings-sdk

    # apiclient get settings.kubernetes.device-ownership-from-security-context
    {
      "settings": {
        "kubernetes": {
          "device-ownership-from-security-context": false
        }
      }
    }
    
  • Changing the setting works as defined:

    [root@admin]# apiclient set settings.kubernetes.device-ownership-from-security-context="true"
    [root@admin]# apiclient get settings.kubernetes.device-ownership-from-security-context
    {
      "settings": {
        "kubernetes": {
          "device-ownership-from-security-context": true
        }
      }
    }
    [root@admin]# sheltie cat /etc/containerd/config.toml | grep device
    device_ownership_from_security_context = true
    
  • The setting has the desired effect on device ownership

    • When true:
      # kubectl exec -it single-node-test -- bash
      ubuntu@single-node-test:/$ ls -lah /dev/ | grep neuron
      crw-------. 1 ubuntu 2000 244, 0 Dec 20 00:25 neuron0
      
    • When false:
      # kubectl exec -it single-node-test -- bash
      ubuntu@single-node-test:/$ ls -lah /dev/ | grep neuron
      crw-------. 1 root root 244, 0 Dec 19 20:03 neuron0
      

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@vigh-m vigh-m marked this pull request as draft December 24, 2024 20:37
@vigh-m vigh-m marked this pull request as ready for review December 30, 2024 16:19
@vigh-m vigh-m merged commit 2ec1472 into bottlerocket-os:develop Jan 2, 2025
@vigh-m vigh-m deleted the neuron-poc branch January 2, 2025 17:02
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.

3 participants