Programming for platform engineers: Python, Go and RustProfessional tooling: data formats, errors and logging, controllers and releases
4 lessons · about 74 minutes of reading · Helmsman Pro
This page is the public course outline. Lessons, labs, tools and exams open after you sign in to your free account.
Sign in and start
In short
The habits that make tools professional in any language: robust data formats and APIs, errors, logs and configuration in Python, Go and Rust, writing a Kubernetes controller with Kubebuilder, and releasing signed, cross-platform builds.
Before you start: Courses c42 to c44.
What you'll learn
- JSON for machines; YAML for humans, with its quoting traps
- Validate with JSON Schema or OpenAPI; parse into typed structures
- Protobuf: typed messages, never reuse field numbers; gRPC with deadlines
- REST: timeouts, retries for idempotent calls with backoff, pagination
- Python: specific exceptions, raise from; Go: wrap with %w, errors.Is; Rust: Result, ?, anyhow
- Structured JSON logs with context; log once; no secrets
- Flags over environment over file; validate at start-up
- Exit 0, 1 or 2; errors to stderr
- Reconcile: desired from the resource, actual from the cluster, converge, report
- Idempotent and level-based; owner references for clean-up
- Status with observedGeneration and conditions
- envtest for tests; least-privilege RBAC from markers
Lessons
1. Data formats and APIs: JSON, YAML, protobuf and gRPC
Read and write the formats infrastructure runs on: JSON and YAML (and their traps), schemas that catch mistakes early, protobuf and gRPC for typed service APIs, and calling REST APIs robustly from Python and Go.
Sign in to open the lesson
2. Errors, logging and configuration across Python, Go and Rust
Write tools that fail clearly and are easy to operate: idiomatic error handling in each language, structured logs with context, configuration from flags, environment and files, and exit codes that automation can trust.
Sign in to open the lesson
3. Writing a Kubernetes controller in Go with controller-runtime
Build the core of an operator yourself: a custom resource, a reconcile loop that makes the cluster match it, owner references for clean-up, status and conditions, and tests with envtest, using Kubebuilder and controller-runtime.
Sign in to open the lesson
4. Releasing tools: versioning, cross-compiling, signing and distribution
Ship the tools you build like a professional project: semantic versions and changelogs, cross-compiled binaries and multi-architecture images, signatures and provenance, and distribution through package managers, container registries and Krew.
Sign in to open the lesson
Common questions
JSON or protobuf for my API?
JSON for public APIs and browsers; protobuf and gRPC for internal service-to-service calls where speed and types matter.
Should I panic in Go?
Only for programmer errors that can't happen in correct code. Return errors for everything an operator could cause.
Kubebuilder or Operator SDK?
Both build on controller-runtime; Operator SDK adds packaging for OperatorHub. The Reconcile code is the same.
Do internal tools need all this?
Versions, changelogs and CI builds, yes. Signing and provenance matter as soon as other teams or customers run your tool.