Specify hostname, subdomain via annotation on podspec.

The hostname is a DNS A record, if the subdomain maps to a service name
in the same namespace
This commit is contained in:
Abhishek Shah
2016-02-02 10:59:54 -08:00
parent 4e00333f9b
commit a3c00aadd5
13 changed files with 261 additions and 54 deletions

View File

@@ -28,6 +28,16 @@ import (
hashutil "k8s.io/kubernetes/pkg/util/hash"
)
const (
// Its value is the json representation of map[string(IP)][HostRecord]
// example: '{"10.245.1.6":{"HostName":"my-webserver"}}'
PodHostnamesAnnotation = "endpoints.beta.kubernetes.io/hostnames-map"
)
type HostRecord struct {
HostName string
}
// RepackSubsets takes a slice of EndpointSubset objects, expands it to the full
// representation, and then repacks that into the canonical layout. This
// ensures that code which operates on these objects can rely on the common