This directory contains a base gitops directory layout that can be used by the ArgoCD's app of all apps
deployment.
- Deploy ArgoCD
- Create a Gitops repository in your Gitlab instance.
- Create a Access token in Gitlab for this repository
- Deploy the Gitlab agent for Kubernetes
- Create a SSH key
ssh-keygen -t ed25519 -C "Gitlab CI cfgmgmtcamp2024" -f id_ed25519_gitlab
- Hash the private key with base64
- Create a environment variable called
SSH_PRIVATE_KEY_BASE64
- Create a secret for the ArgoCD credentials. Check the file
argocd-configuration/credentials.yml
for a example. This secret should contain the URL for your gitops repo and the credentials you created earlier. - Apply the secret in de
argocd
namespace withkubectl
- Create a repo configuration for the
app of all apps
. Check the fileargocd-configuration/repoconfig.yml
for a example. This repo configuration should contain the url of your gitops repo. - Deploy the repo configuration with
kubectl
- All the apps in the gitops folder should be deployed immediately after applying the repo configuration
The gitlab CI file contains a proof of concept to use a application repository and a Gitops repository together to automatically deploy applications. See the gitlab-ci.yml
for more information.
The Containerfile
includes a container image for doing "gitops" stuff from within the pipeline.