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

Make subscription spec.config and spec.config.resources optional #97

Merged
merged 1 commit into from
Feb 22, 2021

Conversation

joelanford
Copy link
Member

…es structs optional via pointer

Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
@joelanford
Copy link
Member Author

This is a breaking change for Go users of operator-framework/api.

As far as I can tell, this is NOT a breaking change from a Kubernetes API standpoint. The current CRD does not require spec.config or spec.config.resources (which has no required fields).

@joelanford joelanford changed the title Subscription make spec.config and spec.config.resources optional Make subscription spec.config and spec.config.resources optional Feb 22, 2021
@joelanford
Copy link
Member Author

There's likely a way to fix this on the OLM side without making an API change by treating an empty struct identically to a nil struct pointer. However that has the downside that it becomes impossible to use spec.config.resources to unset resources defined by the CSV deployment.

Channel string `json:"channel,omitempty"`
StartingCSV string `json:"startingCSV,omitempty"`
InstallPlanApproval Approval `json:"installPlanApproval,omitempty"`
Config *SubscriptionConfig `json:"config,omitempty"`
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is not directly related to bug fix with overriding resources. However it seems that the intent is for spec.config to be optional, so it seems like a reasonable time to make this change as well.

Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 22, 2021
@joelanford joelanford merged commit 718d279 into operator-framework:master Feb 22, 2021
@joelanford joelanford deleted the fix/dep-resources branch February 22, 2021 17:43
@njhale
Copy link
Member

njhale commented Feb 22, 2021

/approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants