kube-backup icon indicating copy to clipboard operation
kube-backup copied to clipboard

better clusterIP filtering logic, add default services

Open memory opened this issue 5 years ago • 7 comments

  • pull the inline python one-liner out into a separate script so that we can:

  • apply better logic around filtering out service.spec.clusterIP: if the value is "None" that's a headless service and not preserving the value will result in the creation of a NON-headless service, which is likely to be extremely wrong.

  • set explicit_start=True in the call to pyyaml.safe_dump() so that backup files can be safely concatenated together

  • add serviceaccount to the list of default resources

  • update the README with the current defaults

  • add EXTRA_ env vars for the resource lists so that they can be appended to as well as overwritten

memory avatar Sep 19 '19 01:09 memory

n.b. I spent a little bit of time trying to figure out if there was a straightforward way of doing a conditional key deletion in JQ's query language and did not make much progress, but I won't claim that it's not possible.

memory avatar Sep 19 '19 01:09 memory

Excellent, good catch on the headless services! This script was written before those existed..

Could you remove backendconfigs from the default resources though? Its not portable.

pieterlange avatar Sep 19 '19 07:09 pieterlange

Fair enough about the backendconfig, and this reminded me that I wanted to also make it a little easier to simply append to the resource list rather than overwrite it.

memory avatar Sep 19 '19 15:09 memory

@pieterlange comments addressed, look good?

memory avatar Sep 23 '19 16:09 memory

Sorry for the delay. Looks good, but i'm gonna try to catch this logic in jq instead so we don't deviate too much from the "this is just a shellscript project" concept. Will merge after i've done that.

pieterlange avatar Sep 27 '19 10:09 pieterlange

Ping? :)

memory avatar Nov 11 '19 18:11 memory

Poke -- did you have any luck trying to port this logic into jq?

memory avatar May 18 '20 16:05 memory