Describe the bug
After an Integration is created with the optional fields left unset, API Gateway populates defaults (passthroughBehavior: WHEN_NO_MATCH, timeoutInMillis: 29000, cacheNamespace: <resource id>, responseTransferMode: BUFFERED, and connectionType: INTERNET for HTTP types). The next reconcile diffs desired nil against those values and updateIntegrationInput emits replace operations carrying null, which API Gateway rejects with a BadRequestException; the controller then marks the resource ACK.Terminal and stops managing it.
Observed messages, depending on which field is first in the patch set:
BadRequestException: Invalid ResponseTransferMode specified.
BadRequestException: Enumeration value for ConnectionType must be non-empty
Reproduction steps
- Create a RestAPI, a Resource under its root and a
GET Method with authorizationType: NONE.
- Create the Integration below (nothing but the required fields):
apiVersion: apigateway.services.k8s.aws/v1alpha1
kind: Integration
metadata:
name: cb-get
spec:
restAPIRef: {from: {name: <restapi>}}
resourceRef: {from: {name: <resource>}}
httpMethod: GET
integrationHTTPMethod: GET
type: HTTP_PROXY
uri: https://example.com/
- Watch
status.conditions: after a successful create the resource goes ACK.Terminal with one of the messages above. kubectl logs shows desired resource state has changed with a diff of Spec.PassthroughBehavior nil→WHEN_NO_MATCH, Spec.TimeoutInMillis nil→29000, etc., followed by the rejected UpdateIntegration.
Expected outcome
Server-defaulted members should be late-initialised into the desired state (or excluded from the delta when desired is nil) instead of being patched to null. Setting all five explicitly in the spec is a complete workaround and the resource then syncs and updates normally — but nothing in the CRD or docs tells a user to do that.
Environment
- apigateway-controller 1.7.1 (
updateIntegrationInput in pkg/resource/integration/hooks.go is unchanged on 1.9.0)
- EKS 1.34, eu-west-1
Related: #2926 / #2588 (a separate httpMethod mapping issue that also surfaces as Terminal integrations).
Describe the bug
After an Integration is created with the optional fields left unset, API Gateway populates defaults (
passthroughBehavior: WHEN_NO_MATCH,timeoutInMillis: 29000,cacheNamespace: <resource id>,responseTransferMode: BUFFERED, andconnectionType: INTERNETfor HTTP types). The next reconcile diffs desirednilagainst those values andupdateIntegrationInputemitsreplaceoperations carrying null, which API Gateway rejects with aBadRequestException; the controller then marks the resourceACK.Terminaland stops managing it.Observed messages, depending on which field is first in the patch set:
BadRequestException: Invalid ResponseTransferMode specified.BadRequestException: Enumeration value for ConnectionType must be non-emptyReproduction steps
GETMethod withauthorizationType: NONE.status.conditions: after a successful create the resource goesACK.Terminalwith one of the messages above.kubectl logsshowsdesired resource state has changedwith a diff ofSpec.PassthroughBehavior nil→WHEN_NO_MATCH,Spec.TimeoutInMillis nil→29000, etc., followed by the rejected UpdateIntegration.Expected outcome
Server-defaulted members should be late-initialised into the desired state (or excluded from the delta when desired is nil) instead of being patched to null. Setting all five explicitly in the spec is a complete workaround and the resource then syncs and updates normally — but nothing in the CRD or docs tells a user to do that.
Environment
updateIntegrationInputinpkg/resource/integration/hooks.gois unchanged on 1.9.0)Related: #2926 / #2588 (a separate
httpMethodmapping issue that also surfaces as Terminal integrations).