Skip to content

stashymane/hoplite-swarm

Repository files navigation

Hoplite Docker Swarm preprocessor Package version

Allows fetching Docker Swarm secrets with Hoplite.

Available either through my personal repo, or GitHub Packages.

Repository

repositories {
    maven("https://repo.stashy.dev/releases")
}

Dependency

dependencies {
    implementation("dev.stashy.hoplite.swarm:hoplite-swarm:<version>")
}

Usage

To allow fetching Swarm secrets, just add the SwarmSecretPreprocessor() to your config loader.

val config = ConfigLoaderBuilder.default()
    .addPreprocessor(SwarmSecretPreprocessor())
    // ...
    .build()
    .loadConfigOrThrow<YourConfig>()

Then, to use your secret, prefix your secret name with swarm://.

services:
  hello-world:
    image: hello-world:latest
    secrets:
      - SECRET1
    environment:
      secret1: "swarm://SECRET1"

Keep in mind that this does not support the _FILE environment name convention common in other projects.

About

Docker Swarm secret preprocessor for Hoplite

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages