Skip to content

Configuration

infctl uses json files for configuration.

It is designed around the idea of pipelines where each pipeline performs a series of steps.

A short, 2 step pipeline configuration can look like :

[
{
"name": "ensure inf namespace exists",
"function": "k8sNamespaceExists",
"params": ["infctl"],
"retryCount": 0,
"shouldAbort": true
},
{
"name": "create php configmap",
"function": "RunCommand",
"params": ["./scripts/create_php_configmap_ctl.sh"],
"retryCount": 0,
"shouldAbort": true
}
]

Each Object is a task.

Object task records are executed in a [] list and in sequence.

Each task has a name to be displayed in logs.

Each task calls a Function that is registered within infctl and that accepts params string, which are any parameters to be passed to that function, script or executable. The simplest example being RunCommand which accepts the path to a script or executable as its params. This can be anything but can be as simple as :

Terminal window
echo "hello world"
exit 0

So infctl is unlimited as to what it can use in its pipeline files to achieve any kind of automation.

If a task fails ( the script or program that is run returns a non zero value ) it may be re-tried up to retryCount times.

If a task fails the pipeline will stop running unless shouldAbort is set to false, in which case, the pipeline will continue to run with the next step item in the list.