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.asssets: Binary files for web/documentation publishing, such as logos.bin: Location where kubebuilder binaries are placed upon installation.chantico: Postgres models.cmd: Entry points of the operator and web application programs.config: Location of Kubernetes resources, Helm charts, etc.:config/crd/bases: Custom resource definitions.config/default: Kustomize configurations and patches for deployment.config/dev: Old development setups.config/initial-deployments: Helmchart for deployment of Chantico components, such as filebrowser, Prometheus and SNMP exporter.config/manager: Kustomize configurations and patches for controller manager deployment in production clusters.config/manifests: Resources for fully configured set of manifests used to generate a bundled directory.config/network-policy: Network policy resources for production deployment to allow traffic for metrics monitoring.config/prometheus: Service monitor of Prometheus metrics.config/rbac: Cluster roles for access of resource controllers.config/samples: Example resource YAML for applying custom resources used by the Chantico controllers.config/scorecard: Test framework scaffolding configuration.
dev: Files for local development, including mock SNMP source, MIB specification and deployment as well as development setup scripts.docs: Documentation sources.hack: Boilerplate for new files to add license block to top of code.hugo: Documentation publishing configuration and templates, including partial HTML layouts and themes.internal: Controller and module source code of the Chantico operator.