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: allow to enable/disable some plugins #712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mstefany
Copy link
Contributor

List of plugins for gateway (apisix container) is currently configured statically in the ConfigMap and there is no way to customize the list. That means that e.g. zipkin plugin for observability is always enabled, but opentelemetry is not and it is not possible to enabled it (easily).

This just a proposal, how it could be done in one way.

I was also thinking about:

gateway:
  pluginsOverride:
    - plugin1
    - plugin2
    - ...

Or instead of adjusting ConfigMap template to allow for swappping it with existingConfigMap, e.g.:

gateway:
  existingConfigMap: "my-apisix-configmap"

Which would cause to not render apisix-configmap.yaml at all and instead switch configuration volume to provided custom ConfigMap.

Feedback is welcome.

List of plugins for gateway (apisix container) is currently configured
statically in the ConfigMap and there is no way to customize the list.
That means that e.g. `zipkin` plugin for observability is always enabled,
but `opentelemetry` is not and it is not possible to enabled it (easily).

This just a proposal, how it could be done in one way.

I was also thinking about:

```
gateway:
  pluginsOverride:
    - plugin1
    - plugin2
    - ...
```

Or instead of adjusting ConfigMap template to allow for swappping it
with `existingConfigMap`, e.g.:

```
gateway:
  existingConfigMap: "my-apisix-configmap"
```

Which would cause to not render `apisix-configmap.yaml` at all and
instead switch `configuration` volume to provided custom ConfigMap.

Feedback is welcome.
@mstefany
Copy link
Contributor Author

mstefany commented Mar 5, 2024

Any possibility for a review and/or discussion, please?
It would be actually useful to control both list of enabled plugins and plugin_attrs in the ConfigMap.

One new option that could be useful is:

gateway:
  plugin_attrs:
    opentelemetry:
      ...
  plugins:
    enable:
      - plugin1
      - plugin2
    disable:
      - plugin3
      - plugin4

gateway.plugins.enable would add something to the list of default plugins, while disable would remove it. My concern here is - if plugins need to be specified in the list by their priority or if order just doesn't matter.

@Revolyssup
Copy link
Contributor

@mstefany Sorry for the late reply. I got busy. Now I am going over all your proposals and PRs one by one

@Revolyssup
Copy link
Contributor

@mstefany I will approve this PR but the proposal you have, can you create a separate issue and add details in the description so that other maintainers can take a look at the proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants