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

feat: support ComponentDefinition custom annotations and Component inherit Cluster annotations #6724

Merged
merged 7 commits into from
Mar 5, 2024

Conversation

Y-Rookie
Copy link
Collaborator

@Y-Rookie Y-Rookie commented Mar 1, 2024

No description provided.

@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines. label Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 70.68966% with 34 lines in your changes are missing coverage. Please review.

Project coverage is 66.51%. Comparing base (63d055c) to head (1fa57d8).
Report is 2 commits behind head on main.

Files Patch % Lines
pkg/controller/component/synthesize_component.go 53.84% 9 Missing and 3 partials ⚠️
controllers/apps/component_utils.go 80.55% 4 Missing and 3 partials ⚠️
...lers/apps/transformer_cluster_api_normalization.go 84.00% 3 Missing and 1 partial ⚠️
pkg/controller/component/component.go 25.00% 2 Missing and 1 partial ⚠️
controllers/apps/transformer_cluster_component.go 66.66% 0 Missing and 2 partials ⚠️
controllers/apps/transformer_component_status.go 0.00% 1 Missing and 1 partial ⚠️
pkg/controller/component/vars.go 75.00% 2 Missing ⚠️
controllers/apps/transformer_component_vars.go 50.00% 1 Missing ⚠️
...g/controller/component/service_descriptor_utils.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6724      +/-   ##
==========================================
+ Coverage   66.25%   66.51%   +0.25%     
==========================================
  Files         306      306              
  Lines       36870    36900      +30     
==========================================
+ Hits        24430    24544     +114     
+ Misses      10337    10269      -68     
+ Partials     2103     2087      -16     
Flag Coverage Δ
unittests 66.51% <70.68%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

apis/apps/v1alpha1/clusterdefinition_types.go Outdated Show resolved Hide resolved
@@ -190,6 +190,13 @@ type ComponentDefinitionSpec struct {
// +optional
Labels map[string]string `json:"labels,omitempty"`

// Defines static annotations that will be patched to all k8s resources created for the component.
// If a annotation key conflicts with any other system annotations or user-specified annotations, it will be silently ignored.
// This field is immutable.
Copy link
Contributor

Choose a reason for hiding this comment

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

then enforce it by a validation rule?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

then enforce it by a validation rule?

This is to keep consistency with other fields, and validation will be added once the API is finally stable.

apis/apps/v1alpha1/componentdefinition_types.go Outdated Show resolved Hide resolved
@Y-Rookie
Copy link
Collaborator Author

Y-Rookie commented Mar 4, 2024

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Mar 4, 2024
@Y-Rookie Y-Rookie merged commit 6d44f2d into main Mar 5, 2024
100 checks passed
@Y-Rookie Y-Rookie deleted the support/support-inherit-and-custom-annotation branch March 5, 2024 02:23
@github-actions github-actions bot added this to the Release 0.8.2 milestone Mar 5, 2024
@Y-Rookie Y-Rookie modified the milestones: Release 0.8.2, Release 0.9.0 Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test feature size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Features] ComponentDefinition support custom annotation and Component support inherit Cluster annotations
3 participants