external-dns/docs/project-structure.md
2017-02-20 15:10:00 +01:00

1.1 KiB

Development specifications

Proposal regarding the project structure and related tools

How to run

external-dns --outside-cluster --dnsprovider=aws --source=ingress --source=service

Vendoring tool

  • glide
  • alternatives: govendor, godep

Project structure

./main.go
./config.go - store configurations, flag parsing
./controller - main controlling loop
    controller.go 
./plan/
    record.go - dns provider neutral struct for records
    plan.go - implements the logic for managing records
./kubernetes/
    manager.go - provides watching capabilities + clientset
./dnsprovider/ - dns providers
    aws.go
    google.go
    fake.go 
./source/ - list of sources
    fake.go
    ingress.go
    services.go

Dependencies

Logging

  • logrus
  • alternatives: uber-go/zap, glog

Build

  • Makefile
  • alternatives: bazel.io

CI/CD

Flags

  • spf13/pflag
  • alternatives - kingpin, jessevdk/go-flags Depends whether what kind of cmd line requirements we have