ImageRepository Custom Resource Definition (CRD) to connect to a Docker Hub repository and fetch image tags automatically. Flux provides three subcommands under flux create image: policy, repository, and update. We’ll focus on the repository subcommand to set up continuous image discovery and metadata polling.
Overview of Flux Image Commands
1. Create an ImageRepository
First, verify the available options:ImageRepository manifest that points to your Docker Hub image and polls it at a regular interval:
Make sure your Git repository includes the
flux-system namespace and the Flux controllers are installed before applying this manifest.7.8.0 tag in your Docker Hub repository.
2. Update the Application and Push a New Tag
2.1 Modify the PHP Source
Openbb-app-source/src/index.php (and level2.php) and update the styling as well as the app version to 7.8.1:
Be sure to update all source files (e.g.,
level2.php) to keep version consistency.2.2 Build and Push the Docker Image
Ensure yourDockerfile includes the necessary PHP extensions and copies your application files:
7.8.1 tag is available.
3. Flux Scans the New Tag
Trigger an immediate reconciliation for theImageRepository:
flux get image command to confirm that two tags are now detected:
kubectl: