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

Updates & Refactors for k8s 1.32 #644

Merged
merged 4 commits into from
Feb 6, 2025
Merged

Conversation

mallardduck
Copy link
Member

@mallardduck mallardduck commented Jan 14, 2025

Blocked by: #645
I will submit a version of this based of main after above is merged. This will ensure higher test coverage before the breaking upstream change is accounted for.

}

// Need to verify encrypted is actually different...
if !bytes.Equal(resourceBytes, maybeEncrypted) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Because we can do this check here...

@@ -436,17 +436,21 @@ func writeToBackup(ctx context.Context, resource map[string]interface{}, backupP
if err != nil {
return fmt.Errorf("error converting resource to JSON: %v", err)
}
if transformer != nil && !util.IsDefaultEncryptionTransformer(transformer) {
Copy link
Member Author

Choose a reason for hiding this comment

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

...it technically does similar to what this intended to do, just after transformer.TransformToStorage is called instead of before. Obviously before was better, but no longer an option (for) now.


resourceBytes, err = json.Marshal(encrypted)
// Since k8s 1.32 we cannot verify a transformer must be run, so it's always run now.
maybeEncrypted, err := transformer.TransformToStorage(ctx, resourceBytes, value.DefaultContext(additionalAuthenticatedData))
Copy link
Member Author

Choose a reason for hiding this comment

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

I think that because of those factors, this is a new change in dataflow/processing that non-encrypted restores used to skip, but will now run all the time. So ultimately this likely doesn't change too much at the end of the day, but is technically a new area that an error could come from.

@mallardduck mallardduck requested a review from jbiers February 5, 2025 22:23
@mallardduck mallardduck marked this pull request as ready for review February 5, 2025 22:56
@mallardduck mallardduck requested a review from a team as a code owner February 5, 2025 22:56
Copy link
Contributor

@alexandreLamarre alexandreLamarre left a comment

Choose a reason for hiding this comment

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

We should bump

The matrix k3s versions here to 1.30.X & 1.32.X

Signed-off-by: Alexandre Lamarre <[email protected]>
@alexandreLamarre alexandreLamarre merged commit 337159c into rancher:main Feb 6, 2025
7 checks passed
@alexandreLamarre
Copy link
Contributor

Part of rancher/rancher#48832

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.

2 participants