n25/pages/config-slide.md

96 lines
1.6 KiB
Markdown
Raw Normal View History

2025-08-13 15:48:45 +01:00
---
level: 2
---
# Configuration
Configuration is based on a simple list of JSON objects.
2025-08-13 15:48:45 +01:00
````md magic-move {lines: true}
```js {1-4}
[
{},
{}
]
```
```js {2-10}
2025-08-13 15:48:45 +01:00
[
{
"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
-->