janiussyafiq commented on issue #13877: URL: https://github.com/apache/apisix/issues/13877#issuecomment-5421409263
How do you manage your APISIX config? I noticed that `apisix-ingress-controller` exists, so are routes and the `GatewayProxy` managed through it? If that is the case then this might lead to the current issue. When a `GatewayProxy` exists, the controller treats APISIX as fully managed. On every periodic sync (`syncPeriod`, chart default `1m`) and on every Gateway/IngressClass reconcile it runs an ADC sync of the whole desired state, and ADC deletes anything on the Admin API that is not declared there, `plugin_metadata` included. So your `PUT` succeeds, then the controller removes it within about a minute, which matches what you see on a fresh pod. I reproduced this with the same ADC the controller uses: after `PUT plugin_metadata/prometheus`, one `adc sync` with a config that has no `plugin_metadata` logs `Delete plugin_metadata: "prometheus"` and the Admin API returns 404 afterwards. You can confirm on your side: ```bash curl -i "http://apisix-admin.apisix.svc.cluster.local:9180/apisix/admin/plugin_metadata/prometheus" -H "X-API-KEY: ..." # 404 here means the controller removed it ``` If that is the case, declare the metadata in the `GatewayProxy` so the controller owns it: ```yaml apiVersion: apisix.apache.org/v1alpha1 kind: GatewayProxy metadata: name: apisix-config # your existing GatewayProxy namespace: apisix spec: provider: ... # keep as is pluginMetadata: prometheus: disabled_labels: http_status: ["node", "matched_uri", "matched_host"] ``` If the chart creates the GatewayProxy for you (`ingress-controller.gatewayProxy.createDefault: true`), put the same block under `ingress-controller.gatewayProxy.pluginMetadata` in your Helm values. New samples should then show `node=""`. Could you confim this first? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
