Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

urcomputeringpal/geryon

Repository files navigation

Geryon

/‘dʒɪəriən/
ge-re-on

noun

  1. A mythological Greek monster. Like the :octocat:, it's not entirely clear how many legs Geryon had.
  2. A GitHub App for connecting orgs and repos to Kubernetes clusters. Run it on your cluster to let others in your organization connect their new or existing repos to that cluster by installing the app.

Features

Namespace creation

Geryon will create a Kubernetes namespace named after each GitHub Repository it is installed on.

Roadmap

Installation

  • Create a new GitHub App with the following settings:
    • Name: geryon-your-cluster-name-goes-here
    • Homepage URL: https://example.com/
    • Webhook URL: https://example.com/ (we'll come back in a minute to update if you choose to enable webhooks)
    • Webhook Secret: Generate a unique secret with openssl rand -base64 32
    • Permissions:
      • Repository metadata: Read-only
      • Packages: Read-only
  • Generate and download a new key for your app. Copy it to private-key.pem
  • Download kustomization.example.yaml and rename it to kustomization.yaml
  • Create .env:
WEBHOOK_SECRET=asdf
APP_ID=30576
  • Create an Ingress resource at ingress.yaml as required by your Kubernetes provider
  • Create a geryon namespace on your Kubernetes cluster: kubectl create ns geryon
  • Apply geryon to your cluster: kubectl apply -k .
  • Update your GitHub app's Webhook URL to the URL of your Ingress resource followed by /webhooks

Development

  1. Fork this repo
  2. . Create a branch and replace urcomputeringpal` with your GCP project
  3. Install gcloud, kustomize, and skaffold
  4. Create a GitHub App and generate a private key
  5. Move the private key to kustomize/bases/dev/private-key.pem
  6. Create kustomize/bases/dev/.env:
WEBHOOK_SECRET=asdf
APP_ID=30576
  1. gcloud auth login
  2. Connect to your dev kubernetes cluster
  3. Run the thing:
skaffold-dev
  1. Obtain the service IP with kubectl get svc -o wide
  2. Update the Webhook URL to be http://$(IP):8080/webhooks
  3. Dev in a loop and watch the updates happen automatically