forked from marctc/database-controller
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (27 loc) · 783 Bytes
/
main.go
File metadata and controls
32 lines (27 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* vim:set sw=8 ts=8 noet:
*
* Copyright (c) 2017 Torchbox Ltd.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely. This software is provided 'as-is', without any express or implied
* warranty.
*/
package main
import (
"flag"
"log"
"os"
)
func main() {
kubeconfig := flag.String("kubeconfig", "", "Path to a kube config. Only required if out-of-cluster.")
configfile := flag.String("config", "config.yaml", "Path to YAML configuration file.")
flag.Parse()
dbconfig, err := read_config(*configfile)
if err != nil {
log.Println("failed to read configuration:", err)
os.Exit(1)
}
controller := createController(*kubeconfig, dbconfig)
controller.run()
}