ske-operations/README.md

42 lines
1.9 KiB
Markdown

# SKE Operations Action
This action calls SKE cluster operations from your pipelines.
## Usage
To use this action in your workflow, reference it as a step.
The action assumes that the STACKIT CLI and jq are installed.
If you're using the [install-stackit-cli action](https://stackit-solutions.git.onstackit.cloud/actions/install-stackit-cli), then these applications will already be installed for you.
You also require a STACKIT service account key.
The key must be tied to a service account which has editor privileges on SKE resources.
```yaml
- name: Install STACKIT CLI
uses: https://stackit-solutions.git.onstackit.cloud/actions/install-stackit-cli@v1
- name: Hibernate cluster
uses: https://stackit-solutions.git.onstackit.cloud/actions/ske-operations@v1
with:
action: hibernate
region: eu01
project-id: 01234567-89ab-cdef-0123-456789abcdef
cluster-name: foo-cluster
service-account-key: ${{ secrets.STACKIT_SERVICE_ACCOUNT_KEY }}
```
## Inputs
- `action` (Required): Operation to perform. Must be one of: `wake`, `hibernate`, `reconcile`, `maintenance`.
- `region` (Required): Data center region of SKE cluster.
- `project-id` (Required): STACKIT project ID.
- `cluster-name` (Required): Name of SKE cluster.
- `service-account-key` (Optional): JSON representation of STACKIT service account key.
- `service-account-key-file` (Optional): Path to STACKIT service account key file.
- `timeout-seconds` (Optional): Time in seconds after which target state check fails. Default is `900`.
- `interval-seconds` (Optional): Time in seconds between target state checks. Default is `5`.
- `wait` (Optional): Wait until target state of operation has been reached. Default is `true`.
> **Note:** Either `service-account-key` or `service-account-key-file` must be set.
> If neither is set, the action will fail.
> If both are set, then `service-account-key-file` will be used.