-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 client-go dependency to K8s 1.11 #2121
Conversation
36151db
to
18b07ad
Compare
@@ -201,30 +201,6 @@ func (a *Agent) discoverFlexvolumeDir() (flexvolumeDirPath, source string) { | |||
return getDefaultFlexvolumeDir() | |||
} | |||
|
|||
// unmarshal to a NodeConfigKubelet | |||
configKubelet := NodeConfigKubelet{} |
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.
do these types not even exist anymore in the new 1.11 client-go?
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.
no, i couldn't find them. I'll take another look to be sure.
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.
I don't see the VolumePluginDir
anywhere, and there was also discussion in a previous issue about this property not being included anymore. So this code must not have been exercised anyway since it hasn't been possible to detect. We really just rely on setting the FLEXVOLUME_DIR_PATH
env var in the operator yaml as described [here](https://rook.io/docs/rook/v0.8/flexvolume.html#configuring-the-rook-operator. I'll clean up this function a bit better to make that more clear.
@@ -76,7 +76,7 @@ func TestProvisionImage(t *testing.T) { | |||
assert.Equal(t, "pvc-uid-1-1", pv.Name) | |||
assert.NotNil(t, pv.Spec.PersistentVolumeSource.FlexVolume) | |||
assert.Equal(t, v1.PersistentVolumeReclaimRetain, pv.Spec.PersistentVolumeReclaimPolicy) | |||
assert.Equal(t, "foo.io/rook-system", pv.Spec.PersistentVolumeSource.FlexVolume.Driver) |
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.
why did these asserts change? i'm not sure i see the reason yet
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.
This was a subtle change... The mocking changed such that the version of k8s is coming back as master
instead of 1.11.3
or some other specific version. The side effect is that the checks for k8s version in the RookDriverName
function doesn't know what version it's running, so it falls back to return the default flex driver name rook
.
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.
The flex volume directory detection now is based only on the rook env variable or the default location. There is also a unit test added TestDiscoverFlexDir
. It's already squashed to get the build going and potentially merged sooner.
18b07ad
to
64fe087
Compare
6be15ad
to
c34b61a
Compare
Signed-off-by: travisn <tnielsen@redhat.com>
Signed-off-by: travisn <tnielsen@redhat.com>
c34b61a
to
dd9d68c
Compare
Description of your changes:
client-go has moved on from v1.8.2, which Rook is still using. We need to update to a newer release of the client so we can pick up fixes in the last few releases. The latest stable version is 1.11.3, which we will now use with client-go v8.0.
dep ensure
may need to be run on dev machines if build dependencies are not found.The most notable issue known caused by this is #1553, which may cause a volume to be re-formatted even when it was previously formatted.
Which issue is resolved by this Pull Request:
Resolves #1553
Checklist:
make codegen
) has been run to update object specifications, if necessary.make vendor
does not cause changes.