-
Notifications
You must be signed in to change notification settings - Fork 192
VSphereCPIConfig derives the insecure flags from the TLS thumbprint in cluster variable. #3300
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3300 +/- ##
==========================================
+ Coverage 46.70% 51.58% +4.87%
==========================================
Files 281 122 -159
Lines 29654 11197 -18457
==========================================
- Hits 13850 5776 -8074
+ Misses 14553 4942 -9611
+ Partials 1251 479 -772
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add link to isue number this fixes with description of original problem.
Also not sure what will happen if
spec.vsphereCPI.thumbprint in the VSphereCPIConfig CR that user specified ="" (not provided)
&
thumbprint derived from the cluster variables = "" (not provided)
&
and user did not specify spec.vsphereCPI.insecure.
apis/addonconfigs/config/crd/bases/cpi.tanzu.vmware.com_vspherecpiconfigs.yaml
Show resolved
Hide resolved
...-manager/bundle/config/upstream/addonconfigscrds/cpi.tanzu.vmware.com_vspherecpiconfigs.yaml
Show resolved
Hide resolved
In that case, the final values of thumbprint is resolved to be empty. Hence, the insecure flag will be set to true with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the error message a bit clearer, right now they don't quite match the logic. thanks.
Please provide testing details to verify this patches fixes problem. |
Currently this patch will turn insecureFlag=True if thumbprintTLS is not available. |
per @srm09, the insecure flag from CAPV will be deprecated. An empty string in thumbprint should imply to use insecure connection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
What this PR does / why we need it
This PR changes the data values reconcile logics in the VSphereCPIConfig controller.
First, in the reconcile loop, the
tlsthumbprint
will be resolved in the following priorityspec.vsphereCPI.thumbprint
in the VSphereCPIConfig CR that user specifiedthumbprint
derived from the cluster variablesSecond, the controller then determine the value of
insecureFlag
, and make it possible to be overriden if user specifies inspec.vsphereCPI.insecure
.Which issue(s) this PR fixes
#3381
This PR aims to fix cpi package reconcilation error
vsphereCPI tlsThumbprint should be provided when insecureFlag is False
Describe testing done for PR
Release note
Additional information
Special notes for your reviewer