LogoLogo
PipekitPricingBlogPipekit StatusRelease Notes
  • Introduction
  • Getting Started
  • CLI
    • Cron Workflows
  • Pipekit Agent
    • Helm Install
  • Pipekit
    • Authentication
      • Okta
    • Runs
    • Pipes
      • Managing Pipes
        • Run Conditions
        • Secrets
        • Alerting
      • Pipe Runs
        • Run Graph (DAG)
        • Pod Logs
        • Workflow Logs
        • Workflow YAML
      • Cron Workflows
      • Externally Triggered Workflows
    • Metrics
    • Templates
    • Clusters
    • Organization
      • Creating an Organization
      • Managing Users
      • Managing Alert Providers
      • Settings
      • Permissions
  • Python SDK
    • Jupyter Notebooks
    • Python Scripts
  • Self-Hosting Pipekit
    • Dependencies and Pre-requisites
    • Container Images
    • Kubernetes Permissions
    • Self-Hosted Pipekit Helm Chart
    • License Key
    • Initial Login and Break Glass Account
    • Integrating with your Git Provider
    • Configuring SSO
  • Additional Information
    • Free Trial Cluster
  • REST API
Powered by GitBook
On this page
  • Environments
  • Adding Secrets to a Run Condition
  • Using Secrets in your Workflow
  1. Pipekit
  2. Pipes
  3. Managing Pipes

Secrets

You can store key value pairs in Pipekit and have them passed to your running workflow as environment variables.

Last updated 1 year ago

This feature is only available to Pipes that have been created via the Pipekit Web UI.

Environments

In order to store key-value pairs in Pipekit, you must first create an Environment. Environments can be mapped to a specific . For example, you could have a collection of secrets to be run in a development Run Condition, and another collection of secrets to be run in a production Run Condition, both running on different clusters, with different git events triggering them.

To create an Environment, go to the Pipe that you wish to manage, and click the Secrets tab. If there is not already an environment set up for this pipe, you will be prompted to choose an environment name and optional description.

If an environment already exists, click the + Add Environment button.

Once you have created an Environment, you can add secrets to it. Ensure the environment you wish to use is selected in the Environment dropdown, then add a key/value pair.

Click + Add Secret to add another key/value pair.

Continue until you have added all the secrets you wish to use, and then click Save.

Adding Secrets to a Run Condition

In order to pass the secrets to your running workflow, you must tell Pipekit which Environment each Run Condition should use. Go to the Run Conditions tab and select the environment you wish to use for each run condition. For more information, refer to the documentation.

Using Secrets in your Workflow

Key/value pairs are automatically mounted into your workflow as Environment variables. For example if you entered a key of MY_SECRET and a value of my-secret-value, you can access this in your workflow as MY_SECRET.

This example will output my-secret-value in the logs:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  name: test-secret
spec:
  entrypoint: test-secret
  templates:
    - name: test-secret
      container:
        image: ubuntu
        command:
            - /bin/bash
            - -c
            - |
            if [ "${MY_SECRET}" == "my-secret-value" ]
            then
                echo "Secrets are working!"
                echo ${MY_SECRET}
            else
                echo "Secrets are not working!"
                echo ${MY_SECRET}
                exit 1
            fi

Secrets are only made available to the Workflow that is triggered by the Run Condition. If you have a Workflow that triggers another Workflow or uses workflowTemplates, the secrets will not be passed to the second Workflow, or the workflowTemplate.

run condition
Run Conditions