-
Notifications
You must be signed in to change notification settings - Fork 1.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
*: add kube apply action #58
*: add kube apply action #58
Conversation
@hongchaodeng @fanminshi PTAL |
pkg/sdk/informer/sync.go
Outdated
object, err := k8sutil.RuntimeObjectFromUnstructured(unstructObj) | ||
if err != nil { | ||
logrus.Errorf("failed to get runtime object from unstructured: %v", err) | ||
panic(err) |
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.
If the unstructured could not convert to runtime object, it seems like we can't handle it anyway. Why not just panic inside the method?
LGTM after nit |
pkg/sdk/action/action.go
Outdated
return nil | ||
} | ||
|
||
// KubeApply will try to create the specified object or update it if it already exists |
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.
KubeApply will try to create
-> KubeApply tries to create
?
lgtm after a small suggestion. |
Fix install commands for ubi8 in ci dockerfiles
Part [1/2] of #57
Added implementation for
kube apply
.For the resourceVersion conflict case the only thing to do would be to fail the action, which would re-queue the key, retry the sync, and the Handler. The expectation is that calling Handle() again would give us an Action with the latest object.