Skip to content
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

Update the documents with taint as pre-requisite #140

Merged
merged 4 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion controllers/vdoconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,9 @@ nodeloop:
func (r *VDOConfigReconciler) reconcileNodeProviderID(ctx vdocontext.VDOContext, config *vdov1alpha1.VDOConfig, clientset kubernetes.Interface, vsphereCloudConfigs *[]vdov1alpha1.VsphereCloudConfig) (bool, error) {
nodeStatus := make(map[string]vdov1alpha1.NodeStatus)
var updReq bool
allNodesReady := true

cpiStatus := vdov1alpha1.Configured
var cpiStatus vdov1alpha1.VDOConfigPhase
nodes, err := clientset.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
if err != nil {
return updReq, errors.Wrapf(err, "Error reconciling the providerID for CPI, unable to fetch list of nodes")
Expand All @@ -873,6 +874,7 @@ nodeLoop:
if _, ok := config.Status.CPIStatus.NodeStatus[node.Name]; ok {
nodeStatus[node.Name] = vdov1alpha1.NodeStatusPending
cpiStatus = vdov1alpha1.Configuring
allNodesReady = false
continue nodeLoop
}

Expand All @@ -884,6 +886,7 @@ nodeLoop:
if nodeExistsInVC {
nodeStatus[node.Name] = vdov1alpha1.NodeStatusPending
cpiStatus = vdov1alpha1.Configuring
allNodesReady = false
continue nodeLoop
}

Expand All @@ -896,6 +899,14 @@ nodeLoop:

}

if len(nodeStatus) <= 0 {
return false, nil
}

if allNodesReady {
cpiStatus = vdov1alpha1.Configured
}

if config.Status.CPIStatus.Phase != cpiStatus ||
!reflect.DeepEqual(config.Status.CPIStatus.NodeStatus, nodeStatus) {
config.Status.CPIStatus.NodeStatus = nodeStatus
Expand Down
4 changes: 4 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The operator is configured to run on master node, with a single replica deployme

VDO operator is built to run on vanilla k8s cluster as well Openshift clusters

## Pre-requisite

Please ensure the pre-requisites for [CSI](https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-0AB6E692-AA47-4B6A-8CEA-38B754E16567.html) and [CPI](https://cloud-provider-vsphere.sigs.k8s.io/tutorials/kubernetes-on-vsphere-with-kubeadm.html#:~:text=Check%20that%20all%20nodes%20are%20tainted) are met so that the CloudProvider and StorageProvider function properly

## Choose your Deployment Schemes

VDO can be deployed and configured in multiple ways depending on the environment you are working on.
Expand Down