Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN go mod download
# Copy the go source
COPY cmd/ ./cmd/
COPY api/ ./api/
COPY pkg/ ./pkg/
COPY internal/ ./internal/

# Build
Expand Down
3 changes: 3 additions & 0 deletions cmd/app/commandline.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

type Flags struct {
Kubeconfig string
ClusterDomain string
MetricsAddress string
ProbeAddress string
LeaderElection bool
Expand All @@ -47,6 +48,7 @@ func ParseCmdLine() Flags {
pflag.CommandLine = pflag.NewFlagSet(os.Args[0], pflag.ContinueOnError)

pflag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
pflag.String("cluster-domain", "cluster.local", "The cluster domain configured in kube-dns")
pflag.String("metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
pflag.String("health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
pflag.Bool("leader-elect", false, "Enable leader election for controller manager. "+
Expand Down Expand Up @@ -78,6 +80,7 @@ func ParseCmdLine() Flags {

return Flags{
Kubeconfig: viper.GetString("kubeconfig"),
ClusterDomain: viper.GetString("cluster-domain"),
MetricsAddress: viper.GetString("metrics-bind-address"),
ProbeAddress: viper.GetString("health-probe-bind-address"),
LeaderElection: viper.GetBool("leader-elect"),
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
go.etcd.io/etcd/client/v3 v3.5.14
golang.org/x/sync v0.7.0
k8s.io/api v0.30.2
k8s.io/apimachinery v0.30.2
k8s.io/client-go v0.30.2
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
Loading
Loading