home.social

#kubebuilder — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #kubebuilder, aggregated by home.social.

  1. Operator works fine against a cluster, testing framework fails.

    Tracked it down and the test call to create my Custom Resource wipes the TypeMeta off it. But...why?

    #KubernetesDev #k8sDev #Kubebuilder

  2. Started wrangling this test framework and the moment I got past just getting it working it revealed a bug to me.

    Now that's instant gratification.

    #KubernetesDev #k8sDev #Kubebuilder

  3. Decided to use my morning quiet/productive hour to start test writing for my operator.

    Immediately hit a brick wall as the provided test harness falls over before even running any tests :neocat_woozy:

    Perhaps we will try again tomorrow.

    #KubernetesDev #k8sDev #KubeBuilder

  4. 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?

    #KubernetesDev #Kubernetes #k8sDev #k8s #Kubebuilder

  5. DEVops: Разрабатываем свой Kubernetes оператор с кастомными ресурсами на Go

    Используете готовые операторы в Kubernetes? Я тоже... Но с какого-то момента я начал задаваться вопросом: "а как люди их пишут?". И я нашел ответ! В этой статье я наглядно покажу, как создать свой кастомный оператор в Kubernetes на Go при помощи kubebuilder. Оператор позволит отслеживать изменения ресурсов в кластере, а затем отправлять уведомления в Telegram или другие мессенджеры. Какие ресурсы "трекать" будем описывать через кастомные ресурсы (Custom Resource). Погнали!

    habr.com/ru/articles/866766/

    #golang #devops #kubernetes #operators #custom_resource_definition #telegram_api #kubebuilder

  6. Getting kubebuilder Makefile to build and deploy using ko

    change IMG variable at the top to:

    IMG ?= ko://go.app.domain/cmd

    and add a target

    .PHONY: deploy-local
    deploy-local: manifests kustomize
    env KO_DOCKER_REPO=localhost:5000 KUBECONFIG=${HOME}/.kube/config.kind make deploy

    this deploy to a local registry and using a kubeconfig that is deployed for kind but customize thing as you wish there

  7. carrying #helm template invocations through #kubebuilder rbac annotations is a fresh new level of #kubernetes hell

  8. Oh, hey! I was thinking about #kubebuilder, but looks like someone else has already written a #python way to do this:

    github.com/nolar/kopf

  9. #introduction

    Hi, I'm Erik, a #golang programmer from Norway.

    I'm all for using #statecharts, so much so that I made statecharts.dev. I have witnessed the rise and fall of #rest, but continue to support restful architecture. I think I'm somehow naturally drawn towards #declarative systems.

    Heavily into #kubernetes, #openshift, #kubebuilder professionally (at my employer Stibo DX), and have a sprinkle of #awslambda / #dynamodb in some personal projects.

  10. @aligyie AWS has adopted Flux and has partnered with Weaveworks.

    I'm not familiar with (though I do know of it). is good, I'm currently working on a [ Controller](github.com/weaveworks/tf-controller) built with it, purpose being to . The integration testing is done using the [envtest](book.kubebuilder.io/reference/envtest.html) and for e2e.

  11. @nalum #fluxcd v2 + #Mozilla #sops + #Vault is nice! I prefer it over #argoCD (I heard that AWS moved away from argo to flux).

    For managing k8s resources I prefer simple and small controllers written in Go listening only to small subset of resources instead of what #kyverno is doing: intercepting every kubernetes api server traffic, which might be a bottleneck or a single point of failure, which I would avoid. But not sure, have not much experience with it.

    I use mostly #kubebuilder code generators which I prefer over Operator Framework. Only unit-testing with the K8s fake client is not possible to an extend I would expect...
    So we try to get more integration tests in our pipeline via ephemeral Kind/minikube/... clusters via #prow - which is not that straight forward...