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

WIP: New Tenant v1alpha2 version #310

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

MaxFedotov
Copy link
Collaborator

@MaxFedotov MaxFedotov commented Jun 28, 2021

@prometherion this is the first commit for #286. Adds new v1alpha2 Tenant spec

@MaxFedotov MaxFedotov changed the title New Tenant v1alpha2 version WIP: New Tenant v1alpha2 version Jun 28, 2021
@MaxFedotov MaxFedotov requested a review from prometherion June 28, 2021 14:45
Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

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

I'm seeing some duplicated structs used also on v1alpha1, such as AllowedListSpec and AdditionalMetadata, just to name a few of them.

WDTY abstracting these structures in the domain package so we can reuse them across the two types? tl;dr; DRY principle

@MaxFedotov
Copy link
Collaborator Author

MaxFedotov commented Jun 29, 2021

I was thinking about it, but then I checked https://github.com/Azure/azure-service-operator as an example, and they are copying structs between versions, not using abstract ones. And I think this approach had an advantage, because we will be able to modify them in future without breaking v1alpha1 CRDs.

Find out that copying structs between API versions is needed for correct DeepCopy func generation.
@prometherion I've updated this commit a bit (removed unused functions and packages from v1alpha1 and moved each v1alpha1 struct to a separate file). Can you please take a look one more time?

feat(v1alpha2): remove unused structs and functions from v1alpha1. Rename v1alpha1 structs to follow new naming. Move v1alpha1 structs to separate files
Copy link
Member

@prometherion prometherion left a comment

Choose a reason for hiding this comment

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

LGTM

@prometherion prometherion merged commit 564efc2 into projectcapsule:issues/286 Jun 30, 2021
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.

2 participants