Skip to content

Commit

Permalink
Merge pull request #41651 from shashidharatd/kubefed-3
Browse files Browse the repository at this point in the history
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](#41127 (comment))

cc @madhusudancs @kubernetes/sig-federation-bugs
  • Loading branch information
Kubernetes Submit Queue authored Feb 18, 2017
2 parents 112aa32 + a3270b1 commit 4c5b22d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions federation/pkg/kubefed/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ func createPVC(clientset *client.Clientset, namespace, svcName, etcdPVCapacity s
api.ResourceStorage: capacity,
},
},
Selector: &metav1.LabelSelector{MatchLabels: apiserverSvcSelector},
},
}

Expand Down
1 change: 1 addition & 0 deletions federation/pkg/kubefed/init/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ func fakeInitHostFactory(apiserverServiceType v1.ServiceType, federationName, na
v1.ResourceStorage: capacity,
},
},
Selector: &metav1.LabelSelector{MatchLabels: apiserverSvcSelector},
},
}

Expand Down

0 comments on commit 4c5b22d

Please sign in to comment.