feature: zalando.org/forward-backend annotation support to enable migration to eks#716
Conversation
|
changes should be moved to the GenerateRouteGroup/GenerateDeployment etc. functions to fit into the current model |
…ration to eks
Usage:
```
apiVersion: zalando.org/v1
kind: StackSet
metadata:
annotations:
zalando.org/forward-backend: eks migration
..
```
This will execute the migration preparation, such that the next traffic switch will send the traffic to the forward backend.
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
…gration, too Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
feature: reduce resource waste by setting replicas to 1 for the new unused stack, that will not receive any traffic Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
… the future why we scale down to 1 fix: ExternalIngress has also to get the anntoation to be set, such that it can execute a migration as expected Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
a11ccdc to
ae8b458
Compare
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
| // GenerateHPA generates a hpa as configured in the | ||
| // stack. On cluster migrations set by stackset annotation | ||
| // "zalando.org/forward-backend", the hpa will be set to | ||
| // minReplicas = maxReplicass = 1. |
There was a problem hiding this comment.
We can just skip generating an HPA in this case, this is similar to if sc.ScaleDown() case below.
There was a problem hiding this comment.
My fear about removing objects we don't need is that we create alerts for the users and they overreact.
It's also not checking for traffic as we do in ScaleDown()
There was a problem hiding this comment.
We anyway have to document how this feature works and what to expect.
They could also "overreact" because of minReplicas/maxReplicas = 1 :)
There was a problem hiding this comment.
What do you think now?
I dropped HPA and deployment to not waste money.
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
not sure if this is major or minor, I tend to minor but the number of files of the change feels a bit more than minor. |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
The current PR crashes with recovered panics at runtime. This was fixed by the commit after the comment |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Deployment ChecklistThis change falls under the deployment policy. 💁 Since Nov 10th, we are in the RED deployment zone. This means all changes released to production must adhere to the following requirements:
👉 Regardless of which boxes you click in this comment, merge/deployment will not be blocked. |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
…cluster migration patched routegroups Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
I am done with this PR form my side. It was tested in pet cluster with |
|
👍 |
|
👍 |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
| // +k8s:deepcopy-gen=true | ||
| type StackSetExternalIngressSpec struct { | ||
| BackendPort intstr.IntOrString `json:"backendPort"` | ||
| EmbeddedObjectMetaWithAnnotations `json:"metadata,omitempty"` |
There was a problem hiding this comment.
I believe this was not used in the end because the annotation is set at stackset level and doesn't need to be at externalIngress level.
So we can drop this and re-generate to not change the CRD.
There was a problem hiding this comment.
FYI: fabricgateway will get its own annotation similar to the stackset annotation
|
Can we add an e2e test which shows that when the annotation is set it doesn't create stack resources (like deployment etc.) on the stacks which are created after the annotation is set? |
we create a deployment, because everything relies on having a deployment. |
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
|
👍 |
I think it's possible without too much effort, the existing e2e framework provides most of it. But let's iterate on this in a separate PR, we likely need to iterate a bit on this to make it all work with CDP etc. |
|
👍 |
feature: zalando.org/forward-backend annotation support to enable migration to eks
Usage:
This will execute the migration preparation, such that the next traffic switch will send the traffic to the forward backend.