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

[apigatewayv1] Manual HTTP Method Creation Required for Resource Integration Setup #2360

Open
avishaig1986 opened this issue Feb 26, 2025 · 0 comments
Labels
needs-investigation Indicates an issue needs some investigation. service/apigateway Indicates issues or PRs that are related to apigateway-controller.

Comments

@avishaig1986
Copy link

Describe the bug
api gateway v1 - https://github.com/aws-controllers-k8s/apigateway-controller

Issue with Creating Integration for Resource in AWS API Gateway V1

There is a limitation when attempting to create an Integration for a Resource. The current process requires the HTTP method to be manually established for the Resource using command line tools or Terraform before an Integration can be created. This step cannot be bypassed or automated within the current workflow, causing an additional manual step in the integration process.

Impact:

This constraint complicates the process of setting up integrations, as it necessitates manual intervention to define the HTTP method on the Resource before proceeding. This manual step can hinder automation efforts, making it more challenging to streamline deployment and integration workflows, particularly in environments that rely heavily on Infrastructure as Code (IaC) and automated pipelines.

Steps to reproduce
Apply the following yaml file in the cluster

apiVersion: apigateway.services.k8s.aws/v1alpha1
kind: RestAPI
metadata:
  name: example-restapi-name
spec:
  name: example-restapi-name
  description: "api-gateway-description"
  endpointConfiguration: 
    types:
      - PRIVATE
---
apiVersion: apigateway.services.k8s.aws/v1alpha1
kind: Resource
metadata:
  name: example-resource-name
spec:
  restAPIID: dev-hcp.export-root-resource-id
  restAPIRef:
    from:
      name: example-restapi-name
  parentID: example-the-parentid-of-restapi
---
apiVersion: apigateway.services.k8s.aws/v1alpha1
kind: Integration
metadata:
  name: integration-name
spec:
  resourceRef: 
    from: 
      name: example-resource-name
  restAPIRef: 
    from: 
      name: example-restapi-name
  httpMethod: POST
  integrationHTTPMethod: POST
  type: AWS_PROXY
  uri: example-uri-to-aws-resource

Expected outcome
Integration should create the http method by automatically by itself, or the ACK should have another kind that creates the http request.

Actual Result
The following error displayed in the .status.conditions:
"NotFoundException: Invalid Method identifier specified"

status:
  ackResourceMetadata:
    ownerAccountID: "00000000000"
    region: eu-central-1
  conditions:
    - lastTransitionTime: 2025-02-26T10:10:14Z
      status: "True"
      type: ACK.ReferencesResolved
    - message: "NotFoundException: Invalid Method identifier specified"
      status: "True"
      type: ACK.Terminal
    - lastTransitionTime: 2025-02-26T10:10:14Z
      message: Resource not synced
      reason: resource is in terminal condition
      status: "False"
      type: ACK.ResourceSynced

Environment
EKS Kubernetes version - 1.31
AWS service targeted - Lambda Functions

@michaelhtm michaelhtm added needs-investigation Indicates an issue needs some investigation. service/apigateway Indicates issues or PRs that are related to apigateway-controller. labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-investigation Indicates an issue needs some investigation. service/apigateway Indicates issues or PRs that are related to apigateway-controller.
Projects
None yet
Development

No branches or pull requests

2 participants