Repository structure
The following document outlines the structure of the code. We make use of operator-sdk which is built on top of kubebuilder and controller-gen to construct our controllers, so the structure is based on the output of these toolchains.
api: Go specification of types for schemas of the custom resources, generated by operator-sdk (using kubebuilder/controller-gen), with annotations for JSON/YAML fields.bin: Location where Go tool binaries are placed upon installation.cmd: Entry points of the operator and web application programs.chart: Helm chart for deployment of Chantico and its dependencies (Prometheus, SNMP exporter, filebrowser, VictoriaMetrics long-term retention, Grafana dashboard).config: Location of Kubernetes resources, Helm charts, etc.:config/crds/bases: Custom resource definitions.config/manifests: Resources for fully configured set of manifests used to generate a bundled directory.config/rbac: Cluster roles for access of resource controllers.config/samples: Example resource YAML for applying custom resources used by the Chantico controllers.
dev: Files for local development, including mock SNMP resource, MIB specification and deployment using local KinD cluster.docs: Documentation sources.docs/assets: Binary files for documentation publishing, such as logos.docs/hugo: Documentation publishing configuration and templates, including partial HTML layouts and themes.
hack: Boilerplate for new files to add license block to top of code.internal: Controller and module source code of the Chantico operator.