convert

command
v0.0.0-...-7d3294b Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Converter

This subdirectory contains the Go command which converts topology YAML to various formats.

The root main.go outputs a Cobra CLI for controlling the behavior of the program.

Conversion Outputs

  • Kubernetes (go run main.go kubernetes <topology_path> ...): Generates services and deployments for all topology services and the Fortio client to load test against them.

To generate the output for isotope mock services:

go run main.go kubernetes <topology_path> --service-image <isotope-service-image>  > output.yaml

To see all the options:

go run main.go kubernetes  --help
Using the examples

To generate the output for 2 services in a different namespace:

go run main.go kubernetes ../example-topologies/chain-2-services-different-namespaces.yaml \
    --service-image <isotope-service-image>  > output.yaml

To generate the output for specific services belonging to a given cluster name:

# For cluster1
go run main.go kubernetes ../example-topologies/chain-2-services-different-cluster.yaml \
    --service-image <isotope-service-image> --cluster cluster1  > cluster1.yaml

# For cluster2
go run main.go kubernetes ../example-topologies/chain-2-services-different-cluster.yaml \
    --service-image <isotope-service-image> --cluster cluster2  > cluster2.yaml
Using the container
docker run -it \
    -v $(pwd)/../example-topologies/chain-2-services-different-namespaces.yaml:/etc/config/service-graph.yaml  \
    <isotope-convert-image>  kubernetes --service-image <isotope-service-image>  > output.yaml

Deploy

You can build and deploy the image by your own, or to build and push the image with ko and a ephemeral registry in one command like follows:

export KO_DOCKER_REPO=ttl.sh/<my-prefix>-isotope-convert
ko build --bare -t 1h .

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
graphviz
Package graphviz converts service graphs into Graphviz DOT language.
Package graphviz converts service graphs into Graphviz DOT language.
kubernetes
Package kubernetes converts service graphs into Kubernetes manifests.
Package kubernetes converts service graphs into Kubernetes manifests.

Jump to

Keyboard shortcuts

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