NAME

comb-svg - Render Kubernetes::Comb custom resources from JSON as an SVG honeycomb

VERSION

version 0.001

SYNOPSIS

kubectl get combs -A -o json | comb-svg --group-label app.kubernetes.io/part-of > combs.svg
comb-svg combs.json --title "Lab" --columns 4 --no-legend > combs.svg
comb-svg combs.json --layout packed --aspect 16:9 --blink Error,Blocked --color Error=#ff0033 > monitor.svg
comb-svg combs.json --layout packed --rows 3 --color 'bg=#ffffff,#000000' > wall.svg
comb-svg --help

DESCRIPTION

Reads Kubernetes::Comb custom resources as JSON and writes one self-contained SVG honeycomb to standard output, drawn by Kubernetes::Comb::SVG, which describes the picture. The command never talks to a cluster: it draws what it is given, so the JSON comes from kubectl, a file or any other tool. The SVG is pure ASCII and the same input gives the same bytes.

The input is the file named as the one argument, or standard input when there is no argument or it is -. It is JSON, read as UTF-8, in one of three shapes: a List (a hash with items, as kubectl get combs -o json prints it), an array of custom resources, or one custom resource. More than one file is an error. Only the options below exist; the link option of the module is not available on the command line. Options are case-sensitive and must be spelled out in full.

An unknown phase, a missing status, a dependency on a name that is not in the input, a dependency cycle: all give a picture. An empty array gives a valid picture without cells.

Exit status

0 after the SVG was written, and for --help and --version. 1 on any error, with one line comb-svg: message on standard error and nothing on standard output: an unknown option or a bad option value, more than one input file, a file that cannot be read, invalid JSON, JSON that is neither an object nor an array, and an element without metadata.name.

OPTIONS

--title TEXT

Heading and <title> of the picture. Default Combs.

--group-label KEY

Label key (for example app.kubernetes.io/part-of) whose value names the group of a Comb. Groups are drawn under their own headings in name order, Combs without the label last. Without the option there are no groups.

--layout NAME

depth (the default) places a Comb below the Combs it depends on. packed is the status monitor: the Combs sorted by namespace/name fill one compact honeycomb, whatever they depend on, and the edges are left out unless --edges is given. Its grid comes from --columns, else --rows, else --aspect.

--columns N

Cells per row before a row wraps, a positive integer. Default 6; in the packed layout there is no default and the option fixes the grid.

--rows N

packed only, without --columns: the number of rows, a positive integer. The columns follow from the number of Combs.

--aspect W:H

packed only, without --columns and --rows: width to height of the area to fill, as 16:9, 16/9 or one number such as 1.78. The grid that comes closest to that shape is used. Default 16:9.

--size N

Radius of a hexagon in SVG units, a positive decimal number (no exponent); the rest of the picture scales with it. Default 56.

--no-edges

Leave out the dependency edges. They are drawn by default, except in the packed layout, where --edges draws them. Placement does not change.

--edges

Draw the dependency edges. Only needed with --layout packed, where they are left out by default.

--no-legend

Leave out the legend of the phases. It is drawn by default.

--color KEY=COLOUR

The colour of a phase (Running, Pending, Blocked, NeedsConfig, Disabled, Error, Stopped, NotDeployed or Unknown) or of a surface of the picture (bg, fg, muted, border, edge), the theme of the module. KEY=LIGHT,DARK gives one colour for light and one for dark mode; a comma inside parentheses, as in rgb(1,2,3), does not separate. Repeatable, the last one for a key wins. A key or a colour the module does not accept is ignored and the built-in colour stays; a value that is not KEY=... with one or two colours is an error.

comb-svg combs.json --color Error=#ff0033 --color 'bg=#ffffff,rgb(0,0,0)'

The phases whose cells pulse, separated by commas (Error,Blocked); repeatable. Phase names are the eight phases and Unknown, case-sensitive; a name that is no phase is ignored. Where the viewer asks for reduced motion the cells do not move and have a thicker outline instead. Without the option nothing is animated.

Period of the pulse in seconds, a positive decimal number (no exponent). Default 1.2.

--help

Print the usage and exit with status 0. The text is written by hand into the script and does not come from this documentation.

--version

Print comb-svg VERSION and exit with status 0.

SEE ALSO

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-kubernetes-comb-svg/issues.

IRC

Join #kubernetes on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <getty@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.