96 lines
No EOL
1.6 KiB
Markdown
96 lines
No EOL
1.6 KiB
Markdown
---
|
|
level: 2
|
|
---
|
|
|
|
# Configuration
|
|
|
|
Configuration is based on a simple list of JSON objects.
|
|
|
|
````md magic-move {lines: true}
|
|
|
|
```js {1-4}
|
|
[
|
|
{},
|
|
{}
|
|
]
|
|
```
|
|
|
|
|
|
```js {2-10}
|
|
[
|
|
{
|
|
"name": "...",
|
|
"function": "...",
|
|
"params": [
|
|
"..."
|
|
],
|
|
"retryCount": int,
|
|
"shouldAbort": true|false
|
|
},
|
|
{}
|
|
]
|
|
```
|
|
|
|
```js {2-10}
|
|
[
|
|
{
|
|
"name": "ensure infctl namespace exists",
|
|
"function": "k8sNamespaceExists",
|
|
"params": [
|
|
"infctl"
|
|
],
|
|
"retryCount": 0,
|
|
"shouldAbort": true
|
|
},
|
|
{}
|
|
]
|
|
|
|
```
|
|
|
|
```js
|
|
[
|
|
{
|
|
"name": "ensure infctl namespace exists",
|
|
"function": "k8sNamespaceExists",
|
|
"params": [
|
|
"infctl"
|
|
],
|
|
"retryCount": 0,
|
|
"shouldAbort": true
|
|
},
|
|
{
|
|
"name": "check operator"",
|
|
"function": "RunCommand",
|
|
"params": [
|
|
"./scripts/check__operator.sh"
|
|
],
|
|
"retryCount": 5,
|
|
"shouldAbort": true
|
|
}
|
|
]
|
|
```
|
|
|
|
````
|
|
|
|
<!--
|
|
|
|
`infctl` uses a simple JSON list of objects to represent a pipeline of tasks
|
|
|
|
each object
|
|
|
|
* has a name
|
|
* calls a function
|
|
* an retry failed steps
|
|
* optionally exits on failure
|
|
|
|
a function may be internally implemented in `infctl`
|
|
|
|
there is currently only the one: `K8sNamespaceExists`
|
|
|
|
more may be added but this is for reference at this time and so as to illustrate how this may be implemented for other use cases
|
|
|
|
the majority of the time `infctl` uses `RunCommand` to execute scripts and executables
|
|
|
|
additionally, pipeline steps may be repeated so as to allow for some steps to be re-tried until complete or fail over time
|
|
|
|
--> |