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 kubebuilder, using annotations for JSON fields.
  • bin: Location where kubebuilder binaries are placed upon installation.
  • cmd: Entry points of the operator and web application programs.
  • config: Location of Kubernetes resources, Helm charts, etc.:
    • config/deployment: Helm chart for deployment of Chantico and its dependencies (Prometheus, SNMP exporter, filebrowser).
    • config/crds/bases: Custom resource definitions. components, such as filebrowser, Prometheus and SNMP exporter.
    • 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 source, MIB specification and deployment as well as development setup scripts.
  • 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.