Code Monkey home page Code Monkey logo

gke-terraform's People

Watchers

 avatar

gke-terraform's Issues

Developer experience improvements

  • VSCode recommended extensions
  • VSCode auto-format/validate settings
  • README quickstart
  • CI linting/validation/plan
  • Terraform apply on merge

Explore testing strategies

Currently code is linted and validated to check for basic errors, and we output the terraform plan on pull requests.

It would be nice to verify policies - e.g. check that only secret-manager google service account can access secrets.

Creating ephemeral environments for pull requests would give further assurances that the generated terraform plan will apply and behave correctly (terratest looks useful here). One approach is to create GCP projects on-the-fly, although this requires a Google Workspace account if we want to do this programmatically from terraform (which costs money!) We could use raw gcloud commands to do this instead. Alternatively we could create/destroy clusters inside the current project, but there is a potentially troublesome lack of isolation here.

Testing ingress/static IP addressing could also prove tricky, although it looks like Google Domains can be imported into GCP. In tandem with Cloud DNS, we could create DNS records for pull request environments, e.g. *.pr5.pauljs.io.

Explore options to reduce load balancing costs

Load balancer daily costs are somewhat prohibitive for a personal project!

KubeIP is one option - this monitors nodes in a GKE cluster and will assign them static IPs. We could create a single node in an ingress node pool, and use KubeIP to assign our static IP to it. The ingress-nginx controller would also need reconfiguring, to ensure it lands on the correct node, and that is uses the node's host network.

User separate service accounts for cluster workload submission and registry writing

Currently the argo-workflow service account can submit workflows to the cluster, as well as publish Docker images (so they can be used in workflows). Other repositories will soon need to publish Docker images - rather than re-use the argo-workflow service account we should create a separate account with registry permissions only. This guards against being over-permissive. We should also remove registry permissions from the argo-workflow account.

  • #24
  • Remove roles/artifactregistry.writer from argo-workflow

Enable SSO for ArgoCD

  • #11
    • Add client secret to Secret Manager
    • Add ExternalSecret object
  • Add Dex config to argocd:argocd-cm ConfigMap
  • Use secure backend for argocd-server
    • Remove --insecure flag from argocd:argocd-server Deployment container args:
    • Redirect to port 443 in argocd:argocd-server-ingress
  • Create RBAC policy
    • Give single user admin
    • No default policy

Make SSO secret accessible to multiple namespaces

Convert ExternalSecret from argocd namespace to a ClusterExternalSecret, and make available to argo and argocd namespaces. This will eventually allow Argo Workflows (which is installed to the argo namespace) to use SSO.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.