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

feat: refactor ApisixPluginConfig and add e2e cases #815

Merged
merged 32 commits into from
Dec 29, 2021

Conversation

neverCase
Copy link
Contributor

Type of change:

  • Bugfix
  • New feature provided
  • Improve performance
  • Backport patches

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

neverCase and others added 26 commits December 9, 2021 20:20
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2021

Codecov Report

Merging #815 (91ab406) into master (819b003) will decrease coverage by 0.40%.
The diff coverage is 24.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #815      +/-   ##
==========================================
- Coverage   32.55%   32.14%   -0.41%     
==========================================
  Files          68       71       +3     
  Lines        7284     7727     +443     
==========================================
+ Hits         2371     2484     +113     
- Misses       4643     4968     +325     
- Partials      270      275       +5     
Impacted Files Coverage Δ
pkg/apisix/apisix.go 61.36% <ø> (ø)
pkg/apisix/cluster.go 32.57% <0.00%> (-1.07%) ⬇️
pkg/ingress/apisix_pluginconfig.go 0.00% <0.00%> (ø)
pkg/ingress/apisix_route.go 0.00% <0.00%> (ø)
pkg/ingress/compare.go 0.00% <0.00%> (ø)
pkg/ingress/controller.go 0.94% <0.00%> (-0.03%) ⬇️
pkg/ingress/ingress.go 6.81% <0.00%> (-0.08%) ⬇️
pkg/ingress/status.go 0.00% <0.00%> (ø)
pkg/kube/translation/translator.go 46.07% <ø> (ø)
pkg/kube/translation/apisix_route.go 21.82% <35.71%> (+0.79%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 819b003...91ab406. Read the comment docs.

…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
return err
}
var (
ar kube.ApisixPluginConfig
Copy link
Member

Choose a reason for hiding this comment

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

I tend to name it ap or apc

@@ -248,6 +296,11 @@ func (c *Controller) syncManifests(ctx context.Context, added, updated, deleted
merr = multierror.Append(merr, err)
}
}
for _, sr := range updated.pluginConfigs {
if _, err := c.apisix.Cluster(clusterName).PluginConfig().Create(ctx, sr); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Using Update function

pluginMap := make(apisixv1.Plugins)
if len(config.Spec.Plugins) > 0 {
for _, plugin := range config.Spec.Plugins {
if !plugin.Enable {
Copy link
Member

Choose a reason for hiding this comment

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

TBD

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Copy link
Contributor

@gxthrj gxthrj left a comment

Choose a reason for hiding this comment

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

LGTM

@tao12345666333 tao12345666333 merged commit a1ef639 into apache:master Dec 29, 2021
@tao12345666333 tao12345666333 added this to In progress in v1.4 Planning via automation Dec 29, 2021
@tao12345666333 tao12345666333 added this to the 1.4.0 milestone Dec 29, 2021
@tao12345666333 tao12345666333 linked an issue Dec 29, 2021 that may be closed by this pull request
6 tasks
@neverCase neverCase deleted the feat-638-plus branch December 30, 2021 02:55
Sindweller pushed a commit to Sindweller/apisix-ingress-controller that referenced this pull request Dec 31, 2021
…e#815)

Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller enhancement New feature or request
Projects
No open projects
v1.4 Planning
In progress
Development

Successfully merging this pull request may close these issues.

proposal: Add CRD ApisixPluginConfig support plugin configs
4 participants