Skip to content

*: add kube apply action#58

Merged
hasbro17 merged 1 commit intooperator-framework:masterfrom
hasbro17:haseeb/add-kube-apply
Feb 26, 2018
Merged

*: add kube apply action#58
hasbro17 merged 1 commit intooperator-framework:masterfrom
hasbro17:haseeb/add-kube-apply

Conversation

@hasbro17
Copy link
Copy Markdown
Contributor

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.

@hasbro17
Copy link
Copy Markdown
Contributor Author

@hongchaodeng @fanminshi PTAL

Comment thread 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)
Copy link
Copy Markdown
Contributor

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?

@hongchaodeng
Copy link
Copy Markdown
Contributor

LGTM after nit

Comment thread pkg/sdk/action/action.go Outdated
return nil
}

// KubeApply will try to create the specified object or update it if it already exists
Copy link
Copy Markdown
Contributor

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?

@fanminshi
Copy link
Copy Markdown
Contributor

lgtm after a small suggestion.

@hasbro17 hasbro17 merged commit 4538206 into operator-framework:master Feb 26, 2018
@hasbro17 hasbro17 deleted the haseeb/add-kube-apply branch February 26, 2018 19:36
@fanminshi fanminshi mentioned this pull request Feb 26, 2018
21 tasks
m1kola pushed a commit to m1kola/operator-sdk that referenced this pull request Jun 7, 2024
Fix install commands for ubi8 in ci dockerfiles
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.

3 participants