Merge pull request #3182 from sabbot/Edgefs-bugfix-3181

Edgefs: Prevents multiple targets deployment on the same node
This commit is contained in:
Travis Nielsen authored and GitHub committed 2019-05-15 14:31:55 -06:00
commit 0c23e1cd4b
3 files changed
+15 -17

No files matched your search

+5 -5
View File
@@ -50,9 +50,9 @@ EdgeFS CSI plugins implement an interface between CSI enabled Container Orchestr
## EdgeFS CSI drivers configuration
For each driver type (NFS/ISCSI) we have already prepared configuration files examples, there are:
[EdgeFS CSI NFS driver config](../cluster/examples/kubernetes/edgefs/csi/nfs/edgefs-nfs-csi-driver-config.yaml)
[EdgeFS CSI NFS driver config](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/nfs/edgefs-nfs-csi-driver-config.yaml)
[EdgeFS CSI ISCSI driver config](../cluster/examples/kubernetes/edgefs/csi/iscsi/edgefs-iscsi-csi-driver-config.yaml)
[EdgeFS CSI ISCSI driver config](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/edgefs-iscsi-csi-driver-config.yaml)
Secret file configuration options example:
@@ -305,10 +305,10 @@ kubectl get volumesnapshotcontents.snapshot.storage.k8s.io
### To create volume's clone from existing snapshot you should:
- Create snapshotter storage class [Example yaml](../csi/iscsi/examples/snapshots/snapshot-class.yaml)
- Create snapshotter storage class [Example yaml](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/examples/snapshots/snapshot-class.yaml)
- Have an existing PVC based on EdgeFS ISCSI LUN
- Take snapshot from volume [Example yaml](../csi/iscsi/examples/snapshots/create-snapshot.yaml)
- Clone volume from existing snapshot [Example yaml](../csi/iscsi/examples/snapshots/nginx-snapshot-clone-volume.yaml)
- Take snapshot from volume [Example yaml](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/examples/snapshots/create-snapshot.yaml)
- Clone volume from existing snapshot [Example yaml](https://github.com/rook/rook/tree/master/cluster/examples/kubernetes/edgefs/csi/iscsi/examples/snapshots/nginx-snapshot-clone-volume.yaml)
## Troubleshooting and log collection
@@ -128,7 +128,7 @@ metadata:
name: rook-edgefs
namespace: rook-edgefs
spec:
edgefsImageName: edgefs/edgefs:1.1.0 # specify version here, i.e. edgefs/edgefs:1.1.0 etc
edgefsImageName: edgefs/edgefs:1.1.8 # specify version here, i.e. edgefs/edgefs:1.1.0 etc
serviceAccount: rook-edgefs-cluster
dataDirHostPath: /var/lib/edgefs
#dataVolumeSize: 10Gi
+9 -11
View File
@@ -438,21 +438,19 @@ func (c *Cluster) createPodSpec(rookImage string, dro edgefsv1beta1.DevicesResur
ServiceAccountName: c.serviceAccount,
Affinity: &v1.Affinity{
PodAntiAffinity: &v1.PodAntiAffinity{
PreferredDuringSchedulingIgnoredDuringExecution: []v1.WeightedPodAffinityTerm{
RequiredDuringSchedulingIgnoredDuringExecution: []v1.PodAffinityTerm{
{
Weight: int32(100),
PodAffinityTerm: v1.PodAffinityTerm{
LabelSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: k8sutil.AppAttr,
Operator: metav1.LabelSelectorOpIn,
Values: []string{appName},
},
LabelSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Key: k8sutil.AppAttr,
Operator: metav1.LabelSelectorOpIn,
Values: []string{appName},
},
},
TopologyKey: v1.LabelHostname,
},
TopologyKey: v1.LabelHostname,
},
},
},