mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #41651 from shashidharatd/kubefed-3
Automatic merge from submit-queue (batch tested with PRs 41401, 41195, 41664, 41521, 41651) [Federation][kubefed] Add label selector for etcd pvc Currently, etcd pvc created for federation etcd does not have a label selector. without a label selector etcd pvc will bind to any pv created statically, this may be problematic in real environments comprising multiple pv's. Also, verified that we can create a pv statically with labels as below ``` labels: "app": "federated-cluster" "module": "federation-apiserver" ``` and federation etcd pvc will be bound to the pv matching label. This is one of the side task, that we discussed in [here](https://github.com/kubernetes/kubernetes/issues/41127#issuecomment-278881319) cc @madhusudancs @kubernetes/sig-federation-bugs
This commit is contained in:
commit
4c5b22d4c6
@ -549,6 +549,7 @@ func createPVC(clientset *client.Clientset, namespace, svcName, etcdPVCapacity s
|
||||
api.ResourceStorage: capacity,
|
||||
},
|
||||
},
|
||||
Selector: &metav1.LabelSelector{MatchLabels: apiserverSvcSelector},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -672,6 +672,7 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
|
||||
v1.ResourceStorage: capacity,
|
||||
},
|
||||
},
|
||||
Selector: &metav1.LabelSelector{MatchLabels: apiserverSvcSelector},
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user