kd
kd copied to clipboard
Don't block waiting for individual deployments
Waits until all resources have been created / updated before checking the roll-out of a deployment. This way it is possible to deploy quicker as deployments can roll-out parallel to one another.
Addresses #82.
@marcinc: The PR doesn't actually skip the watching it just defers it until the rest of the Kubernetes resources in a multi-resource YAML file have been created / updated.
hi @daniel-ac-martin, I like the feature but do kinda agree with @marcinc .. It fundamentally changes deployment behavior and should be gated with a flag .. You go even go the full hog and thread the watchResource .. or perhaps another PR
Okay. Well I can add a flag if you like. But it's worth pointing out that supporting both behaviours will complicate the code a little.
In terms of changing the deployment behaviour it's worth bearing in mind that it wasn't too long ago that multi-resource YAML files didn't support watching. Are many people using multi-resource YAML files?
If we do add a flag it also raises the question of what the default behaviour should be?
hey @daniel-ac-martin ... maybe i'm misreading the code but from a glance ...
- building a list of files https://github.com/UKHomeOffice/kd/pull/83/files#diff-7ddfb3e035b42cd70649cc33393fe32cL154
- reading and rendering each of those files in to
[]resources
https://github.com/UKHomeOffice/kd/pull/83/files#diff-7ddfb3e035b42cd70649cc33393fe32cL174 - and deploying each of the
[]resources
https://github.com/UKHomeOffice/kd/pull/83/files#diff-7ddfb3e035b42cd70649cc33393fe32cL192
throwing aside the yaml splitting .. if I have/had multiple deployments all of them are going to be deployed in one iteration and checked afterwards ... rather than before which was deploy and check, deploy and check .. etc which is a pretty big change
Ah, I didn't think about multiple files being deployed at once. (Didn't know that was supported!)