From 59f0022b6daf54620fae475ace7199dd18bd9684 Mon Sep 17 00:00:00 2001 From: David Schneider Date: Fri, 16 Nov 2018 08:51:23 +0100 Subject: [PATCH] Change default apiversion of crd - Change default apiversion of DNSEndpoint - Add error to output CRDClient --- pkg/apis/externaldns/types.go | 2 +- pkg/apis/externaldns/types_test.go | 2 +- source/crd.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/apis/externaldns/types.go b/pkg/apis/externaldns/types.go index f0637abe8..3e67a8bf9 100644 --- a/pkg/apis/externaldns/types.go +++ b/pkg/apis/externaldns/types.go @@ -162,7 +162,7 @@ var defaultConfig = &Config{ ExoscaleEndpoint: "https://api.exoscale.ch/dns", ExoscaleAPIKey: "", ExoscaleAPISecret: "", - CRDSourceAPIVersion: "externaldns.k8s.io/v1alpha", + CRDSourceAPIVersion: "externaldns.k8s.io/v1alpha1", CRDSourceKind: "DNSEndpoint", ServiceTypeFilter: []string{}, RFC2136Host: "", diff --git a/pkg/apis/externaldns/types_test.go b/pkg/apis/externaldns/types_test.go index e3094402b..87740640f 100644 --- a/pkg/apis/externaldns/types_test.go +++ b/pkg/apis/externaldns/types_test.go @@ -75,7 +75,7 @@ var ( ExoscaleEndpoint: "https://api.exoscale.ch/dns", ExoscaleAPIKey: "", ExoscaleAPISecret: "", - CRDSourceAPIVersion: "externaldns.k8s.io/v1alpha", + CRDSourceAPIVersion: "externaldns.k8s.io/v1alpha1", CRDSourceKind: "DNSEndpoint", } diff --git a/source/crd.go b/source/crd.go index 116166741..79b308ad4 100644 --- a/source/crd.go +++ b/source/crd.go @@ -69,7 +69,7 @@ func NewCRDClientForAPIVersionKind(client kubernetes.Interface, kubeConfig, kube } apiResourceList, err := client.Discovery().ServerResourcesForGroupVersion(groupVersion.String()) if err != nil { - return nil, nil, fmt.Errorf("error listing resources in GroupVersion %q", groupVersion.String()) + return nil, nil, fmt.Errorf("error listing resources in GroupVersion %q: %s", groupVersion.String(), err) } var crdAPIResource *metav1.APIResource