Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 2.58 KB

README.md

File metadata and controls

63 lines (47 loc) · 2.58 KB

K8S DIY

Flux Operator with Ephemeral Environments

The example demonstrates how to create Preview Environments based on Pull Request event with Flux Operator and Ephemeral Environments.

Note: The GitHub repository* is created and auto initialised ready for Flux stack, Flux Operator and Discord notifications to use.

*Creating a fine-gained PAT and dedicated Flux user recommend, for more information see here

Quick Start

bash ./codespace.sh   ###  Before run it, check which terminal you are using and review comment inside of file (part: install K9S) to avoid errors
kubectl apply -f gatewayapi
kubectl apply -f preview
flux -n app-preview create secret git github-auth \
   --url=https://github.com/org/app \
   --username=flux \
   --password=${GITHUB_TOKEN}

Cleanup

cd bootstrap
tofu destroy

Requirements

Name Version
terraform >= 1.7.0
flux >= 1.2
github >= 6.1
kind >= 0.4

Providers

Name Version
flux >= 1.2
github >= 6.1
kind >= 0.4

Resources

Name Type
flux_bootstrap_git.this resource
github_repository.this resource
kind_cluster.this resource

Inputs

Name Description Type Default Required
github_org GitHub organization string "" no
github_repository GitHub repository string "" no
github_token GitHub token string "" no