company. All rights reserved. ǀ Kubernetes controllers overview § Technical concepts and patterns Google Cloud’s Metacontroller § Why Lambdas? § Getting started § Demo: indexed jobs § Code dissection Agenda
company. All rights reserved. ǀ “Go is not good enough.” A curated list of articles complaining that Go isn't good enough github.com/ksimka/go-is-not-good
company. All rights reserved. ǀ Getting started Control loop http://ecommerce-controller.default/sync ecommerce-controller MetaController List() api-server metacontroller.k8s.io apps.hybris.com CompositeController Ecommerce shop-1 ecommerce-ctrl
company. All rights reserved. ǀ Code dissection Sync parent resource func syncCompositeController(clientset *dynamicClientset, cc *v1alpha1.CompositeController) { // Sync all objects of the parent type, in all namespaces. parentClient := clientset.Resource(cc.Spec.ParentResource.APIVersion, cc.Spec.ParentResource.Resource, "") obj := parentClient.List(metav1.ListOptions{}) parentList := obj.(*unstructured.UnstructuredList) for i := range parentList.Items { parent := &list.Items[i] syncParentResource(clientset, cc, parentClient.APIResource(), parent) } }