Modules that will be used:
https://github.com/den-vasyliev/tf-google-gke-cluster
github.com/den-vasyliev/tf-fluxcd-flux-bootstrap
github.com/den-vasyliev/tf-github-repository
github.com/den-vasyliev/tf-hashicorp-tls-keys
install terraform and flux
Copy repo and run terraform
git clone https://github.com/spolish/week7_tf_flux
terraform init
terraform apply
2.1 K8S cluster
2.2 Repo in Github
2.3 Flux in K8s cluster
apiVersion: v1
kind: Namespace
metadata:
name: demo
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: kbot
namespace: demo
spec:
url: http://github.com/spolish/kbot
interval: 1m0s
ref:
branch: docker-flux
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: kbot
namespace: demo
spec:
chart:
spec:
chart: ./helm
reconcileStrategy: Revision
sourceRef:
kind: GitRepository
name: kbot
interval: 1m0s