Skip to content

A library of PlantUML sprites from the Kubernetes Community Icon Set.

License

Notifications You must be signed in to change notification settings

Cerebus/k8s-plantuml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubernetes Sprites for PlantUML

A library of PlantUML sprites for Kubernetes, derived from the Kubernetes Community icons set.

Getting Started

This library provides two usages; as a “normal” spite tile on a rectangle object, and as a header on a “container” object (also implemented as a rectangle).

K8S(alias, kind, label, color)
K8S_BOUNDARY(alias, kind, label, color)

In both cases “color” defaults to #326ce5 (Kubernetes blue) and is optional.

Include the sprite definitions and common.puml following the example below. This library follows the structure of the community icon library.Each directory has one all.puml file that includes all that directory’s sprites. common.puml defines the macros that use them.

Note: Due to limitations of PlantUML, all sprites use underscores in place of dashes. For example, the sprite for “k-proxy” is named “k_proxy”.

@startuml
!define k8s https://raw.githubusercontent.com/Cerebus/k8s-plantuml/master/k8s
!include k8s/common.puml
!include k8s/infrastructure_components/unlabeled/all.puml
!include k8s/control_plane_components/labeled/all.puml

K8S(node1, node, Node 1)
K8S(node2, node, Node 2)

K8S_BOUNDARY(control, control_plane, Control Plane) {
    K8S(api, api, kube-apiserver)
    K8S(cm, c_m, kube-controller-manager)
    K8S(proxy, k_proxy, kube-proxy)
    K8S(sched, sched, kube-scheduler)
}

K8S(etcd, etcd, Etcd)
@enduml

Building the sprite library

Prerequisites

  • rsvg-convert - Converts SVG to PNG
  • plantuml.jar - Obviously
  • GNU make

Update icons from upstream

kpt embeds the upstream SVG files in this repository, under src/. Update these files with the following command.

kpt pkg update src/@master --strategy force-delete-replace

Build the library

Set the environment variable PLANTUML to your PlantUML installation and run make.

PLANTUML=/usr/local/etc/plantuml.jar make

By default, sprites build in the k8s/ directory but can be overridden with the DEST environment variable.

License

See LICENSE.

Authors

Acknowledgements

About

A library of PlantUML sprites from the Kubernetes Community Icon Set.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published