In this post, I'll share the results of examining the source code of 13 major open source projects to answer a question that often arises when building a Kubernetes operator: how should controllers for multi-word resource types be named?
When you have a CRD (Custom Resource Definition) type like CertificateRequest
o Machine Implementation
, should the controller be called foo-bar-controller
(with hyphen) or foobar-controller
(concatenated lowercase)? There is no official guide on this. So I dug into widely used real-world OSS implementations to find out what the de facto standard is really like.
What you will learn from this post
- How multi-word CRD types are actually named across the ecosystem
- The conventions used by 13 OSS projects for naming controllers, finalizers, field managers, and more
- Trend analysis between projects that reveals the most common patterns.
- The convention adopted by a Kubernetes SIG project: the closest thing to an "official" standard
Methodology and scope
For this survey, I cloned the repositories of 13 Kubernetes-related OSS projects and examined their naming conventions at the source code level. These findings are based on real code, not documentation.
The projects surveyed are listed below.
- certificate manager
-Argo CD
-Istio
- Crossplane
- native
- Strimzi Kafka Operator
- Prometheus Operator
-sailboat
- Tekton pipes
- Flow CD
- Cluster API
- KubeVirt
- Kyverno
I looked at six dimensions for each project.
- Go to file and directory names
- Controller name strings
- Finalizer names (the mechanism that controls cleanup before a resource is deleted)
- Names of field administrators (identifiers for field ownership in the server-side application)
- Logger context values
- Names of reconciling structures
Master Comparison Table
Let's start with a side-by-side comparison of all 13 projects.
Even at a glance, the concatenated lowercase pattern (foobar
) stands out. Let's now look at each project in detail.
Project-by-project breakdown
1. certificate manager
cert-manager automates the management of TLS certificates within Kubernetes clusters. Its multiword CRD types include CertificateRequest
, Cluster Issuer
and Certificate Signing Request
.
The key takeaway here is that the multiword CRD type (CertificateRequest
) is transformed into concatenated lowercase letters (certificate requests
). Hyphens only appear when separating functional suffixes such as -acme-emitter
or -approver
. There is one exception: a directory called certificate-shim/
use a script.
2. ArgoCD
Argo CD enables GitOps-based continuous delivery to Kubernetes. Application Suite
and application project
are your multi-word CRD types.
Implementation names use hyphens (argocd-application-controller
), but Go filenames and logger keys use concatenated lowercase (application suite
).
3. Istio
Istio provides a network of services. Its CRD types include VirtualService
, Target rule
, service entrance
and workload input
.
Istio uses its own custom driver framework. File names are concatenated in lowercase, but driver identifier strings use hyphenation. The log collection names preserve PascalCase as is, which is also notable.
4.Crossplane
Crossplane manages cloud infrastructure through Kubernetes. Has particularly long CRD type names like CompositeResourceDefinition
and ManagedResourceActivationPolicy
.
Controller names use the lowercase type directly without any separator (compositeresourcedefinition
, managed resource activation policy
). Finalizers similarly use concatenated lowercase letters as subdomains.
5. native
Knative is a platform for running serverless workloads on Kubernetes. Its multi-word CRD types include DomainMapping
, Serverless service
, PodAutoscaler
, KnativeService
and KnativeEventing
.
What makes Knative stand out is that its code generator enforces a consistent pattern. Agent names are in lowercase letters.