tyk-operator
tyk-operator copied to clipboard
CONCEPT: CLI to pull APIs from an existing Tyk installation and convert to K8s YAML format
Concept
Is there a reason thepkg/snapshot/README.md is not inside the docs directory? It would also be great to reference this file from within the homepage so that it is easy to discover and navigate to.
@buraksekili Looks good to me. You will also need to update screenshot because it is still referring to k8sNs
field of configData
Updated @komalsukhani 👍
Hi @buraksekili
Thanks for the updates.
About the k8s metadata names - rather than output files with invalid metadata names in it, how about we make it mandatory to have "k8sName" configured in config data? Reasons for doing this:
- It make the export process 'repeatable' without further manual changes required by user on output file.
- The security policies exported will also be usable with the correct reference of API names in access rights array.
Propose logic:
- When exporting API, check if the API have required config data (k8sName). If not, output a WARNING message and not include that API in output.
- When exporting policy, check If a policy reference to an API without k8sName config, output a WARNING message and not include that policy in output.
cc @asoorm @komalsukhani
how about we make it mandatory to have "k8sName" configured in config data?
I love this - it's much cleaner and simpler - and makes it explicit which apis to export. It also is better than faffing round with arrays and incrementing Ids
- When exporting API, check if the API have required config data (k8sName). If not, output a WARNING message and not include that API in output.
- When exporting policy, check If a policy reference to an API without k8sName config, output a WARNING message and not include that policy in output.
Need some clearer picture here why / how to warn the user - e.g. if k8sName
doesn't exist how can we issue a warning when the output is a yaml? Perhaps it should just fail with non 0 exit code if they try to export an API without a k8sName?
Need some clearer picture here why / how to warn the user - e.g. if
k8sName
doesn't exist how can we issue a warning when the output is a yaml? Perhaps it should just fail with non 0 exit code if they try to export an API without a k8sName?
@asoorm, what I had in mind is that if no valid config data is provided, let's not generate the output file and instead print a message to the console to inform users about invalid APIs. What do you think?