Skip to content
This repository was archived by the owner on Aug 12, 2024. It is now read-only.

image source: use applyconfiguration with server-side apply#559

Merged
joelanford merged 1 commit into
operator-framework:mainfrom
joelanford:unpack-pod-apply
Sep 7, 2022
Merged

image source: use applyconfiguration with server-side apply#559
joelanford merged 1 commit into
operator-framework:mainfrom
joelanford:unpack-pod-apply

Conversation

@joelanford
Copy link
Copy Markdown
Member

@joelanford joelanford commented Sep 7, 2022

This is another take on #555 that makes use of applyconfigurations and server-side apply to "apply or re-create" unpack pods.

This should solve problems that we're seeing with our existing diff comparisons where we do not handle mutations performed by unrelated webhooks.

This should be more resilient than a "hash the pod struct" approach, which is susceptible to hash changes when the Pod struct changes. This approach should theoretically not result in an unpack pod respin unless something in our apply configuration actually changed.

I tested this on a cluster that performs pod mutations and verified that Bundles are able to be successfully unpacked, and the controller does not continuously re-create the unpack pod.

Closes #560

Signed-off-by: Joe Lanford joe.lanford@gmail.com

@joelanford joelanford requested a review from a team as a code owner September 7, 2022 17:43
@joelanford joelanford force-pushed the unpack-pod-apply branch 4 times, most recently from bdcd884 to 17b5ee4 Compare September 7, 2022 18:06
Copy link
Copy Markdown
Member

@timflannagan timflannagan left a comment

Choose a reason for hiding this comment

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

It would be nice to have some sort of tests to verify we're not regressing but I tested these changes out on a cluster that mutates the Pod, which passes the e2e suite, and I didn't see any immediate issues.

Comment thread internal/source/image.go Outdated

pod := &corev1.Pod{}
op, err := i.ensureUnpackPod(ctx, bundle, pod)
fmt.Println(op, err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: debug artifact?

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@joelanford joelanford merged commit 3bb731b into operator-framework:main Sep 7, 2022
@joelanford joelanford deleted the unpack-pod-apply branch September 7, 2022 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unpacker pod is constantly being re-created

2 participants