Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

*: PersistentVolume for etcd data #1695

Closed
wants to merge 2 commits into from
Closed

Conversation

hongchaodeng
Copy link
Member

issue ref: #1323
substitute #1434
This PR only handles non-failure cases.

this patch implements part 1 of the etcd data on persistent volumes design.

when pod pvsource is defined in the spec it'll create a PVC for every etcd
member and use it as the volume for etcd data.

pvc without a member will be removed during the reconcile.
@hongchaodeng hongchaodeng force-pushed the pv branch 2 times, most recently from 87d6b55 to 20e7ae0 Compare November 24, 2017 17:15
@hongchaodeng
Copy link
Member Author

hongchaodeng commented Nov 24, 2017

I tried it and it worked with following spec:

apiVersion: "etcd.database.coreos.com/v1beta2"
kind: "EtcdCluster"
metadata:
  name: "example"
spec:
  size: 3
  pod:
    persistentVolumeClaimSpec:
      accessModes: ["ReadWriteOnce"]
      resources:
        requests:
          storage: 512Mi
      storageClassName: standard

@hongchaodeng
Copy link
Member Author

@sgotti Do you have time to take a review?

@sgotti
Copy link
Member

sgotti commented Nov 27, 2017

@hongchaodeng I also prefer the use of a pvc template like done by statefulsets and it was my original idea but then I noticed that the backup spec used the PVSource so I adapted to it.

@khenidak
Copy link

khenidak commented Dec 2, 2017

Clarification: In case N (where N > 1) etcd clusters (deployed in the same namespace) where all of them use the similar PVC spec (example 10GB, readwriteonce). Would this PR as it stands today creates a risk where cluster A uses PVs meant to be used (or worse previously used) by cluster B?

@hongchaodeng
Copy link
Member Author

cluster A uses PVs meant to be used (or worse previously used) by cluster B?

No. PV of cluster A will be owned (ownerRef) and used by members of cluster A only. Owner hierarchy would provide a clear separation.

@ArcticSnowman
Copy link

Any progress on merging this?

@rjtsdl
Copy link
Contributor

rjtsdl commented Jan 16, 2018

@hongchaodeng , any plan of merging this soon?

@hongchaodeng
Copy link
Member Author

@rjtsdl

I don't have a good answer. But we don't have strong motivation for this at the moment. I'm still discussing it in company roadmap meeting.
Any use case you have? Would you like to take over or something?

@rjtsdl
Copy link
Contributor

rjtsdl commented Jan 16, 2018

Our use case would be enable HA as much as possible for Azure Managed K8s service.

I can take it over, mind give me contributor role to your pv branch?

@hongchaodeng
Copy link
Member Author

@rjtsdl
Just pull the changes and create another PR to replace this.
Please follow steps on #1323 (comment) .

@rjtsdl rjtsdl mentioned this pull request Jan 17, 2018
4 tasks
@hongchaodeng
Copy link
Member Author

Closing in favor of #1861

@hongchaodeng hongchaodeng deleted the pv branch January 18, 2018 19:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants