This controller doesn't do anything useful. It's just an example skeleton for writing Metacontroller hooks with Go.
WARNING
There's a known issue that makes it difficult to produce JSON according to the rules that Metacontroller requires if you import the official Go structs for Kubernetes APIs. In particular, some fields will always be emitted, even if you never set them, which goes against Metacontroller's apply semantics.
kubectl apply -f thing-controller.yamlkubectl apply -f my-thing.yamlLook at the thing:
kubectl get thing -o yamlLook at the thing the thing created:
kubectl get pod thing-1 -aLook at what the thing the thing created said:
kubectl logs thing-1kubectl delete -f thing-controller.yamlYou don't need to build to run the example above, but if you make changes:
go get -u github.com/golang/dep/cmd/dep
dep ensure
go build -o thing-controllerOr just make a new container image:
docker build . -t <yourname>/thing-controller