Fix permission denied warnings during tests (#617)
For some reason the kubelet tries to do things that it gets perm denied. This changes the base.yml in the skaffold file to have the permissions. In turn, this broke the node deletion test. So, instead of looking for the deletion event (imperative), we wait for the node UID to change (declarative).
This commit is contained in:
committed by
Brian Goff
parent
9e659145c1
commit
a3f933d998
@@ -43,16 +43,18 @@ func (f *Framework) WaitUntilNodeCondition(fn watch.ConditionFunc) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// WaitUntilNodeAdded is a watch condition which waits until the VK node object
|
||||
// is added.
|
||||
func (f *Framework) WaitUntilNodeAdded(event watchapi.Event) (bool, error) {
|
||||
if event.Type != watchapi.Added {
|
||||
return false, nil
|
||||
}
|
||||
return event.Object.(*corev1.Node).Name == f.NodeName, nil
|
||||
}
|
||||
|
||||
// DeleteNode deletes the vk node used by the framework
|
||||
func (f *Framework) DeleteNode() error {
|
||||
return f.KubeClient.CoreV1().Nodes().Delete(f.NodeName, nil)
|
||||
var gracePeriod int64
|
||||
propagation := metav1.DeletePropagationBackground
|
||||
opts := metav1.DeleteOptions{
|
||||
PropagationPolicy: &propagation,
|
||||
GracePeriodSeconds: &gracePeriod,
|
||||
}
|
||||
return f.KubeClient.CoreV1().Nodes().Delete(f.NodeName, &opts)
|
||||
}
|
||||
|
||||
// GetNode gets the vk nodeused by the framework
|
||||
func (f *Framework) GetNode() (*corev1.Node, error) {
|
||||
return f.KubeClient.CoreV1().Nodes().Get(f.NodeName, metav1.GetOptions{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user