Skip to content

IntelliJ Platform Plugin Build that adds a context menu to transform a Yaml property file into a key=value list that can be used with the Docker command line or a Kubernetes configmap.

Notifications You must be signed in to change notification settings

gamachec/yaml2env

Repository files navigation

Yaml2env IntelliJ Platform Plugin

Build Version Downloads

Adds a context menu to transform a Yaml property file into a key=value list that can be used with the Docker command line or a Kubernetes configmap.

https://github.com/gamachec/yaml2env

Yaml converter use Spring Boot relaxing binding to transform the keys :

  • Replace dots (.) with underscores (_)
  • Remove any dashes (-)
  • Convert to uppercase

Usage

Use this plugin to create an envfile from a Spring Boot property file. You can then adapt the content, and use it to test your Docker images locally or using a Kubernetes configmap.

  • Select your application(-profile).yaml
  • Click on 'Convert Yaml to Env' menu
  • Paste the content and adapt values to your needs
  • Save the file or use values on IntelliJ IDEA runner environment option

Usage example with docker :

docker run --env-file /path/to/myenv.txt 

Usage example with docker-compose :

docker compose --env-file /path/to/myenv.txt up

Usage example with k8s configmap :

kubectl create configmap my-config-map --from-env-file=/path/to/myenv.txt

Installation

  • Using IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "yaml2env" > Install Plugin

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.

About

IntelliJ Platform Plugin Build that adds a context menu to transform a Yaml property file into a key=value list that can be used with the Docker command line or a Kubernetes configmap.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published