Fix storage node affinity helpers

Kubernetes-commit: 5fcb82dde93429e443c77c8936e4412b9a936744
This commit is contained in:
Michelle Au
2017-05-22 15:30:27 -07:00
committed by Kubernetes Publisher
parent 0d7af62b83
commit dc0c592386

View File

@@ -590,6 +590,10 @@ func GetStorageNodeAffinityFromAnnotation(annotations map[string]string) (*api.N
// Converts NodeAffinity type to Alpha annotation for use in PersistentVolumes
// TODO: update when storage node affinity graduates to beta
func StorageNodeAffinityToAlphaAnnotation(annotations map[string]string, affinity *api.NodeAffinity) error {
if affinity == nil {
return nil
}
json, err := json.Marshal(*affinity)
if err != nil {
return err