-
Notifications
You must be signed in to change notification settings - Fork 880
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: kustomize rollout: add openapi to doc and examples #1371
feat: kustomize rollout: add openapi to doc and examples #1371
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov Report
@@ Coverage Diff @@
## master #1371 +/- ##
=======================================
Coverage 81.35% 81.35%
=======================================
Files 108 108
Lines 14505 14505
=======================================
Hits 11801 11801
Misses 2089 2089
Partials 615 615 Continue to review full report at Codecov.
|
@huikang - did you hand code the |
Hi, @jessesuen , yeah, I handcoded |
is autogenerated. I thought something similar would need to be done for Rollouts but with the SMP keys |
Thanks. Let me look into the options of the open-api tool. |
Hi, @jessesuen , just want to make sure I understand the problem correctly: the problem is that the content in https://github.com/argoproj/argo-rollouts/blob/master/pkg/apiclient/rollout/rollout.swagger.json misses some
the So we need to figure our how to let Line 50 in e3dc6af
Is my understanding correct? Thanks. |
Yes, that is correct. The goal is for kustomize 4 to be able to patch rollouts in the same way as deployments. If we can achieve this via automation that would be ideal, but not sure if that is possible. |
Following is my findings:
"io.argoproj.v1alpha1.Rollout": {
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string"
},
"metadata": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta",
"description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata"
},
"spec": {
"template": {
"properties": {
"metadata": {
"properties": {
"annotations": {
"additionalProperties": {
"type": "string"
If I change the key "template" to "template": {
"$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec"
} The SMP would work. Not sure why the original one does not use the reference definition. |
@huikang , I think I found a way to generate schema. There is no out of the box generator unfortunatelly so I had to write more go code in gen-crd-spec/main.go. We need tests and documentation changes from your PR so I've sent PR to your fork: huikang#1 . Once it is merged this PR should be complete. Can you please take a look? |
Sounds good. Thanks, @alexmt ! |
- openAPI schema for kustomize rollout Signed-off-by: Hui Kang <[email protected]>
ffeb3f5
to
c5ac0f9
Compare
Signed-off-by: Alexander Matyushentsev <[email protected]> Signed-off-by: Hui Kang <[email protected]>
c5ac0f9
to
1892ff0
Compare
Signed-off-by: Hui Kang <[email protected]>
00348eb
to
de9c211
Compare
Hi, @alexmt , I have merged your commit and cleaned up the PR a bit. However, when the new command failed due to the following error
Could you take a look? Thanks. |
Signed-off-by: Alexander Matyushentsev <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
LGTM!
Signed-off-by: Hui Kang [email protected]
close #1210
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.