chore: use alpha annotations

This commit is contained in:
Martin Linkhorst 2017-03-08 11:50:21 +01:00
parent 99154ae71a
commit 69565ced3e
No known key found for this signature in database
GPG Key ID: CBE9EF3F75BAA5FD
3 changed files with 17 additions and 17 deletions

View File

@ -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|

View File

@ -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"
)

View File

@ -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{