Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/user/aws/install_upi: Add 'sed' call to zero compute replicas
This isn't strictly required, because we're removing the resulting MachineSets right afterwards. It's setting the stage for a future where 'replicas: 0' means "no MachineSets" instead of "we'll make you some dummy MachineSets". And we can always remove the sed later if that future ends up not happening. The sed is based on [1], to replace 'replicas' only for the compute pool (and not the control-plane pool). While it should be POSIX-compliant (and not specific to GNU sed or other implementations), it is a bit finicky for a few reasons: * The range matching will not detect matches in the first line, but 'replicas' will always follow its parent 'compute', so we don't have to worry about first-line matches. * 'compute' sorts before 'controlPlane', so we don't have to worry about their 'replicas: ' coming first. * 'baseDomain' is the only other property that sorts before 'compute', but 'replicas: ' is not a legal substring for its domain-name value, so we don't have to worry about accidentally matching that. * While all of the above mean we're safe for now, this approach could break down if we add additional properties in the future that sort before 'compute' but do allow 'replicas: ' as a valid substring. [1]: https://stackoverflow.com/a/33416489
- Loading branch information