Support Parsing ZTP Script via per-switch Configmap - #165
Conversation
5c7cf44 to
5d9bafb
Compare
Signed-off-by: Hardik Dodiya <hardik.dodiya@sap.com>
5d9bafb to
ea29a54
Compare
|
Is this feature to iterate quicker on ZTP script variants during development? I thought the point of us using templates was so we don't have to maintain individual ZTP scripts for each of the switches. Going forward, we should also have fewer instructions in the ZTP, which should be uniform for all switches (install the agent, which does the rest), right? |
That's correct. Agree, the idea is exactly what you have described. This PR is only an option to additionally be able to start the switch with custom ZTP(experimental/during dev) if required, without changing the template here. |
Proposed Changes
Add strict ConfigMap-based ZTP mode
Adds
--ztp-mode:templates(default): existing leaf/spine template behaviorconfigmap: serves the ZTP script from the ConfigMap referenced by the matchingSwitch.spec.ztpConfigMap mode matches the ZTP client source IP to
spec.ztp.sourceAddressand never falls back to templates.