-
Notifications
You must be signed in to change notification settings - Fork 8
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 workflow script: sync k8s models #66
Conversation
Signed-off-by: amy <[email protected]>
main.py
Outdated
pass | ||
|
||
if __name__ == '__main__': | ||
main() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the swagger.json file.
main.py
Outdated
@@ -0,0 +1,338 @@ | |||
# Copyright 2016 The Kubernetes Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why construct a new file here. Ref: https://github.com/kcl-lang/kcl-openapi/blob/main/scripts/preprocess/main.py
run: go build | ||
- name: sync k8s models | ||
run: | | ||
tags=("1.28" "1.29" "1.30" "1.31" "1.32" "1.33") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to process and synchronize other versions of the k8s modules here?
.github/workflows/sync_models.yml
Outdated
rm -f ${spec_path} | ||
wget https://raw.githubusercontent.com/kubernetes/kubernetes/release-${tag}/api/openapi-spec/swagger.json -O ${spec_path} | ||
python ./scripts/preprocess/main.py ${spec_path} --omit-status --rename=io.k8s=k8s | ||
./kcl-openapi generate model -f processed-${spec_path} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that the title of the relevant Jira transaction states that the model still needs to be uploaded. How do we upload the model here, or is this PR only used to complete the testing function of model generation.
Signed-off-by: amy <[email protected]>
3c3a669
to
a08897d
Compare
add workflow script: sync k8s models by manually trigger the github workflow