mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-14 14:18:59 +00:00
Fix storage node affinity helpers
Kubernetes-commit: 5fcb82dde93429e443c77c8936e4412b9a936744
This commit is contained in:
committed by
Kubernetes Publisher
parent
0d7af62b83
commit
dc0c592386
@@ -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
|
||||
|
Reference in New Issue
Block a user