score-helm
4 minute read
Overview
The score-helm CLI allows developers to translate their Score specification into Helm values files. Below you’ll find an overview of:
For additional details and opportunities to contribute to the project, visit the score-helm GitHub repository.
Installation
You can install the score-helm CLI in a variety of ways:
Homebrew
Prerequisites: You must have brew installed.
brew install score-spec/tap/score-helm
Go
Prerequisites: You must have Go installed.
go install -v github.com/score-spec/score-helm/cmd/score-helm@latest
Docker
Prerequisites: You must have Docker installed.
- Download the repository. The following example uses the GitHub CLI to download the project.
gh repo clone score-spec/score-helm
- Change directories into
score-helm
.
cd score-helm
- Build the Docker image by running the following command in the same directory as the Dockerfile.
docker build -t score-helm:latest .
- Run the Docker image by using the
docker run
command.
docker run -it score-helm:latest
If you want to run score-helm
with the --help
flag to view the available options, you would run the following command.
docker run -it score-helm:latest --help
This will start a new container based on the image you built, run score-helm
with the --help
flag, and then stop the container.
Manual download
The following methods download the score-helm CLI from its GitHub release page:
1. Download the latest release from the GitHub release page:
wget https://github.com/score-spec/score-helm/releases/download/<x.y.z>/score-helm<x.y.z>_<os_system>.tar.gz
2. Unpack the latest release
tar xvzf score-helm.tgz
The following is the output of the previous command:
x LICENSE
x README.md
x score-helm
3. Clean up the tar file
rm score-helm.tgz README.md LICENSE
4. Move the binary to PATH
sudo mv ./score-helm /usr/local/bin/score-helm
sudo chown root: /usr/local/bin/score-helm
You’ve successfully installed the score-helm CLI!
1. Download the latest release from the GitHub release page:
wget https://github.com/score-spec/score-helm/releases/download/<x.y.z>/score-helm<x.y.z>_<os_system>.tar.gz
You should see something similar to the following output:
Saving to: score-helm<x.y.z>_<os_system>.tar.gz
score-helm_<x.y.z> 100%[===================>] 2.85M 5.28MB/s in 0.5s
2. Install into your local
directory
In your terminal, enter the following to create the score-spec
directory.
cd /usr/local/bin/
# create the directory if needed
mkdir -pv score-spec
Extract the compressed Tar file (You may need to run this command with elevated permissions):
tar -xvzf ~/<your-path>/score-helm_<x.y.z>_<os_system>.tar.gz
You should see the following output:
x LICENSE
x README.md
x score-helm
3: Export PATH
Future terminal sessions may require you add this path to your ~/.zshrc
or ~/.bashrc
file, if it isn’t there already.
export PATH=$PATH:/usr/local/bin/
4: Verify installation
score-helm --version
The command returns the following output:
score-helm <x.y.z>
You’ve successfully installed the score-helm CLI!
1. Download the latest compressed Tar file for your operating system from the GitHub release page. By default, the tarball will be saved to your ~/Downloads
directory. If you choose to use a different location, you’ll need to change that in the following steps.
score-helm.y.z_osx-amd64.tar.gz
2. Install into your local
directory
In your terminal, enter the following to create the score-spec
directory.
cd /usr/local/bin/
# create the directory if needed
mkdir -pv score-spec
Extract the compressed Tar file (You may need to run the previous command with elevated permissions).
tar -xvzf ~/Downloads/score-helm<x.y.z>_darwin_arm64.tar.gz -C /usr/local/bin/
You should see the following output:
x LICENSE
x README.md
x score-helm
3. Export PATH
Future terminal sessions may require you add this path to your ~/.zshrc
or ~/.bashrc
file, if it isn’t there already.
export PATH=$PATH:/usr/local/bin/
4. Verify installation
score-helm --version
The command returns the following output:
score-helm x.y.z
You’ve successfully installed the score-helm CLI!
1. Download the latest release from the GitHub release page.
2. Decompress the zip
file, and move the binary to your PATH
.
You’ve successfully installed the score-helm CLI!
CLI Reference
The score-helm CLI provides a set of commands and flags to enable the generation of Helm values files from Score specifications.
Commands
run
Translates the Score file into a Helm values.yaml
file.
score-helm run --file ./score.yaml \
--output ./values.yaml
Flags
The run
command can be combined with the following flags:
--file
| -f
Specifies a Score file to initialize. By default this is ./score.yaml.
score-helm run -f ./another-score.yaml
--help
| -h
Help for the run
command.
score-helm run -h
--output
| -o
The output location of the helm file. Uses the default value ./helm.yaml
if the flag isn’t specified.
score-helm run -f ./score.yaml -o ./another-helm.yaml
--overrides
Specifies the path to the override file. Uses the default value ./overrides.score.yaml
if the flag isn’t specified.
score-helm run -f ./score.yaml \
-o ./values.yaml \
--overrides ./overrides.score.yaml
--property
Overrides selected property value.
--values
Specifies the path that declares reference dependencies, or resource property, values that are environment-specific.
score-helm run -f ./score.yaml --values ./env.yaml -o ./values.yaml
--verbose
Enables a stream to which error messages are sent.
score-helm run -f ./score.yaml -o ./values.yaml --verbose
Examples
Explore examples for score-helm in the examples library on GitHub.
If you encounter any issues or have questions, feel free to reach out to us in the Score community Slack.