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

optimize: parse the custom resource definitions method refactoring #1409

Merged
merged 6 commits into from
May 20, 2022

Conversation

bxy4543
Copy link
Member

@bxy4543 bxy4543 commented May 16, 2022

Resolve custom resource definition method is too bloated, optimize the structure, support different versions of the resolution of different structures.
kubeadm version v1beta3 structure support later.

Signed-off-by: wb-hjh933779 [email protected]

Config = "Config"
Plugin = "Plugin"
Cluster = "Cluster"
InitConfiguration = "InitConfiguration"
Copy link
Member

Choose a reason for hiding this comment

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

Should we set those special variable with its decode func together ?

"k8s.io/apimachinery/pkg/util/yaml"
)

var decodeCRDFuncMap = map[string]func(reader io.Reader) (interface{}, error){
Copy link
Member

Choose a reason for hiding this comment

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

those logic to do decode file not match with the pkg name yaml means, i think we can move it to decode pkg or another.

@bxy4543
Copy link
Member Author

bxy4543 commented May 18, 2022

/test apply

@bxy4543 bxy4543 force-pushed the optimize_decode_crd branch from 33f420e to 08f31fb Compare May 18, 2022 10:28
@bxy4543
Copy link
Member Author

bxy4543 commented May 18, 2022

/test apply

@bxy4543 bxy4543 force-pushed the optimize_decode_crd branch from 08f31fb to 58501fa Compare May 19, 2022 01:57
@bxy4543 bxy4543 requested a review from kakaZhou719 May 19, 2022 09:10
@bxy4543 bxy4543 force-pushed the optimize_decode_crd branch from 6b8b0fe to b285fe9 Compare May 20, 2022 07:07
@bxy4543 bxy4543 force-pushed the optimize_decode_crd branch from ca8136d to 3d029e5 Compare May 20, 2022 09:26
@bxy4543 bxy4543 merged commit ea12fef into sealerio:main May 20, 2022
@bxy4543 bxy4543 deleted the optimize_decode_crd branch May 20, 2022 09:34
bxy4543 added a commit to bxy4543/sealer that referenced this pull request Jun 27, 2022
…ealerio#1409)

* Parse the Custom Resource Definitions method refactoring

Signed-off-by: wb-hjh933779 <[email protected]>

* move decode.go file to util pkg

Signed-off-by: wb-hjh933779 <[email protected]>

* add decode v1 cluster function test .

Signed-off-by: wb-hjh933779 <[email protected]>

* fix originally phase plugin execution

Signed-off-by: wb-hjh933779 <[email protected]>

* optimize the writing of the label plugin: ignore the spaces before and after the paragraph

Signed-off-by: wb-hjh933779 <[email protected]>
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