https://github.com/j0hn-b/gitops_workflow
GitOps POC to showcase how terraform helm provider, flux and argocd can be used to deploy a helm chart on top of K8s
https://github.com/j0hn-b/gitops_workflow
argocd flux2 gitops helm kubernetes terraform-helm-provider
Last synced: 7 months ago
JSON representation
GitOps POC to showcase how terraform helm provider, flux and argocd can be used to deploy a helm chart on top of K8s
- Host: GitHub
- URL: https://github.com/j0hn-b/gitops_workflow
- Owner: J0hn-B
- Created: 2021-09-22T10:48:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-08T12:21:20.000Z (over 4 years ago)
- Last Synced: 2025-02-28T21:51:02.415Z (about 1 year ago)
- Topics: argocd, flux2, gitops, helm, kubernetes, terraform-helm-provider
- Language: HCL
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Gitops workflow
GitOps is a way to do Kubernetes cluster management and application delivery using declarative manifests that can be treated as code.
This example code will deploy the [openfaas](https://github.com/openfaas/faas-netes/tree/master/chart/openfaas) helm chart using a set of different tools.
This is a good starting point when first discovering how helm charts/yaml manifests can be managed through a gitops workflow.
At a glance:
- terraform helm provider is used to deploy openfaas
- flux operator is used to deploy openfaas
- argocd operator is used to deploy openfaas
Follow the "How to" instructions for single command deployment using `make`
Access openfaas UI in:

> Note: Flux is installed using terraform flux provider as there is no helm chart available yet.
## Prerequisites
- Docker desktop
- make
- jq
### Tools used in the workflow
- terraform helm provider
- argocd
- flux
### How to
> Important: A [$KUBECONFIG](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable) env variable is expected:
`echo $KUBECONFIG`
Verify prerequisites have been installed and Docker Desktop is running.
`git clone https://github.com/J0hn-B/gitops_workflow`
`cd ~/gitops_workflow`
For [**terraform helm provider**](https://registry.terraform.io/providers/hashicorp/helm/latest/docs):
- `make terraform` to deploy
- `make clean` to clean up
For [**flux_V2**](https://fluxcd.io/docs/) operator:
- `make flux` to deploy
- `make clean` to clean up
For [**argocd**](https://argo-cd.readthedocs.io/en/stable/) operator:
- `make argocd` to deploy
- `make clean` to clean up
Follow the terminal for instructions on how to access openfaas ui
### Access ArgoCD UI
To access argocd web ui:
- `kubectl port-forward svc/argocd-server -n argocd 8090:443 &`
- In your browser:
- Username: `admin`
- Get argocd password:
`kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d`
