-
Notifications
You must be signed in to change notification settings - Fork 338
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: add ApisixPluginConfig translator and controller loop #791
Conversation
@tao12345666333 |
Did you merge code from master? |
Yes. |
Yes, apiversion has been upgraded to v2beta3 from #746 You can open a new PR to upgrade ApisixPluginConfig to v2beta3. |
ok, got it |
I think the current PR can be retained. You can create a new PR and only upgrade ApisixPluginConfig to v2beta3 You can update this PR after the merger. Of course, if you want to completely recreate the PR, you can |
OK, I reopen it |
#792 has been merged. |
ok, I will merge it from the master first |
@tao12345666333 |
ping @tao12345666333 |
Sorry for delay. Let me take a look. |
You can just implement Translator interface, add |
APISIX route should add a https://apisix.apache.org/docs/apisix/architecture-design/plugin-config/ |
You can do it in two steps
Feel free to ping me, if you have any questions. |
ok, got it. |
This comment has been minimized.
This comment has been minimized.
Codecov Report
@@ Coverage Diff @@
## master #791 +/- ##
==========================================
- Coverage 32.57% 32.29% -0.29%
==========================================
Files 68 71 +3
Lines 7273 7674 +401
==========================================
+ Hits 2369 2478 +109
- Misses 4634 4919 +285
- Partials 270 277 +7
Continue to review full report at Codecov.
|
ok, got it. ....
W1222 17:45:44.757323 1 reflector.go:436] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: watch of *v2beta3.ApisixUpstream ended with: an error on the server ("unable to decode an event from the watch stream: unable to decode watch event: no kind \"ApisixUpstream\" is registered for version \"apisix.apache.org/v2beta3\" in scheme \"pkg/runtime/scheme.go:100\"") has prevented the request from succeeding
.....
W1222 17:45:58.030483 1 reflector.go:436] pkg/mod/k8s.io/client-go@v0.21.1/tools/cache/reflector.go:167: watch of *v2beta3.ApisixUpstream ended with: an error on the server ("unable to decode an event from the watch stream: unable to decode watch event: no kind \"ApisixUpstream\" is registered for version \"apisix.apache.org/v2beta3\" in scheme \"pkg/runtime/scheme.go:100\"") has prevented the request from succeeding I could fix it at the same time. |
Great! It looks like this is a bug, can you submit a separate PR? |
ok |
@tao12345666333 |
Don't worry, triage/accepted means that this PR has been accepted and is under active development. It does not mean that this PR is awaiting merger. |
…ller into feat-638
The reason why the test case failed was because APISIX did not check whether it was referenced when deleting PluginConfig. We can modify the current implementation logic. When the user configures and needs PluginConfig, create it again. |
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 ,but CI need to be re-run, it is failed in resourcepushing.go:426
.
Error Trace: resourcepushing.go:426
runner.go:113
runner.go:64
it_node.go:26
spec.go:215
spec.go:138
spec_runner.go:200
spec_runner.go:170
spec_runner.go:66
suite.go:79
ginkgo_dsl.go:238
ginkgo_dsl.go:213
e2e_test.go:26
Error: Expected nil, but got: &errors.errorString{s:"timed out waiting for the condition"}
Test: ApisixRoute Testing route priority
/home/runner/work/apisix-ingress-controller/apisix-ingress-controller/test/e2e/ingress/resourcepushing.go:426
ci show there were errors in e2e case |
I will re-run CI jobs |
It's green! Thanks @neverCase |
I will do the final round of review |
@neverCase Thanks for you contribution!!! The code in this PR is LGTM. In this PR, you not only implement the logic of the translator, but also increase the logic of the controller loop, so I hope you can add a little more content to ensure that its behavior meets our expectations.
apisix-ingress-controller/samples/deploy/crd/v1/ApisixRoute.yaml Lines 580 to 822 in 819b003
|
OK, I will update latter. |
…dify crd yaml (apache#791)" This reverts commit 03e93bf. # Conflicts: # pkg/kube/translation/apisix_pluginconfig.go # samples/deploy/crd/v1/ApisixPluginConfig.yaml # test/e2e/plugins/plugin_config.go
I will close this one, using #815 instead. |
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix
New feature provided
Improve performance
Backport patches
Related issues
Bugfix
Description
How to fix?
New feature or improvement
Backport patches
Why need to backport?
Source branch
Related commits and pull requests
proposal: Add CRD ApisixPluginConfig support plugin configs #638
feat: implement pluginconfig clients (#638) #772
Target branch