amazon-apigateway-ingress-controller icon indicating copy to clipboard operation
amazon-apigateway-ingress-controller copied to clipboard

Detect changes to the spec, and cause an update.

Open MadVikingGod opened this issue 5 years ago • 3 comments

What Do you expect to happen Make a change to the spec, adding or removing a path, and have the apigateway updated to reflect that change.

What happens now Make a change to the spec, adding or removing a path, it checks if the CFN is complete and finishes.

We could accomplish this by adding a hash of the spec, or spec and other relevant information, as a tag. Then we can force an update if that tag doesn't match.

MadVikingGod avatar Apr 19 '19 14:04 MadVikingGod

Can you give me some examples ?

Santhoshkb7 avatar Apr 22 '20 14:04 Santhoshkb7

Using the example in the repo: If you update this:

spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: bookservice
          servicePort: 80
        path: /api/book

To this:

spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: bookservice
          servicePort: 80
        path: /api/bookservice

The API gateway paths are not updated.

However, I have found that if you then go on to change the client-arns annotation the stack will update both the client arns and the new paths. Which I assume is because of: https://github.com/awslabs/amazon-apigateway-ingress-controller/blob/912d0581ccc92b8874e5378db7b502cc01aaec32/pkg/controller/ingress/helpers.go#L69-L75

woodjme avatar May 22 '20 11:05 woodjme

This will help if i have to modify existing service, what if i want one more microservice to be added ..my apigateway pods wont get updated.

Ex: spec: rules:

  • http: paths:
    • backend: serviceName: bookservice servicePort: 80 path: /api/book to

spec: rules:

  • http: paths:
    • backend: serviceName: bookservice servicePort: 80 path: /api/book
    • backend: serviceName: notesservice servicePort: 80 path: /notes/book

Santhoshkb7 avatar May 27 '20 06:05 Santhoshkb7