Skip to content

Enhancement: discrete CRD / CR creation install phases #6496

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

Closed
grokspawn opened this issue Jul 10, 2023 · 4 comments · Fixed by #6613
Closed

Enhancement: discrete CRD / CR creation install phases #6496

grokspawn opened this issue Jul 10, 2023 · 4 comments · Fixed by #6613
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. language/go Issue is related to a Go operator project lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Milestone

Comments

@grokspawn
Copy link
Contributor

grokspawn commented Jul 10, 2023

log.Print("Creating CRDs and resources")
if err := c.DoCreate(ctx, objs...); err != nil {
return nil, fmt.Errorf("failed to create CRDs and resources: %v", err)
}

Enhance to have separate CRD installation phase and CR creation phase. As currently sorted, the order of the objects created will already respect this sequence, but it would be nice to separate them out for auditing, error handling, etc.

Referred to in #6490 (review)

@OchiengEd OchiengEd added kind/feature Categorizes issue or PR as related to a new feature. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. language/go Issue is related to a Go operator project labels Jul 10, 2023
@varshaprasad96 varshaprasad96 added this to the Backlog milestone Jul 17, 2023
@acornett21
Copy link
Contributor

@grokspawn @everettraven DoCreate already has audit logging on which resource is being created, and which one fails, if any. Is this logic not enough? Please see here:

https://github.com/operator-framework/operator-sdk/blob/master/internal/olm/client/client.go#L116-L121

@everettraven
Copy link
Contributor

@acornett21 That safeCreateOneResource function was added recently to retry resource creation due to CRDs not yet being "ready" on the cluster blocking the creation of the custom resource. IIRC the creation logic currently issues creation requests for the CRDs and then immediately starts to try creating the custom resources. The inspiration behind this issue is that it would be nice if we could ensure that the cluster has processed the CRDs and is ready to accept requests for these custom resource before attempting to create the custom resources.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 24, 2023
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. language/go Issue is related to a Go operator project lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants