-
Notifications
You must be signed in to change notification settings - Fork 151
*: welcome cluster-etcd-operator #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-robot
merged 67 commits into
openshift:master
from
hexfusion:4.3-cluster-etcd-operator-v1
Oct 25, 2019
Merged
*: welcome cluster-etcd-operator #21
openshift-merge-robot
merged 67 commits into
openshift:master
from
hexfusion:4.3-cluster-etcd-operator-v1
Oct 25, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Closed
ded9d8d to
f1776f6
Compare
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Add bootstrapteardown/teardown.go which watches on clusterversions. The installer watches on clusterversions to wait for the installation to complete. We use the same mechanism so removing the bootstrap from ceo and removing the resources in installer are both triggered on clusterversions reporting install complete and are executed at about the same time preventing excessive etcd logging.
Signed-off-by: Sam Batschelet <[email protected]>
1) util.go was failing on empty string 2) cluster member controller adds only if MemberReady 3) Observer etcd isPendingReady returns true if certs container exists and the pod is not crashlooping
isPendingReady returns true only when etcd-member container is waiting and 2 init containers have successfully exit. This will take care of 1) Bootstrap: Containers will be waiting for PodInitializing state 2) Restart: Restart controller will remove the pod, making it in PodInitializing state
The controller watches on cluster etcd CRD, endpoints and pods in etcd namespace. It reconciles by running a diff on actual number of members observed by etcd api with members in the endpoint list. Querying the etcd membership is necessary here because all the controllers in this project depends on the endpoints being the source of truth. If the endpoint list is based on other things like cluster.members data in etcd, it creates a cyclic dependency and is not necessarily accurate. hostendpointcontroller: fix typo
Ignore removing etcd-bootstrap. This is have a side effect, any time bootstrap member is added, it would have to be removed outside of this controller. It is handled during bootstrap and teardown.
…bers Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
f1776f6 to
4ecd1f6
Compare
Signed-off-by: Sam Batschelet <[email protected]>
OWNERS: add alaypatel07
Signed-off-by: Sam Batschelet <[email protected]>
Signed-off-by: Sam Batschelet <[email protected]>
Contributor
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alaypatel07, hexfusion The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings in the controllers necessary to facilitate scaling from bootstrap and membership.
notable changes
clustermembercontroller: The clusterMember controller is tasked with managing etcd membership reconciliations. We loop Pods and conclude from observations of etcds
isMemberReady()orisMemberRemove(). Based on those observations we can conclude if the Pod is currently part of the cluster, pending joining or pending leaving the cluster. This controller is the only controller that actually talks directly to etcd Cluster API with MemberAdd and MemberRemove.staticpodcontroller: staticPod controller is deployed as a DaemonSet and takes action on the physical static Pod itself. We Get the local static Pod for the controller and conclude from observations
isMemberRemove(). Remove results in stopping the static Pod and deleting the data-dir and TLS peer, server and metric certs from disk. After this takes place we then start the Pod. Stopping the Pod involves removing the static pod spec from the manifests directory. Starting the Pod involves a process by which we extract the etcd-member Pod spec from MCO and persist it back into the manifests directory.staticsynccontroller: staticSync controller handles the issue of providing static Pods with assets allowing static Pods to use the default service account as normal Pods do. These assets include 4 files namespace, ca.crt, service-ca.crt and token.
hostetcdendpointcontroller: this controller is tasked with managing the previously static list of endpoints on the host network by which the kube-apiserver generates the storage backend.
etcdcertsigner: this controller is tasked with generating TLS certs required for etcd membership.
configobservationcontroller: The configObservation controller has the primary job of converting observations from etcd endpoints into appropriate member/pending keys for etcds.
design currently WIP
For more details please refer to openshift/enhancements#56
Long live the CEO!
NOTE: we have commented Dockerfile so we are not deployed through CVO until all the pieces are merged for installer and MCO.