Skip to content

Repository files navigation

Bootstrap-Cloud

A disorganised repo that will create minimal GKE clusters using Crossplane then deploy applications on them using ArgoCD (After some manual configuration).

Diagram

Requirements:

  • A GCP account.
  • A GCP service account for Crossplane to use.
  • ArgoCD CLI

Steps:

  1. Change the projectID value to your project in the core values file.
  2. In 0-terraform-bootstrap, run terraform init then `terraform apply and wait for the bootstrap cluster to roll out.
  3. Uncomment the lines in 0-terraform-bootstrap/helm.tf and run terraform apply again.
  4. Enable gkeClusters in the core values file .
  5. Add some clusters in the cluster-definitions folder, these will be created by Crossplane.

At this point, Crossplane will pass the cluster credentials back to the ArgoCD namespace as secrets, however they are missing some information and the clusters themselves are missing permissions. This could be automated, however here are the instructions to manually import them for now:

  1. Port-forward the ArgoCD server to your local machine, unless you have access via an ingress
  2. Login using your credentials, or the admin credentials argocd login {The address}
  3. Fetch the contexts of the deployed clusters from the gcloud console using gcloud container clusters get-credentials {Cluster name} --region {region}
  4. Add each context using argocd add cluster {context name} --name {A short name}
  5. Enable clusterOperators and clusterApplications in the core values file and ArgoCD will deploy applications on your new GCP clusters.

TODO:

  • Automate clusters being added to ArgoCD. This will require:
    • Credentials for ArgoCD to auth to GCP
    • External Secrets Operator to fetch the existing secret and restructure it to what Argo needs
  • Split the terraform into two projects so you don't have to manage the Kubernetes provider separately
  • Figure out workload identity + permissions from terraform
  • Crossplane providers depend on Controller configs, which cannot be created until the provider downloads the CRDs. Added a duff provider in the meantime but this is a circular dependency

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages