Skip to content

About

Racetrack Plugin: Kubernetes Infrastructure controlling deployments through a git CI/CD

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Racetrack Plugin: Kubernetes Git/Kustomize Infrastructure

A Racetrack infrastructure plugin that deploys and monitors services on Kubernetes. Unlike the standard Kubernetes plugin, it does not apply Kubernetes objects directly to the cluster. Instead, it commits the generated definitions to a git repository and relies on an external CI/CD pipeline to apply them to the destination cluster. This makes it suitable for clusters where Racetrack does not hold write privileges, and produces persistent, auditable service definitions.

How it works

Deployment: When a job is deployed, the plugin generates Kubernetes object definitions — Deployments, Services, Secrets, and related resources — as Kubernetes YAML files. Secrets are encrypted with SOPS before being committed. The plugin pushes the resulting files to a configured git repository and branch. An external CI/CD pipeline watching that repository is responsible for applying the definitions to the cluster.

Monitoring: The plugin continuously monitors deployed services by querying the Kubernetes API and reports their status back to Racetrack.

Setup

  1. Set up a git repository that will hold the definitions for jobs created by this plugin. The repository must have a CI/CD pipeline configured to apply changes to the destination Kubernetes cluster in the same namespace as Racetrack. The pipeline must be able to decrypt SOPS-encrypted secrets; the SOPS public key must already be present in the repository.

  2. Set the following environment variables on the Lifecycle (and Lifecycle Supervisor) pods:

    Variable Description
    GIT_REPO URL of the git repository to push job definitions to
    GIT_BRANCH Branch to commit to
    GIT_USERNAME Username for commits
    GIT_REPO_WRITE_TOKEN Access token with write access (recommended: store as a Secret)
    KUSTOMIZE_JOBS_PATH Path in the repository where job definitions are created; a kustomization.yaml must already exist there
  3. Install the racetrack client

  4. To add racetrack to PATH, first set RACETRACK_HOME to the racetrack basedir, and then set PATH:

    PATH=$RACETRACK_HOME:$PATH
  5. build the plugin ZIP:

    make bundle
  6. Install the plugin via the Racetrack Dashboard Admin page or the CLI:

    racetrack plugin install kubernetes-git-kustomize-*.zip

About

Racetrack Plugin: Kubernetes Infrastructure controlling deployments through a git CI/CD

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages