Goless

Overview It’s been a goal of mine for a while to write a Kubernetes operator. I was playing with Kubeless and I didn’t like how they implemented their support for Golang so I decided to write my own. Operators Operators are a deployment of a Kubernetes controller and Custom Resource Definitions (CRDs). The controller watches in a loop for new custom resources created and then takes some action. The controller lets you extend the ability of Kubernetes without directly changing any Kubernetes code....

October 2, 2021 · 2 min · 389 words · John Hooks

Directory Server using Go

I’ve been spending time learning Go and here’s a small utility I wrote that’s similar to Python’s SimpleHTTPServer. This utility just creates a small HTTP server serving the directory you define: package main import ( "log" "net/http" "os" ) func main() { if len(os.Args) < 2 { log.Fatal("You must enter a path") } path := os.Args[1] http.Handle("/", http.FileServer(http.Dir(path))) http.ListenAndServe(":8000", nil) } Then just do: go build main.go ./serve /etc

February 22, 2018 · 1 min · 69 words · John Hooks