-
Notifications
You must be signed in to change notification settings - Fork 339
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
Conversation
…ller into feat-638
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
…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
pkg/ingress/apisix_pluginconfig.go
Outdated
return err | ||
} | ||
var ( | ||
ar kube.ApisixPluginConfig |
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 tend to name it ap or apc
pkg/ingress/manifest.go
Outdated
@@ -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 { |
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.
Using Update
function
pluginMap := make(apisixv1.Plugins) | ||
if len(config.Spec.Plugins) > 0 { | ||
for _, plugin := range config.Spec.Plugins { | ||
if !plugin.Enable { |
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.
TBD
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
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
…e#815) Co-authored-by: Jintao Zhang <zhangjintao9020@gmail.com>
Type of change:
What this PR does / why we need it:
Pre-submission checklist: