Skip to content

apigateway-controller: Integration update sends replace with null for server-defaulted fields (responseTransferMode, passthroughBehavior, timeoutInMillis, cacheNamespace, connectionType) and goes Terminal #3032

Description

@heinreyneke-mama

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

  1. Create a RestAPI, a Resource under its root and a GET Method with authorizationType: NONE.
  2. 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/
  1. 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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.service/apigatewayIndicates issues or PRs that are related to apigateway-controller.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions