shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

266
active users

#kubernetesdev

2 posts2 participants0 posts today

After a couple hours of very less-coding and more-pacing-and-thinking I've wrangled the blockers and have started on actual implementation of the cluster autoscaler.

I can see a couple spots that are going to get much more complex - caching informers, backoffs, tracking desired state, and background reconciliation loops.

Exciting at least! Working for hours to change a handful of lines is ....rewarding but also uncomfortable.

Interesting but what-you'd-expect container caching enhancement to Kubernetes architecture.

Does make me wonder if you could do the caching at the content-addressed-storage layer with distributed s3 and data locality via redirects and maybe presigned URLs...

youtube.com/watch?v=trFILyK6mP

Holy shit that was a slog but we have it.

Dynamically constructed and applied arbitrary Kubernetes resources, with patched-in data from configMaps.

Still needs a bunch of work but I think the main battle with Kubebuilder/GoLang's type system is over for the most part.

I'm making an operator that manages arbitrary resources at runtime using `runtime.RawExtension`

I'd like the resource to be owned using `controllerutil.SetControllerReference` but it takes `metav1.Object` interface, which is understandably broad.

Is there any way around implementing metav1.Object wrapping basically `[]byte` of JSON?

Should I be using `runtime.Scheme` here? Any examples anyone knows of?

What's the eminent Go library for JSON patching and deep merging?

I need to update values on arbitrary data structures for Kubernetes at runtime. I was going to use `k8s.io/client-go/util/jsonpath` but it looks like it's only for /retrieving/ values, not mutating them.

If I can't strictly use the same syntax as Kubernetes then maybe RFC6902 is a reasonable second approach?

rfc-editor.org/rfc/rfc6902

www.rfc-editor.orgRFC 6902: JavaScript Object Notation (JSON) Patch

Been doing some Kubernetes API design today. It's thoughtful but not in quite the way other software design has felt.

I suppose the constraints make it easier to avoid some common mistakes. Spending quite a bit of effort though just wrangling GoLang types and kubebuilder annotations to try and get it how it ought to be.

If you're writing a controller, and you want to essentially shell out to arbitrary code and get the return/output.

Does it make sense to run a Kubernetes `Job` resource?
Can you even retrieve the output of that?

Does it make sense to embed a WASM interpreter and pull OCI WASM artifacts to run? That's a lot of extra responsibility...

I suppose I could shell out and rely on whatever's in the container/pod context of the controller.

Perhaps I should narrow the scope of things it can do instead of trying to hack it like this in the first place?