Skip to content

Commit

Permalink
Merge 8882900 into 0b91e4a
Browse files Browse the repository at this point in the history
  • Loading branch information
devkid committed Dec 13, 2019
2 parents 0b91e4a + 8882900 commit 827c293
Show file tree
Hide file tree
Showing 30 changed files with 322 additions and 131 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/alibabacloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/aws-sd.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/azure-private-dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ metadata:
name: externaldns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down Expand Up @@ -229,7 +229,7 @@ metadata:
name: externaldns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down Expand Up @@ -292,7 +292,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/contour.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/coredns.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/designate.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/digitalocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/dnsimple.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/exoscale.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/hostport.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/infoblox.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/istio.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/linode.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/nginx-ingress.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/ns1.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/pdns.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions"]
resources: ["ingresses"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/rcodezero.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/rdns.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/transip.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/vinyldns.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
resources: ["services","endpoints"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
Expand Down
39 changes: 20 additions & 19 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,26 @@ func main() {

// Create a source.Config from the flags passed by the user.
sourceCfg := &source.Config{
Namespace: cfg.Namespace,
AnnotationFilter: cfg.AnnotationFilter,
FQDNTemplate: cfg.FQDNTemplate,
CombineFQDNAndAnnotation: cfg.CombineFQDNAndAnnotation,
IgnoreHostnameAnnotation: cfg.IgnoreHostnameAnnotation,
Compatibility: cfg.Compatibility,
PublishInternal: cfg.PublishInternal,
PublishHostIP: cfg.PublishHostIP,
ConnectorServer: cfg.ConnectorSourceServer,
CRDSourceAPIVersion: cfg.CRDSourceAPIVersion,
CRDSourceKind: cfg.CRDSourceKind,
KubeConfig: cfg.KubeConfig,
KubeMaster: cfg.Master,
ServiceTypeFilter: cfg.ServiceTypeFilter,
IstioIngressGatewayServices: cfg.IstioIngressGatewayServices,
CFAPIEndpoint: cfg.CFAPIEndpoint,
CFUsername: cfg.CFUsername,
CFPassword: cfg.CFPassword,
ContourLoadBalancerService: cfg.ContourLoadBalancerService,
Namespace: cfg.Namespace,
AnnotationFilter: cfg.AnnotationFilter,
FQDNTemplate: cfg.FQDNTemplate,
CombineFQDNAndAnnotation: cfg.CombineFQDNAndAnnotation,
IgnoreHostnameAnnotation: cfg.IgnoreHostnameAnnotation,
Compatibility: cfg.Compatibility,
PublishInternal: cfg.PublishInternal,
PublishHostIP: cfg.PublishHostIP,
AlwaysPublishNotReadyAddresses: cfg.AlwaysPublishNotReadyAddresses,
ConnectorServer: cfg.ConnectorSourceServer,
CRDSourceAPIVersion: cfg.CRDSourceAPIVersion,
CRDSourceKind: cfg.CRDSourceKind,
KubeConfig: cfg.KubeConfig,
KubeMaster: cfg.Master,
ServiceTypeFilter: cfg.ServiceTypeFilter,
IstioIngressGatewayServices: cfg.IstioIngressGatewayServices,
CFAPIEndpoint: cfg.CFAPIEndpoint,
CFUsername: cfg.CFUsername,
CFPassword: cfg.CFPassword,
ContourLoadBalancerService: cfg.ContourLoadBalancerService,
}

// Lookup all the selected sources by names and pass them the desired configuration.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/externaldns/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type Config struct {
Compatibility string
PublishInternal bool
PublishHostIP bool
AlwaysPublishNotReadyAddresses bool
ConnectorSourceServer string
Provider string
GoogleProject string
Expand Down Expand Up @@ -286,6 +287,7 @@ func (cfg *Config) ParseFlags(args []string) error {
app.Flag("compatibility", "Process annotation semantics from legacy implementations (optional, options: mate, molecule)").Default(defaultConfig.Compatibility).EnumVar(&cfg.Compatibility, "", "mate", "molecule")
app.Flag("publish-internal-services", "Allow external-dns to publish DNS records for ClusterIP services (optional)").BoolVar(&cfg.PublishInternal)
app.Flag("publish-host-ip", "Allow external-dns to publish host-ip for headless services (optional)").BoolVar(&cfg.PublishHostIP)
app.Flag("always-publish-not-ready-addresses", "Always publish also not ready addresses for headless services (optional)").BoolVar(&cfg.AlwaysPublishNotReadyAddresses)
app.Flag("connector-source-server", "The server to connect for connector source, valid only when using connector source").Default(defaultConfig.ConnectorSourceServer).StringVar(&cfg.ConnectorSourceServer)
app.Flag("crd-source-apiversion", "API version of the CRD for crd source, e.g. `externaldns.k8s.io/v1alpha1`, valid only when using crd source").Default(defaultConfig.CRDSourceAPIVersion).StringVar(&cfg.CRDSourceAPIVersion)
app.Flag("crd-source-kind", "Kind of the CRD for the crd source in API group and version specified by crd-source-apiversion").Default(defaultConfig.CRDSourceKind).StringVar(&cfg.CRDSourceKind)
Expand Down
Loading

0 comments on commit 827c293

Please sign in to comment.