- 
                Notifications
    
You must be signed in to change notification settings  - Fork 263
 
config: allow arbitrary custom clevis pin #2145
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
base: main
Are you sure you want to change the base?
Conversation
In order to support new clevis pin, either they need to be added each time in the hardcoded list of pins or ignition can allow any name for the pin. This is required in order to enable the clevis trustee pin used for confidential clusters. Signed-off-by: Alice Frosi <afrosi@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request modifies the configuration validation to allow for arbitrary custom Clevis pin names. The change is motivated by the need to support new pins, such as the 'trustee' pin, without having to update a hardcoded list. The implementation correctly removes the switch statement that enforced a whitelist of pin names in config/v3_6_experimental/types/clevis.go. The corresponding unit test in config/v3_6_experimental/types/clevis_test.go is also updated to reflect that a previously unknown pin name is now considered valid. The changes are straightforward, correct, and align with the pull request's objective. I have no further comments.
| 
           This PR has been created upon the discussion in #2120 (comment)  | 
    
| 
           How do I fix the release notes?  | 
    
| }, | ||
| at: path.New("", "pin"), | ||
| out: errors.ErrUnknownClevisPin, | ||
| out: nil, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a negative test as well please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are already existing tests covering when the name is empty, so I'm not sure what else we should check. This PR is relaxing the name checking to arbitrarily non-empty string
          
 @alicefr you need to write a simple release notes on ignition/docs/release-notes.md about your change. 😸  | 
    
| 
           Hey, @alicefr! Thanks for working on this 🫂  | 
    
Signed-off-by: Alice Frosi <afrosi@redhat.com>
In order to support new clevis pin, either they need to be added each time in the hardcoded list of pins or ignition can allow any name for the pin. This is required in order to enable the clevis trustee pin used for confidential clusters.