Bootstrap the Satellite using Kubernetes
This topic describes the steps of how to use Kubernetes secrets to provide configuration details when setting up the Harness SEI Satellite agent.
Step 1: Write a Custom Dockerfile Wrapper
Create a custom Dockerfile that wraps around the existing satellite image. In this container, install the necessary commands like kubectl
, which will be used to fetch the Kubernetes secrets at runtime.
Note: This code snippet is a sample and should be adjusted to your specifications.
The Dockerfile above creates a Docker Container based on the Satellite image, sets up the required directory and installation of kubectl
, and copies the required files over to the directories.
Step 2: Write the start.sh
Script
start.sh
ScriptThis script is invoked at the start of the Dockerfile. It performs the following tasks:
Fetch the required Kubernetes Secrets
Use
sed
to replace the secret values in the YAML with actual valuesStart the Satellite Java process
Note that the YAML file provided to the satellite is expected to contain the following placeholders:
HARNESS_SEI_API_TOKEN
JIRA_TOKEN
Replace the HARNESS_SEI_API_TOKEN
and JIRA_TOKEN
placeholders with the actual secret values retrieved from the Kubernetes secrets.
Last updated