command module
Version: v0.1.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2021 License: BSD-2-Clause Imports: 1 Imported by: 0


Asset Relocation Tool for Kubernetes

The Asset Relocation Tool for Kubernetes is a tool used for relocating Kubernetes assets from one place to another. It's first focus is on relocating Helm Charts, which is done by:

  1. Copying the container images referenced in the chart to a new image registry, and
  2. Modifying the chart with the updated image references.

The tool comes in the form of a CLI, named relok8s.

Running relok8s

$ relok8s chart move mysql-8.5.8.tgz --image-patterns mysql.images.yaml --registry
Pulling Done

Images to be pushed: (sha256:ae8c4c719352a58abc99c866986ee11578bc43e90d794c6705f7b1eb12c7289e)

Changes written to mysql/values.yaml:
Would you like to proceed? (y/N)

New chart: mysql-8.5.8.rewritten.tgz


The Asset Relocation Tool for Kubernetes requires a few inputs for the various commands.


Each command requires a Helm chart. The chart can be in directory format, or TGZ bundle. It can contain dependent charts.

Image Patterns File

The Asset Relocation Tool for Kubernetes requires an image patterns file. This file determines the list of images encoded in the helm chart.

- "{{ .image }}:{{ .tag }}",
- "{{ .proxy.image }}:{{ .proxy.tag }}",

This file is a list of strings, which can be evaluated like a template to reference the fully detailed image path.


The Asset Relocation Tool for Kubernetes allows for two rules to be specified on the command line:

--registry <registry>

This overwrites the image registry

Repository Prefix
--repo-prefix <string>

This modifies the image repository name for all parts except for the final word.

Rule Example Input Output
Repository Prefix mytenant

Running in CI

It may be useful to run relok8s inside a CI pipeline to automatically move a chart when there are updates. An example Concourse pipeline can be found here: docs/example-pipeline.yaml


Building the tool from source is very simple with:

$ make build
go build -o build/relok8s -ldflags "-X" ./main.go
pwall@pwall-a01:~/src/vmware-tanzu/asset-relocation-tool-for-kubernetes $ ls ./build/relok8s 


See Development


The Go Gopher

There is no documentation for this package.

Source Files


Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL