Used to generate a git repository for an ArgoCD installation. It's inspired by Manage Argo CD Using Argo CD and ArgoCD Autopilot
- Create a new Github repository for ArgoCD bootstrap
- Create a new Github repository for ArgoCD applications
- Edit generate.sh with correct values and then run it
- Copy the
build
folder's content to the root of yourArgoCD bootstrap
repo, commit and push - Bootstrap your Kubernetes cluster with ArgoCD, see [Bootstrap Kubernetes cluster](#Bootstrap Kubernetes cluster)
Name | Description |
---|---|
argocd.version | Version of ArgoCD to use |
argocd.applicationset.version | Version of ApplicationSetController to use |
argocd.host | The DNS name to the installation of ArgoCD, for example argocd.sparetimecoders.com |
dex.github.clientId | The OAuth application clientID |
dex.github.organisation | The Github Organisation for the OAuth app |
dex.github.team | The Github team to allow access, read more here |
argocd.bootstrap.repoURL | URL to this repository |
argocd.bootstrap.revision | Branch/commit/tag to use |
argocd.apps.repoURL | URL to the ArgoCD Applications repository |
argocd.apps.revision | Branch/commit/tag to use |
externaldns.clusterName | The name of the kubernetes cluster, used to manage DNS records with External-DNS |
externaldns.version | External DNS version to use, see above |
github.action.controller.version | Github Action runners version to use |
Some "external" setup is needed since we don't want to store secrets in the Github repository.
apiVersion: v1
data:
dex.github.clientSecret: --OAuth application secret--
kind: Secret
metadata:
labels:
app.kubernetes.io/instance: argocd
app.kubernetes.io/name: argocd-secret
app.kubernetes.io/part-of: argocd
name: argocd-secret
namespace: argocd
type: Opaque
---
apiVersion: v1
data:
sshPrivateKey: --the private key to use for SSH access to Github repositories--
kind: Secret
metadata:
name: githubsecret
namespace: argocd
type: Opaque
Some configuration is needed for Github runners
Configuration for buildtools:
apiVersion: v1
kind: ConfigMap
metadata:
name: buildtools
namespace: github-runners
data:
.buildtools.yaml: |-
registry:
ecr:
url: 292662267961.dkr.ecr.eu-west-1.amazonaws.com
targets:
local:
context: docker-desktop
namespace: default
test:
context: stc-test.k8s.local
gitops:
local:
url: [email protected]:sparetimecoders/argocd-apps.git
path: apps/local/argocd-test
Optioanl Git configuration for buildtools:
apiVersion: v1
data:
.gitconfig: |-
[user]
name = Gitops commiter
email = [email protected]
kind: ConfigMap
metadata:
name: gitconfig
namespace: github-runners
apiVersion: v1
kind: Secret
metadata:
name: controller-manager
namespace: actions-runner-system
type: Opaque
data:
github_app_id: --the Githab App Id--
github_app_installation_id: --the installation id for the Githab App on the organization--
github_app_private_key: --the private key for the Githab App--
apiVersion: v1
kind: Secret
metadata:
name: ssh-secret
namespace: github-runners
type: Opaque
data:
id_rsa: --the private key used to clone GIT repositories--
known_hosts: --content of a known_hosts file--
- Cleanup docs
- Copy some of the contents of this file to
build
? - Application of Applications for cluster-resources
- Example of setting it up