From 69565ced3eca79f57305848ea18bb1cfdd4c3e42 Mon Sep 17 00:00:00 2001 From: Martin Linkhorst Date: Wed, 8 Mar 2017 11:50:21 +0100 Subject: [PATCH] chore: use alpha annotations --- docs/initial-design.md | 6 +++--- source/service.go | 4 ++-- source/service_test.go | 24 ++++++++++++------------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/initial-design.md b/docs/initial-design.md index 5de4cea62..31552ac54 100644 --- a/docs/initial-design.md +++ b/docs/initial-design.md @@ -39,7 +39,7 @@ New cloud providers should be easily pluggable. Initially only AWS/Google platfo DNS records will be automatically created in multiple situations: 1. Setting `spec.rules.host` on an ingress object. -2. Adding the annotation `external-dns.kubernetes.io/hostname` on a `type=LoadBalancer` service object. +2. Adding the annotation `external-dns.alpha.kubernetes.io/hostname` on a `type=LoadBalancer` service object. ### Annotations @@ -49,13 +49,13 @@ Record configuration should occur via resource annotations. Supported annotation | Annotations | | |---|---| -|Tag |external-dns.kubernetes.io/controller | +|Tag |external-dns.alpha.kubernetes.io/controller | |Description | Tells a DNS controller to process this service. This is useful when running different DNS controllers at the same time (or different versions of the same controller). The v1 implementation of dns-controller would look for service annotations `dns-controller` and `dns-controller/v1` but not for `mate/v1` or `dns-controller/v2` | |Default | dns-controller | |Example|dns-controller/v1| |Required| false | |---|---| -|Tag |external-dns.kubernetes.io/hostname | +|Tag |external-dns.alpha.kubernetes.io/hostname | |Description | Fully qualified name of the desired record | |Default| none | |Example|foo.example.org| diff --git a/source/service.go b/source/service.go index 3e6abcc56..16468b684 100644 --- a/source/service.go +++ b/source/service.go @@ -25,9 +25,9 @@ import ( const ( // The annotation used for figuring out which controller is responsible - controllerAnnotationKey = "external-dns.kubernetes.io/controller" + controllerAnnotationKey = "external-dns.alpha.kubernetes.io/controller" // The annotation used for defining the desired hostname - hostnameAnnotationKey = "external-dns.kubernetes.io/hostname" + hostnameAnnotationKey = "external-dns.alpha.kubernetes.io/hostname" // The value of the controller annotation so that we feel resposible controllerAnnotationValue = "dns-controller" ) diff --git a/source/service_test.go b/source/service_test.go index 1c4f8bb69..4a21716dc 100644 --- a/source/service_test.go +++ b/source/service_test.go @@ -56,7 +56,7 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4"}, []endpoint.Endpoint{ @@ -69,7 +69,7 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{"lb.example.com"}, []endpoint.Endpoint{ @@ -82,8 +82,8 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/controller": "dns-controller", - "external-dns.kubernetes.io/hostname": "foo.example.org", + controllerAnnotationKey: controllerAnnotationValue, + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4"}, []endpoint.Endpoint{ @@ -96,8 +96,8 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/controller": "some-other-tool", - "external-dns.kubernetes.io/hostname": "foo.example.org", + controllerAnnotationKey: "some-other-tool", + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4"}, []endpoint.Endpoint{}, @@ -108,7 +108,7 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4"}, []endpoint.Endpoint{ @@ -121,7 +121,7 @@ func testServiceEndpoints(t *testing.T) { "other-testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4"}, []endpoint.Endpoint{}, @@ -132,7 +132,7 @@ func testServiceEndpoints(t *testing.T) { "other-testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4"}, []endpoint.Endpoint{ @@ -145,7 +145,7 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{}, []endpoint.Endpoint{}, @@ -156,7 +156,7 @@ func testServiceEndpoints(t *testing.T) { "testing", "foo", map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, []string{"1.2.3.4", "8.8.8.8"}, []endpoint.Endpoint{ @@ -222,7 +222,7 @@ func BenchmarkServiceEndpoints(b *testing.B) { Namespace: "testing", Name: "foo", Annotations: map[string]string{ - "external-dns.kubernetes.io/hostname": "foo.example.org", + hostnameAnnotationKey: "foo.example.org", }, }, Status: v1.ServiceStatus{