amazon-apigateway-ingress-controller
amazon-apigateway-ingress-controller copied to clipboard
Detect changes to the spec, and cause an update.
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.
Can you give me some examples ?
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
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