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

FIX: waiting for pod runnning, watch event.Object bug #117

Merged
merged 1 commit into from
Apr 21, 2020

Conversation

calmkart
Copy link
Contributor

for issue #114

checked the event

// Event represents a single event to a watched resource.
// +k8s:deepcopy-gen=true
type Event struct {
	Type EventType

	// Object is:
	//  * If Type is Added or Modified: the new state of the object.
	//  * If Type is Deleted: the state of the object immediately before deletion.
	//  * If Type is Bookmark: the object (instance of a type being watched) where
	//    only ResourceVersion field is set. On successful restart of watch from a
	//    bookmark resourceVersion, client is guaranteed to not get repeat event
	//    nor miss any events.
	//  * If Type is Error: *api.Status is recommended; other types may make sense
	//    depending on context.
	Object runtime.Object
}

the function is for waiting for pod running, so "MODIFIED" is ok, and if eventType is "ERROR" we should break and return nil.

@calmkart
Copy link
Contributor Author

@cjimti
PTAL, thanks

@cjimti
Copy link
Member

cjimti commented Apr 21, 2020

LGTM Thanks!

@cjimti cjimti merged commit a812e25 into txn2:master Apr 21, 2020
D3-LucaPiombino pushed a commit to CodeCoil/kubefwd that referenced this pull request Jun 13, 2024
FIX: waiting for pod runnning, watch event.Object bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants