Codebase

Navigate the Codebase using the tree view. Use the filters to highlight where various files are grouped to aid understanding.

Getting Started Commands

Project Structure

Below is a short description of the key directories of the project to aid you when understanding where key files are located.

.git/ - This directory contains the Git repository data. It includes various subdirectories and files that Git uses to manage the version control system.
.git/branches/ - This directory contains all the local branches of the Git repository.
.git/hooks/ - This directory contains scripts that Git executes before or after events such as commit, push, or receive.
.git/info/ - This directory contains files that provide information about the current Git repository, such as the current branch and the commit hash.
.git/logs/ - This directory contains the commit history of the Git repository.
.git/logs/refs/ - This directory contains references to the commits in the Git repository.
.git/objects/ - This directory contains the actual object data for the Git repository, such as commits, trees, and blobs.
.github/ - This directory contains files related to GitHub, including workflows and configuration files for continuous integration and deployment.
clusters/ - This directory contains configuration and scripts for managing Kubernetes clusters.
clusters/production/ - This directory contains configuration and scripts for managing the production Kubernetes cluster.
clusters/production/flux-system/ - This directory contains configuration and scripts for the FluxCD system in the production cluster.
clusters/staging/ - This directory contains configuration and scripts for managing the staging Kubernetes cluster.
clusters/staging/flux-system/ - This directory contains configuration and scripts for the FluxCD system in the staging cluster.
infrastructure/ - This directory contains infrastructure-related configuration files and scripts.
infrastructure/kyverno-policies/ - This directory contains the actual policy files for Kyverno.
infrastructure/kyverno/ - This directory contains configuration files and scripts for Kyverno, an open-source Kubernetes policy engine.
scripts/ - This directory contains scripts used for various tasks, such as automation and deployment.
tenants/ - This directory contains configuration and scripts for managing tenants, which are separate namespaces or projects within the Kubernetes cluster.
tenants/base/ - This directory contains configuration and scripts for the base tenant.
tenants/base/dev-team/ - This directory contains configuration and scripts for the development team within the base tenant.
tenants/production/ - This directory contains configuration and scripts for the production tenant.
tenants/staging/ - This directory contains configuration and scripts for the staging tenant.

Entrypoints

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

daemonset-controller.go - Contains the implementation for the DaemonSet controller, which manages the deployment and scaling of DaemonSets in a Kubernetes cluster.

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

git-reconciler.go - Houses the logic for the Git Reconciler component, which fetches and applies changes from configured Git repositories to the Kubernetes cluster using FluxCD's GitOps approach.

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

helm-controller.go - Implements the Helm controller, which manages Helm releases in a Kubernetes cluster using GitOps workflows.

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

kustomize-controller.go - Contains the implementation for the Kustomize controller, which applies Kustomize configurations to the Kubernetes cluster using GitOps workflows.

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

manager.go - Defines the main entrypoint and the overall structure of the FluxCD multi-tenancy manager, which orchestrates the various controllers and components to manage Kubernetes clusters using GitOps workflows.

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

sync-k8s.go - Implements the logic for synchronizing the Kubernetes cluster state with the configured Git repositories using GitOps workflows.

Below are files we identified as entrypoints for to the codebase. This is where the application starts and a good place to start when learning.

webhook.go - Contains the implementation for the FluxCD webhook server, which listens for and processes Kubernetes events and updates the Git repositories accordingly using GitOps workflows.