Flux

# Installing Flux
# create the flux Kubernetes namespace
kubectl create namespace flux

# add the Flux chart repository to Helm and install Flux.
helm repo add fluxcd https://charts.fluxcd.io

kubectl apply -f https://raw.githubusercontent.com/fluxcd/helm-operator/master/deploy/crds.yaml

helm upgrade -i flux fluxcd/flux \
--set [email protected]:php1301/WeatherForecastDataPipeline \
--set git.path="AWS/EKS/airflow-eks-config" \
--namespace flux

helm upgrade -i helm-operator fluxcd/helm-operator --wait \
--namespace flux \
--set git.ssh.secretName=flux-git-deploy \
--set git.pollInterval=1m \
--set chartsSyncInterval=1m \
--set helm.versions=v3

# Check the install. 3 pods should be running
kubectl get pods -n flux

# Install fluxctl in order to get the SSH key to allow GitHub write access. 
# This allows Flux to keep the configuration in GitHub in sync with the configuration
# deployed in the cluster.
sudo wget -O /usr/local/bin/fluxctl https://github.com/fluxcd/flux/releases/download/1.19.0/fluxctl_linux_amd64
sudo chmod 755 /usr/local/bin/fluxctl

fluxctl version
fluxctl identity --k8s-fwd-ns flux
# Go to github repo's -> deploy key 

#REWATCH
mkdir airflow-eks-config/{workloads,releases,namespaces}
#make .keep folder in each repo to allow push empty folder
find EKS/ -type d -exec touch {}/.keep \;

# Flux sync
fluxctl sync --k8s-fwd-ns flux

Untitled

Untitled

AWS CodePipeline

Untitled