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.
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.
-
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.
-
Set the following environment variables on the Lifecycle (and Lifecycle Supervisor) pods:
Variable Description GIT_REPOURL of the git repository to push job definitions to GIT_BRANCHBranch to commit to GIT_USERNAMEUsername for commits GIT_REPO_WRITE_TOKENAccess token with write access (recommended: store as a Secret) KUSTOMIZE_JOBS_PATHPath in the repository where job definitions are created; a kustomization.yamlmust already exist there -
Install the racetrack client
-
To add racetrack to
PATH, first setRACETRACK_HOMEto the racetrack basedir, and then setPATH:PATH=$RACETRACK_HOME:$PATH
-
build the plugin ZIP:
make bundle
-
Install the plugin via the Racetrack Dashboard Admin page or the CLI:
racetrack plugin install kubernetes-git-kustomize-*.zip