Removed hostname/subdomain annotation.
This commit is contained in:
@@ -23,7 +23,6 @@ import (
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
podapi "k8s.io/kubernetes/pkg/api/v1/pod"
|
||||
apps "k8s.io/kubernetes/pkg/apis/apps/v1beta1"
|
||||
"k8s.io/kubernetes/pkg/controller"
|
||||
|
||||
@@ -108,9 +107,8 @@ func identityMatches(set *apps.StatefulSet, pod *v1.Pod) bool {
|
||||
set.Name == parent &&
|
||||
pod.Name == getPodName(set, ordinal) &&
|
||||
pod.Namespace == set.Namespace &&
|
||||
pod.Annotations != nil &&
|
||||
pod.Annotations[podapi.PodHostnameAnnotation] == pod.Name &&
|
||||
pod.Annotations[podapi.PodSubdomainAnnotation] == set.Spec.ServiceName
|
||||
pod.Spec.Hostname == pod.Name &&
|
||||
pod.Spec.Subdomain == set.Spec.ServiceName
|
||||
}
|
||||
|
||||
// storageMatches returns true if pod's Volumes cover the set of PersistentVolumeClaims
|
||||
@@ -182,11 +180,8 @@ func updateStorage(set *apps.StatefulSet, pod *v1.Pod) {
|
||||
func updateIdentity(set *apps.StatefulSet, pod *v1.Pod) {
|
||||
pod.Name = getPodName(set, getOrdinal(pod))
|
||||
pod.Namespace = set.Namespace
|
||||
if pod.Annotations == nil {
|
||||
pod.Annotations = make(map[string]string)
|
||||
}
|
||||
pod.Annotations[podapi.PodHostnameAnnotation] = pod.Name
|
||||
pod.Annotations[podapi.PodSubdomainAnnotation] = set.Spec.ServiceName
|
||||
pod.Spec.Hostname = pod.Name
|
||||
pod.Spec.Subdomain = set.Spec.ServiceName
|
||||
}
|
||||
|
||||
// isRunningAndReady returns true if pod is in the PodRunning Phase, if it has a condition of PodReady, and if the init
|
||||
|
Reference in New Issue
Block a user