diff --git a/kong/kustomization.yaml b/kong/kustomization.yaml index c923648..59304f8 100644 --- a/kong/kustomization.yaml +++ b/kong/kustomization.yaml @@ -7,7 +7,6 @@ resources: - rest/path-rewrite-bindings.yaml - rest/kongplugin.yaml - rest/rate-limiting.yaml - - rest/proxy-cache.yaml - rest/audit-log.yaml - rest/audit-log-body-capture.yaml - rest/audit-log-body-capture-bindings.yaml diff --git a/kong/rest/pluginbindings.yaml b/kong/rest/pluginbindings.yaml index e7748a8..a3d677f 100644 --- a/kong/rest/pluginbindings.yaml +++ b/kong/rest/pluginbindings.yaml @@ -36,24 +36,6 @@ spec: --- apiVersion: configuration.konghq.com/v1alpha1 kind: KongPluginBinding -metadata: - name: ${NAME}-workforce-api-proxy-cache-binding - namespace: ${NAMESPACE} -spec: - controlPlaneRef: - type: konnectNamespacedRef - konnectNamespacedRef: - name: ${CONTROL_PLANE_REF_NAME} - pluginRef: - name: ${NAME}-workforce-api-proxy-cache - targets: - serviceRef: - group: configuration.konghq.com - kind: KongService - name: ${NAME}-workforce-api ---- -apiVersion: configuration.konghq.com/v1alpha1 -kind: KongPluginBinding metadata: name: ${NAME}-workforce-api-audit-log-binding namespace: ${NAMESPACE} diff --git a/kong/rest/proxy-cache.yaml b/kong/rest/proxy-cache.yaml index eedf6d9..9c1f179 100644 --- a/kong/rest/proxy-cache.yaml +++ b/kong/rest/proxy-cache.yaml @@ -1,3 +1,21 @@ +# NOT APPLIED — deliberately unreferenced by kustomization.yaml. +# +# This cached every GET on the whole service for 60 seconds, and these are +# read-write APIs. Kong's proxy cache has **no invalidation on write**: a POST +# that changes a product passes through the same gateway, and the gateway goes +# on serving the value it captured before, for up to a minute, with nothing in +# the response saying so. +# +# It produced a real wrong answer. An agent woken by a stock event read the +# figure from before that event and reported, in one sentence, "68 in stock, +# above the threshold" and "it crossed the threshold, from 68". +# +# Kept here rather than deleted so that reinstating it is a decision, not a +# rediscovery. If it comes back, it belongs on reference data that is not +# written through this gateway, bound per route — or with `cache_control: true` +# so the API declares what is cacheable, which is the owner's call and not the +# gateway's. +# apiVersion: configuration.konghq.com/v1 kind: KongPlugin metadata: