Commit 751007c1 authored by caiweidong's avatar caiweidong

Do not replace labels of pvc with those of StastefulSet

parent f5574bf6
......@@ -149,7 +149,15 @@ func getPersistentVolumeClaims(set *apps.StatefulSet, pod *v1.Pod) map[string]v1
claim := templates[i]
claim.Name = getPersistentVolumeClaimName(set, &claim, ordinal)
claim.Namespace = set.Namespace
claim.Labels = set.Spec.Selector.MatchLabels
if claim.Labels != nil {
for key, value := range set.Spec.Selector.MatchLabels {
if claim.Labels != nil {
claim.Labels[key] = value
}
}
} else {
claim.Labels = set.Spec.Selector.MatchLabels
}
claims[templates[i].Name] = claim
}
return claims
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment