Clone the sync repo and apply the specs to the Kubernetes cluster.
Consume stream of files from project and sort them by their path
property using localeCompare
. Any file at the root of the
project, i.e., not in a subdirectory, having the extensions
".json", ".yaml", or ".yml` are considered specs.
Essentially, this function converts a FileStream into a Promise of sorted ProjectFiles.
Repository of specs to sort
Sorted array of specs in project
Return a function that ensures all specs in syncRepo
have
corresponding resources in the Kubernetes cluster. If the resource
does not exist, it is created using the spec. If it does exist, it
is patched using the spec. Errors are collected and thrown after
processing all specs so one bad spec does not stop processing.
Kubernetes sync options
Generated using TypeDoc
Command to synchronize the resources in a Kubernetes cluster with the resource specs in the configured sync repo. The sync repo will be cloned and the resources applied against the Kubernetes API in lexical order sorted by file name. If no sync repo is configured in the SDM, the command errors. This command is typically executed on an interval timer by setting the
intervalMinutes
KubernetesSyncOptions.If the SDM configuration says this packs commands should be added, i.e.,
sdm.configuration.sdm.k8s.options.addCommands
istrue
, the command will have the intentkube sync SDM_NAME
. Otherwise the command will be registered without an intent.