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

created universal controller that reconciles all resources related to… #7

Merged
merged 5 commits into from
May 30, 2024

Conversation

ca7alindev
Copy link
Contributor

…ed on standard RESTful API definitions

@ca7alindev ca7alindev requested a review from evghen1 May 23, 2024 13:35
@ca7alindev ca7alindev linked an issue May 23, 2024 that may be closed by this pull request
… magento.web7.md, allowing manage of resources from magento API based on standard RESTful API definitions
@ca7alindev ca7alindev force-pushed the 6-universal-controller-for-generated-magento-crds branch from fa7a756 to 99d672f Compare May 23, 2024 14:25
@ca7alindev ca7alindev marked this pull request as ready for review May 23, 2024 14:27
internal/controller/magento.go Outdated Show resolved Hide resolved
internal/controller/magento.go Outdated Show resolved Hide resolved
internal/controller/magento.go Outdated Show resolved Hide resolved
internal/controller/magento.go Outdated Show resolved Hide resolved
@ca7alindev ca7alindev requested a review from evghen1 May 23, 2024 14:59
internal/controller/magento.go Outdated Show resolved Hide resolved
internal/controller/magento.go Outdated Show resolved Hide resolved
internal/controller/magento.go Outdated Show resolved Hide resolved
internal/controller/magento.go Outdated Show resolved Hide resolved
@ca7alindev ca7alindev requested a review from evghen1 May 28, 2024 07:22

// isValidGVK returns true if the GroupVersionKind is a valid Magento API resource.
func isValidGVK(gvk schema.GroupVersionKind) bool {
return gvk.Group == "magento.web7.md" && gvk.Version == "v1alpha1" &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ca7alindev Please move Group and Version to constants.

if id == "" {
return nil, errors.New("resource with ID" + id + " in " + c.Path + " not found")
}
resp, _ := c.Create().R().Get(c.Path + "/" + id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ca7alindev Separators to constants please.

@evghen1
Copy link
Contributor

evghen1 commented May 30, 2024

@ca7alindev Ready for review?

@ca7alindev ca7alindev requested a review from evghen1 May 30, 2024 13:02
@ca7alindev
Copy link
Contributor Author

@ca7alindev Ready for review?

ready

@evghen1 evghen1 merged commit 02ff1f5 into main May 30, 2024
5 checks passed
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.

Universal Controller for generated Magento CRDs
2 participants