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

Add configs section to App CRD #38

Merged
merged 9 commits into from
Jul 1, 2022
Merged

Conversation

uvegla
Copy link
Contributor

@uvegla uvegla commented Jun 30, 2022

Towards: https://github.com/giantswarm/giantswarm/issues/22593

Checklist

  • Update changelog in CHANGELOG.md.

@uvegla uvegla marked this pull request as ready for review June 30, 2022 11:55
@uvegla uvegla requested a review from a team as a code owner June 30, 2022 11:55
@uvegla
Copy link
Contributor Author

uvegla commented Jun 30, 2022

Hold on, I just realised this repo works differently than I expected and it hosts the structs for the CRDs as well.

@uvegla
Copy link
Contributor Author

uvegla commented Jun 30, 2022

All right, did it properly this time and also aligned the recently updated docs for repositories entry of Catalog CRD.

type AppConfiguration struct {
// Kind of configuration to look up that should be applied to the app when deployed.
// +kubebuilder:validation:Enum=configMap;secret
Kind string `json:"kind"`

Choose a reason for hiding this comment

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

Should there also be a default to configmap here?

Copy link
Contributor Author

@uvegla uvegla Jun 30, 2022

Choose a reason for hiding this comment

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

In my opinion explicit is better than implicit. Or do you mean we should allow configmap and configMap as a value as well? I chose configMap for 2 reasons: this is how the RFC calls it and this is how we use it in other places as we. within the same CRD.

Choose a reason for hiding this comment

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

Sorry I meant a kubebuilder default to set this Kind field to configMap by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MarcelMue @kubasobon I set the kind field to optional and the default for it as configMap. I can see the benefits of it as probably it will be config map most of the time and this saves some repetition I guess.

@uvegla uvegla force-pushed the implement-configs-list-for-app-cr branch 2 times, most recently from 9db9409 to 6c89c12 Compare July 1, 2022 13:11
These will be used in merging logics and makes sense to keep with the actual
configuration.
@uvegla uvegla force-pushed the implement-configs-list-for-app-cr branch from 6c89c12 to 843337a Compare July 1, 2022 13:12
@uvegla uvegla merged commit 0f9c9db into main Jul 1, 2022
@uvegla uvegla deleted the implement-configs-list-for-app-cr branch July 1, 2022 13:28
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