API Reference
INFCTL CLI API Reference
Section titled “INFCTL CLI API Reference”API Reference
Section titled “API Reference”This document provides a reference for the API and CLI usage of the INFCTL CLI tool
PipelineStep Structure
Section titled “PipelineStep Structure”Each pipeline step is defined as:
name
: Step name (string)function
: Function to call (string)params
: List of parameters (array of strings)retryCount
: Number of retries (integer)shouldAbort
: Whether to abort on failure (boolean)
Available Functions
Section titled “Available Functions”k8sNamespaceExists
Section titled “k8sNamespaceExists”Checks if a Kubernetes namespace exists.
- Params:
[namespace]
(string) - Returns: error if namespace does not exist
RunCommand
Section titled “RunCommand”Runs a shell command.
- Params:
[command]
(string) - Returns: error if command fails
Example Pipeline JSON
Section titled “Example Pipeline JSON”[ { "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 }]
- Only functions defined in the codebase are available for use in pipelines.
- The API does not expose any HTTP endpoints; all orchestration is via CLI and pipeline JSON.