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

chore: refactor 1.0 parameter api #8441

Open
wants to merge 41 commits into
base: main
Choose a base branch
from

Conversation

sophon-zt
Copy link
Contributor

No description provided.

@sophon-zt sophon-zt linked an issue Nov 11, 2024 that may be closed by this pull request
@github-actions github-actions bot added the size/XXL Denotes a PR that changes 1000+ lines. label Nov 11, 2024
@@ -143,6 +143,8 @@ func (r *ClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
&clusterServiceTransformer{},
// handle the restore for cluster
&clusterRestoreTransformer{},
// rerender parameters after v-scale and h-scale
&clusterParametersTransformer{},
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be moved out of the cluster controller since the apps package has no knowledge about the parameters and doesn't depend on it too.

return nil
}

configRender, paramsDefs, err := intctrlutil.ResolveCmpdParametersDefs(transCtx, transCtx.Client, transCtx.CompDef)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

@@ -318,7 +318,7 @@ type ComponentDefinitionSpec struct {
// +listType=map
// +listMapKey=name
// +optional
Configs []ComponentConfigSpec `json:"configs,omitempty"`
Configs []ComponentTemplateSpec `json:"configs,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

The ComponentConfigSpec could be deleted from this package?

// Specifies the initialization parameters.
//
// +optional
InitParameters ComponentParameters `json:"initParameters,omitempty"`
Copy link
Contributor

@leon-inf leon-inf Nov 12, 2024

Choose a reason for hiding this comment

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

It should be added into spec.components.configs, and be used as init values to render config templates.

@sophon-zt sophon-zt force-pushed the support/improvement-10-config-related-api-issue8298 branch from 7455b95 to cd36433 Compare November 18, 2024 07:46
@sophon-zt sophon-zt marked this pull request as ready for review November 18, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement] 1.0 config-related api
2 participants