What do you think of Metacontroller? Does it motivate you to create your own Kubernetes controllers?
@rafhue2 жыл бұрын
Thanks for your videos ! This one make sense for me that let us a little more freedom to customize k8s behavior.
@dirien2 жыл бұрын
Now you spark my interest! Rarely see you so happy about a project! Thanks Viktor for the video!
@DevOpsToolkit2 жыл бұрын
See you in a couple of weeks in Edinburgh :)
@popovicmiro2 жыл бұрын
Tnx from Dataverse!
@DevOpsToolkit2 жыл бұрын
Thanks a ton!
@frangalarza2 жыл бұрын
I've been trying to replicate this behaviour with a combination of Crossplane, Helm, Kustomize and custom code and gave up due to the sheer pain. As you mentioned in your IDP video, our job is to make the platform easy to consume. But if it takes us 3 months to write an operator then we are slowing down the business and we have failed. Speed of development is important. Metacontroller looks promising in that regard, specially because you can use a language you already know. This is important too due to the current market conditions where specialized engineers are hard to find and hire. Not many people are proficient in Golang, but you can tap into the fact that the entire internet runs on Javascript and find great developers that can write competent operators in TypeScript, giving you the best of both worlds ♥
@itamarmarom75502 жыл бұрын
As someone who knows Kubebuilder pretty good, and after seeing this video I'll say this: Metacontroller seems to be very simple from the perspective of code and integrating with Kubernetes. But, it is not mature enough for even a bit more complicated use cases. Kubebuilder has some great features that are very important: - You are describing the API (CRD) as a go struct. That's good because: kubebuilder generates for you the CRD YAMLs, and you can use your CRD in your code easily, and also let other controllers or code integrate with your CRD by importing your package. - Kubebuilder generates almost everything for you starting from the CRD API and YAMLs, the controller integration with the manager, and Kubernetes (you only need to write your code in one `reconcile` function) - Generates for you the entire code + YAMLs for deploying admission controllers to mutate/validate requests - Easy debugging, you can run your controller locally against a Kubernetes cluster - Easy to communicate with every Kubernetes resource (just get the right package) - Amazing Makefile to generate code and manifests, easy to build and deploy locally and remotely and much more. I don't see Metacontroller even close to Kubebuilder currently...
@DevOpsToolkit2 жыл бұрын
Those are indeed very valid points.
@lingxiankong47912 жыл бұрын
Thanks for sharing this! Looks like Metacontroller is aiming at dealing with simple use cases, however, for those simple cases, using Argo Events & Workflows should be a better option IMHO.
@DevOpsToolkit2 жыл бұрын
Whether the use case is simple or not depends on what you have as the code of the controller. Argo events and workflows are very different. Neither of them allows creation of controllers associated with custom CRDs.
@felipeozoski Жыл бұрын
Awesome channel ❤
@alexandrgumeniuc4312 жыл бұрын
Thank you for the review, Victor. According to the guide, CompositeController object can watch only one parentResource and that is a big disadvantage comparing to kubebuilder.
@DevOpsToolkit2 жыл бұрын
Oh yeah. That's one (not the only one) disadvantage. Even though I never have more than one parent resource, I can imagine that others do. Ultimately, I don't think that Metacontroller will ever be on-par with KubeBuilder. Its focus is on simplicity and being language agnostic. That is sometimes an advantage, while at other times insuficient. It all depends on what one needs.
@KrishP1711 ай бұрын
Hey, your videos are amazing. I've been trying to build my own custom K8S controller which imitates the dynamic port changing behavior like Rancher (a Kubernetes management platform). What are your suggestions on it? Can you please guide me?
@DevOpsToolkit11 ай бұрын
I'm not sure I understood. What should that controller do?
@rubbercable2 жыл бұрын
How is metacontroller different from Operators? It looks simpler - but does it do polling .. or is it only external event driven? I worked so hard to learn to golang and kubebuilder. 😑
@DevOpsToolkit2 жыл бұрын
It's a simple way to create a controller that triggers events to other processes. It's not a replacement for KubeBuilder but, rather, an easier (more convenient) way to create controllers or, to be more precise, to avoid creating boiler-plate code.
@Jarek.2 жыл бұрын
I tend to say that what was presented here is more an Operator. Looking at this definition: An operator is a specialized form of controller. Operators implement the controller pattern, meaning they move the cluster towards a defined state, but they possess some extra characteristics too. Operators are tailored to specific applications. They add Kubernetes API extensions via *custom resource definitions* , creating new object types that are used by the application they manage
@DevOpsToolkit2 жыл бұрын
Metacontroller is not focused (only) on managing the state. In the nutshell, it help with triggering events into a process that does whatever you'd like it to do. In a way, it removed the need to create the booler-plate code and leaves you to focus exclusively on the code that will be executed as a result of some event.
@rubbercable2 жыл бұрын
Yup. It looks more like an admission/mutation controller. The Golang heels like syntactic sugar. I like it, but definitely not operator functionality.(No constant reconcile phase)
@DevOpsToolkit2 жыл бұрын
@@rubbercable That's correct. There is no constant reconcile phase unless you implement it in your code, which might not be the best idea. Using KubeBuilder makes more sense for those use-cases.
@manitaggarwal2 жыл бұрын
When composite controller is hitting the webhook url, what fields is it sending? How to know that?
@DevOpsToolkit2 жыл бұрын
Which composite controller is hitting the webhook is available in the logs of the controller itself. There might be other places, but, if there are, I don't know about them. The fields that it is sending are the fields of the payload augmented with the info from the API itself (e.g., operation). That being said, Metacontroller has a way to go in that area. Debugging (in general) is far from being good.
@manitaggarwal2 жыл бұрын
@@DevOpsToolkit How did you figure out the fields from request in app.py like image, port, etc?
@DevOpsToolkit2 жыл бұрын
Sorry for not responding earlier. KZbin "decided" to block quite a few messages and I did not see this one until now. Typically, you know what the fields are from the spec. That spec might be coming from Kubernetes itself if it's baked in (e.g., kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/), third-party CRDs, or yourself if you created the CRD. Also, besides the documentation, you can always output the request and see what it contains.
@LazarTas2 жыл бұрын
Nice. Which cluster are you using on Mac? Kind, minikube?
@DevOpsToolkit2 жыл бұрын
I use Rancher Desktop exclusively. You'll find a couple of videos about it on this channel.
@ihorpysmennyi25592 жыл бұрын
Are there any advantages Metacontroller compared with Kopf?
@DevOpsToolkit2 жыл бұрын
I haven't used kopf (yet) so I cannot compare those two :(