Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Commit

Permalink
Merge pull request #7 from utilitywarehouse/polish
Browse files Browse the repository at this point in the history
preparing for a release
  • Loading branch information
alkar committed Feb 1, 2017
2 parents fb88480 + cfe37cd commit 94eb449
Show file tree
Hide file tree
Showing 8,148 changed files with 4,228,786 additions and 59 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*~
.DS_Store
vendor/

ingress53
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
# ingress53

# Building
ingress53 is a service designed to run in kubernetes and maintain DNS records for its ingress resources on AWS Route53.

If you need to build manually, you will need to install [glide](https://glide.sh/).
# Usage
ingress53 is slightly opinionated in that it assumes there are two kinds of ingresses: public and private. A kubernetes selector is used to select public ingresses, while all others default to being private.

You can test it locally (please refer to the command line help for more options):
```sh
./ingress53 \
-route53-zone-id=XXXXXXXXXXXXXX \
-target-private=private.example.com \
-target-public=public.example.com \
-kubernetes-config=$HOME/.kube/config \
-dry-run
```

You can use the generated docker image ([utilitywarehouse/ingress53](https://hub.docker.com/r/utilitywarehouse/ingress53/)) to deploy it on your kubernetes cluster.

## Building

If you need to build manually:

```
$ git clone git@github.com:utilitywarehouse/ingress53.git
$ cd ingress53
$ glide i
$ go build .
```

Alternatively, you can build the docker image and use the binary in a container.
The project uses [glide](https://glide.sh/) to manage dependencies but at the same time, they are vendored for simplicity.
91 changes: 55 additions & 36 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 22 additions & 8 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
package: github.com/utilitywarehouse/ingress53
import:
- package: github.com/aws/aws-sdk-go
version: v1.6.18
subpackages:
- aws
- aws/session
- service/route53
- service/route53/route53iface
- package: github.com/hashicorp/logutils
- package: github.com/miekg/dns
- package: github.com/prometheus/client_golang
version: v0.8.0
subpackages:
- prometheus
- prometheus/promhttp
- package: github.com/utilitywarehouse/go-operational
subpackages:
- op
- package: k8s.io/client-go
version: v1.5.0
subpackages:
- 1.5/kubernetes
- 1.5/pkg/api
- 1.5/pkg/apis/extensions/v1beta1
- 1.5/pkg/labels
- 1.5/pkg/runtime
- 1.5/pkg/watch
- 1.5/rest
- 1.5/tools/cache
- 1.5/tools/clientcmd
- package: github.com/aws/aws-sdk-go
version: v1.5.13
- package: github.com/hashicorp/logutils
- package: github.com/prometheus/client_golang
version: v0.8.0
- package: github.com/emicklei/go-restful
version: 1.0.0
subpackages:
- prometheus/promhttp
- package: github.com/utilitywarehouse/go-operational
- package: github.com/miekg/dns
- swagger
20 changes: 10 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (
var (
appGitHash = "master"

kubeConfig = flag.String("kubernetes-config", "", "path to the kubeconfig file, if unspecified then in-cluster config will be used")
lbPublicSelectorString = flag.String("kubernetes-public-ingress-selector", "", "selector for ingresses that are handled by the public ELB")
lbPublicHostname = flag.String("elb-hostname-public", "", "hostname of the ELB for public ingresses")
lbPrivateHostname = flag.String("elb-hostname-private", "", "hostname of the ELB for private ingresses")
r53ZoneID = flag.String("route53-zone-id", "", "Route53 hosted DNS zone id")
debugLogs = flag.Bool("debug", false, "enables debug logs")
dryRun = flag.Bool("dry-run", false, "if set, the registrator will not make any Route53 changes")
kubeConfig = flag.String("kubernetes-config", "", "path to the kubeconfig file, if unspecified then in-cluster config will be used")
publicSelectorString = flag.String("public-ingress-selector", "", "selector for ingresses that should point to the public target")
targetPublic = flag.String("target-public", "", "target hostname for public ingresses")
targetPrivate = flag.String("target-private", "", "target hostnam for private ingresses")
r53ZoneID = flag.String("route53-zone-id", "", "route53 hosted DNS zone id")
debugLogs = flag.Bool("debug", false, "enables debug logs")
dryRun = flag.Bool("dry-run", false, "if set, ingress53 will not make any Route53 changes")

metricUpdatesApplied = prometheus.NewCounterVec(
prometheus.CounterOpts{
Expand Down Expand Up @@ -78,9 +78,9 @@ func init() {

func main() {
ro := registratorOptions{
PrivateHostname: *lbPrivateHostname,
PublicHostname: *lbPublicHostname,
PublicResourceSelector: *lbPublicSelectorString,
PrivateHostname: *targetPrivate,
PublicHostname: *targetPublic,
PublicResourceSelector: *publicSelectorString,
Route53ZoneID: *r53ZoneID,
}

Expand Down
15 changes: 15 additions & 0 deletions vendor/cloud.google.com/go/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/cloud.google.com/go/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 94eb449

Please sign in to comment.