How to define variables/constants in KeepHQ (K8s hosted) and reference them in workflows? #5303
Replies: 2 comments 1 reply
-
Hi @MikhailOnyanov! I'm Dosu and I’m helping the keep team. You can define reusable variables/constants in KeepHQ workflows by adding a consts block at the top of your workflow YAML. For example: consts:
base_url: "https://api.example.com"
default_headers:
Authorization: "Bearer xyz"
slack_channels:
sre_team: CH00001
payments_team: CH00002 Reference these constants in your workflow steps or actions using templating syntax, like steps:
- name: call-api
provider:
type: http
with:
url: "{{ consts.base_url }}/endpoint"
headers: "{{ consts.default_headers }}" There is no UI for managing these variables/constants—they are defined directly in the workflow YAML files. For sensitive values, use Kubernetes Secrets and inject them as environment variables into your KeepHQ pods; this is separate from workflow-level constants and is managed at the infrastructure level, not in the workflow YAML or UI source source. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
Hey @MikhailOnyanov, We currently do not support consts/variables/secrets that are shared throughout entire workflows, but it's a great idea to add to Keep. Would you consider contributing it? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!
I’m running KeepHQ in a self-hosted Kubernetes setup and I'm wondering how to define reusable variables/constants and access them from workflows.
What I want to do:
Is there UI for this?
Beta Was this translation helpful? Give feedback.
All reactions