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.

action/ - This directory contains the action files for Flux. It includes various action files like action.yml, which defines the Flux action, and files for creating, deleting, and managing different resources.
cmd/ - This directory contains the command-line interface (CLI) for Flux. It includes various subdirectories and files for different commands, such as flux/, which contains the main Flux command, and various test data files.
CODE_OF_CONDUCT.md - This file contains the code of conduct for the Flux project.
CONTRIBUTING.md - This file contains instructions for contributing to the Flux project.
DCO - This file contains the Developer Certificate of Origin for the Flux project.
Dockerfile - This file contains instructions for building a Docker image for Flux.
docs/ - This directory contains documentation for Flux. It includes the release/ subdirectory, which contains release notes and templates, and the install/ subdirectory, which contains instructions for installing Flux.
go.mod and go.sum - These files are used by Go to manage dependencies for the Flux project.
internal/ - This directory contains internal packages used by Flux. It includes various subdirectories for different packages, such as build/ for building the Flux binary, flags/ for command-line flags, and tree/ for tree manipulation.
LICENSE - This file contains the license for the Flux project.
Makefile - This file contains instructions for building and installing Flux using Make.
manifests/ - This directory contains Kubernetes manifests used by Flux. It includes various subdirectories for different types of manifests, such as bases/ for base manifests, crds/ for Custom Resource Definitions, and policies/ for policy manifests.
pkg/ - This directory contains the Go packages for Flux. It includes various subdirectories for different packages, such as bootstrap/ for bootstrapping, log/ for logging, manifestgen/ for manifest generation, and printers/ for printing manifests.
README.md - This file contains general information about the Flux project, including installation instructions and an overview of its features.
rfcs/ - This directory contains RFCs (Request for Comments) for proposed changes to Flux. It includes various subdirectories and files for different RFCs, such as 0001-authorization/ for authorization RFCs and README.md for general information about the RFC process.
tests/ - This directory contains tests for Flux. It includes various subdirectories for different types of tests, such as bootstrap/ for bootstrap tests, image-automation/ for image automation tests, and integration/ for integration tests.

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.

cmd/flux/main.go - This file is the main entrypoint for the Flux CLI (Command Line Interface) tool. It initializes the application, parses command-line flags, and starts the main workflow. It also includes functions for configuring the default namespace, reading passwords from standard input, and displaying preview notes.

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.

tests/bootstrap/main.go - This file is the main entrypoint for the bootstrap tests in the Flux project. It runs the tests and reports the results.

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.

tests/image-automation/main.go - This file is the main entrypoint for the image automation tests in the Flux project. It runs the tests and reports the results.