casper-3

module
v0.0.0-...-0f80ab9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2023 License: MIT

README

casper-3

Description

Casper-3 monitors the cluster for specific node labels. When nodes featuring the label are found, DNS A records entries alongside TXT entries are created. When a registered node goes away, casper-3 will find out in the next run and delete the DNS entry. Casper-3 doesn't keep state, the state is the DNS TXT records.

Supported DNS Providers

  • CloudFlare
  • Digital Ocean (to be deprecated)

How to use casper-3

Add the following labels to the nodes:

  • node.gather.town/casper-3=true for DNS records
  • node.gather.town/casper-3=proxied for proxied DNS records

Configure casper-3 via environment variables:

  • ENV to set the environment. The development environment enables debugging. Default is "development"
  • INTERVAL to set the time window between runs. Default is "60".
  • PROVIDER to set the provider. Default is "cloudflare".
  • TOKEN to set the provider's access token. Required.
  • LOGLEVEL to set the log level. Default is "info". Available options are: "info" and "debug".
  • ZONE to set the DNS zone. Default is "k8s.gather.town".
  • SUBDOMAIN to set the DNS subdomain. Default is "".
  • ALLOW_SYNC_PODS to create DNS entries based on pod names instead of node names (to be deprecated). Default is "false".

Development

Develop and open PRs against the develop branch. The flow is as follows:

develop -> staging -> main

Each branch will deploy the application in the respective environments:

  • develop branch will deploy the application to the dev cluster
  • staging branch will deploy the application to the stg cluster
  • production branch will deploy the application to the prod cluster

Trivia

The S.C. Magi System (マギ) are a trio of supercomputers designed by Dr. Naoko Akagi during her research into bio-computers while at Gehirn. Casper-3 is one of the three Magi.

Directories

Path Synopsis
cmd
internal
config
Package config provides functions that allow to construct the service configuration from the environment.
Package config provides functions that allow to construct the service configuration from the environment.
metrics
Metrics package to export useful metrics for monitoring and alerting.
Metrics package to export useful metrics for monitoring and alerting.
pkg
kubernetes
Package kubernetes provides methods for interacting with an existing kubernetes cluster in a Kubestack environment.
Package kubernetes provides methods for interacting with an existing kubernetes cluster in a Kubestack environment.
log
Package log provides structured logging for the service.
Package log provides structured logging for the service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL