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

Support configuration of default compatibility matrix if matrix is not configured before configuring drivers #118

Merged
merged 7 commits into from
Dec 23, 2021

Conversation

ridaz-zz
Copy link
Contributor

@ridaz-zz ridaz-zz commented Dec 8, 2021

What type of PR is this?
/kind enhancement

What this PR does / why we need it:
This PR will bring in the following changes :

  1. If configure drivers is called before configuring the compat configmap, warning would be displayed for the user to configure the compatibility matrix.
  2. Still the user continues to configure drivers, a default compatibility matrix corresponding to the VDO version will be configured.

Which issue(s) this PR fixes:

Fixes #112

Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind TESTED

Test Report:

1. When compat-matrix is configured explicitly

i. vdoctl configure compatibility matrix

bin/vdoctl configure compatibility-matrix
✔ Web URL
Web URL https://github.com/vmware-tanzu/vsphere-kubernetes-drivers-operator/releases/download/0.1.1/compatibility.yaml
Tip: Compatibility matrix has been configured, you might want to try 'vdoctl configure drivers' to configure vsphere drivers.
kubectl describe configmaps -n vmware-system-vdo compat-matrix-config
Name:         compat-matrix-config
Namespace:    vmware-system-vdo

Data
====
auto-upgrade:
----
disabled
configured-by:
----
user
versionConfigURL:
----
https://github.com/vmware-tanzu/vsphere-kubernetes-drivers-operator/releases/download/0.1.1/compatibility.yaml

ii. vdoctl deploy

bin/vdoctl deploy --spec https://github.com/raw/ridaz/Sample-files/main/spec.yaml
Tip: now that you have deployed VDO, you might want to try 'vdoctl configure compatibility-matrix' to configure compatibility matrix

iii. vdoctl configure drivers

bin/vdoctl configure drivers
Do you want to configure CloudProvider? (Y/N) Y
Please provide the vcenter IP for configuring CloudProvider 
VC IP/ FQDN 10.187.159.221
Do you want to establish a secure connection? (Y/N) N█
Please provide the credentials for configuring CloudProvider
Username Administrator@vsphere.local
Password ********
Datacenter(s) Datacenter
Do you want to configure another vcenter for CloudProvider? (Y/N) N
Do you want to configure zones/regions for CloudProvider? (Y/N) N
You have now completed configuration of CloudProvider. We will now proceed to configure StorageProvider.
Please provide the credentials for configuring StorageProvider
Username administrator@vsphere.local
Password ********
Datacenter(s) Datacenter
Do you wish to provide custom kubelet Path? (Y/N) N
Do you wish to configure File Volumes? (Y/N) N
Thanks for configuring VDO. The drivers will now be installed.
You can check the status for drivers using `vdoctl status`

2. When compat-matrix is not configured explicitly

i. vdoctl deploy

bin/vdoctl deploy --spec https://github.com/raw/ridaz/Sample-files/main/spec.yaml
Tip: now that you have deployed VDO, you might want to try 'vdoctl configure compatibility-matrix' to configure compatibility matrix
kubectl describe configmaps -n vmware-system-vdo compat-matrix-config
Name:         compat-matrix-config
Namespace:    vmware-system-vdo

Data
====
auto-upgrade:
----
disabled
versionConfigURL:
----
https://github.com/vmware-tanzu/vsphere-kubernetes-drivers-operator/releases/download/0.1.1/compatibility.yaml

ii.vdoctl configure drivers

bin/vdoctl configure drivers
Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to configure. Do you want to continue with default compatibility matrix? (Y/N)   N
bin/vdoctl configure drivers
Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Compatibility matrix is not configured. VDO will use the default compatibility matrix. You can run 'vdoctl update compatibility-matrix' command to Do you want to configure CloudProvider? (Y/N) Y█
Please provide the vcenter IP for configuring CloudProvider 
VC IP/ FQDN 10.187.159.221
Do you want to establish a secure connection? (Y/N) N
Please provide the credentials for configuring CloudProvider
Username administrator@vsphere.local
Password ********
Datacenter(s) Datacenter
Do you want to configure another vcenter for CloudProvider? (Y/N) N
Do you want to configure zones/regions for CloudProvider? (Y/N) N
You have now completed configuration of CloudProvider. We will now proceed to configure StorageProvider.
Please provide the credentials for configuring StorageProvider
Username administrator@vsphere.local
Password ********
Datacenter(s) Datacenter
Do you wish to provide custom kubelet Path? (Y/N) N
Do you wish to configure File Volumes? (Y/N) N
Thanks for configuring VDO. The drivers will now be installed.
You can check the status for drivers using `vdoctl status`
kubectl describe configmaps -n vmware-system-vdo compat-matrix-config
Name:         compat-matrix-config
Namespace:    vmware-system-vdo
Labels:       <none>
Annotations:  <none>

Data
====
auto-upgrade:
----
disabled
configured-by:
----
default

Special notes for your reviewer:

@ridaz-zz ridaz-zz added the enhancement New feature or request label Dec 8, 2021
@ridaz-zz ridaz-zz added this to the Sprint-5 milestone Dec 8, 2021
@ridaz-zz ridaz-zz self-assigned this Dec 8, 2021
@codecov-commenter
Copy link

codecov-commenter commented Dec 8, 2021

Codecov Report

Merging #118 (c016fc0) into main (1ae1fc5) will increase coverage by 0.33%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
+ Coverage   51.47%   51.80%   +0.33%     
==========================================
  Files           6        6              
  Lines        1457     1467      +10     
==========================================
+ Hits          750      760      +10     
  Misses        610      610              
  Partials       97       97              
Flag Coverage Δ
unittests 51.80% <ø> (+0.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
controllers/vdoconfig_controller.go 46.72% <0.00%> (+0.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ae1fc5...c016fc0. Read the comment docs.

Copy link
Collaborator

@asifdxtreme asifdxtreme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

vdoctl/cmd/deploy.go Outdated Show resolved Hide resolved
vdoctl/cmd/drivers.go Outdated Show resolved Hide resolved
vdoctl/cmd/drivers.go Outdated Show resolved Hide resolved
vdoctl/cmd/drivers.go Outdated Show resolved Hide resolved
vdoctl/cmd/configure_matrix.go Outdated Show resolved Hide resolved
vdoctl/cmd/delete_vdo.go Show resolved Hide resolved
vdoctl/cmd/drivers.go Outdated Show resolved Hide resolved
vdoctl/cmd/drivers.go Outdated Show resolved Hide resolved
@jvrahav jvrahav merged commit dd20a21 into vmware-tanzu:main Dec 23, 2021
@ridaz-zz ridaz-zz deleted the topic/issue-112 branch January 3, 2022 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure Default value of Compatibility Matrix
6 participants