Skip to content

Sample project showing how to use ArgoCD Polyrepo repository with Cookiecutter to reduce boilerplate code writing.

Notifications You must be signed in to change notification settings

saiello/sample-dry-argocd-cookiecutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample Dry Argocd Cookiecutter

Sample project showing how to use ArgoCD Polyrepo repository with Cookiecutter to reduce boilerplate code writing.

For sake of simplicity all the cose is here but following folders should be considered as separate repository:

  • templates: contains cookiecutter templates
  • admin-cluster: repository intended for cluster admin, responsible to setup Argo CRD and other cluster wide stuff
  • namespace-config: repository to collect namespace configuration
  • "app-config-repo": separate repository for each application using a microservice based architeture

Quickstart

# Create required ClusterRole and RoleBinding to let ArgoCD manage ResourceQuotas and LimitRanges
oc apply -f admin-cluster/bootstrap/
cookiecutter templates/namespace-config-repo-incl -o namespace-config/namespaces/ --no-input app_name=greet-app
cookiecutter templates/microservice-git-config-repo -o . --no-input app_name=greet-app
cookiecutter templates/argo-components-incl -o . --no-input app_name=greet-app
cp -r greet-app-argo-boot/projects/*  admin-cluster/components/projects
cp -r greet-app-argo-boot/applicationsets/* admin-cluster/components/applicationsets

NOTE: would be nice to use cookiecutter post generation hooks to avoid manual copy

Definitions

Monorepo

In a monorepo environment, all the manifests for the entire environment, including end-user applications, cluster configuration, and cluster bootstrapping, are stored in a single Git repository.

Polyrepo

A polyrepo environment contains multiple repositories, possibly to support many clusters or deployment environments. The basic idea is that a single cluster can have multiple repositories configured as a source of truth.

Config Map Generators Alternatives

configMapGenerator:
- envs:
  - application.env
  name: quarkus-app-envs
configMapGenerator:
- files:
  - application.properties
  name: quarkus-app-envs
configMapGenerator:
- literals:
  - QUARKUS_FOOBAR=sample
  name: quarkus-app-envs

About

Sample project showing how to use ArgoCD Polyrepo repository with Cookiecutter to reduce boilerplate code writing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published