diff options
| author | Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com> | 2019-11-01 10:25:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-01 10:25:24 -0700 |
| commit | f994e620db510595fcf394c00d4a570f0478428f (patch) | |
| tree | f8dbbe46e899d0c30c2ac122a5d802f01db73c8b | |
| parent | 2a656f46492fb074cdb36d8413721db52078654b (diff) | |
| parent | 668b6b9e610b7ba2a0d65a9484231cec01857682 (diff) | |
Merge pull request #3470 from dahovey/master
Add Microsoft Visio stencil for icons
| -rw-r--r-- | icons/README.md | 22 | ||||
| -rw-r--r-- | icons/tools/build-visio-stencil-creator.sh | 24 | ||||
| -rwxr-xr-x | icons/tools/update-everything.sh | 4 | ||||
| -rwxr-xr-x | icons/tools/update-visio.sh | 13 | ||||
| -rw-r--r-- | icons/visio/kubernetes-visio-stencil.vssx | bin | 0 -> 816603 bytes |
5 files changed, 61 insertions, 2 deletions
diff --git a/icons/README.md b/icons/README.md index 20c8effb..582e52b5 100644 --- a/icons/README.md +++ b/icons/README.md @@ -2,7 +2,15 @@ These icons are a way to standardize Kubernetes architecture diagrams for presentation. Having uniform architecture diagrams improve understandibility. -## Generate png icons from svg +## Tools + +```shell +./tools/update-everything.sh +``` + +This script generates png from svg, and Visio Stencil from png. + +### Generate png icons from svg ```shell ./tools/rasterize.sh @@ -10,9 +18,19 @@ These icons are a way to standardize Kubernetes architecture diagrams for presen This script will convert all svg into png. It's based on a docker container defined [here](hack/svgconvertor/Dockefile) +### Generate Visio Stencil from png icons + +```shell +./tools/update-visio.sh +``` + +This script will convert png icons into Visio stencil using project from [here](https://github.com/hoveytechllc/visio-stencil-creator) + +A Docker image hosted on GCR (`k8s.gcr.io/visio-stencil-creator`), is used to generate the Visio stencil file. The script [./tools/build-visio-stencil-creator.sh](./tools/build-visio-stencil-creator.sh) can be used to update the Docker image if it needs to be built. + ## How to use these icons -Each icons can be found in differents formats +Each icon can be found in differents formats * [png](png) * [svg](svg) diff --git a/icons/tools/build-visio-stencil-creator.sh b/icons/tools/build-visio-stencil-creator.sh new file mode 100644 index 00000000..94e707a1 --- /dev/null +++ b/icons/tools/build-visio-stencil-creator.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +GITHUB_ORG="hoveytechllc" +REPO_NAME="visio-stencil-creator" +TAG_NAME="v1.0" + +GCR_REPO="gcr.k8s.io/${REPO_NAME}:${TAG_NAME}" + +rm -fdr ./tools/${REPO_NAME} + +# Clone repository in current path +git clone --branch release/${TAG_NAME} https://github.com/${GITHUB_ORG}/${REPO_NAME}.git ./tools/${REPO_NAME} + +# build image using Dockerfile from github repository +# Tag resulting image for pushing to k8s.gcr.io +docker build \ + -t ${GCR_REPO} \ + -f ./tools/${REPO_NAME}/Dockerfile \ + ./tools/${REPO_NAME} + +# Clean up source code +rm -fdr ./tools/${REPO_NAME} + +docker push ${GCR_REPO}
\ No newline at end of file diff --git a/icons/tools/update-everything.sh b/icons/tools/update-everything.sh new file mode 100755 index 00000000..da7ed4d9 --- /dev/null +++ b/icons/tools/update-everything.sh @@ -0,0 +1,4 @@ +#/bin/bash + +./tools/rasterize.sh +./tools/update-visio.sh
\ No newline at end of file diff --git a/icons/tools/update-visio.sh b/icons/tools/update-visio.sh new file mode 100755 index 00000000..05b50c14 --- /dev/null +++ b/icons/tools/update-visio.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +ICONS_PATH=${PWD} +DOCKER_IMAGE_REPO="k8s.gcr.io/visio-stencil-creator:v1.0" + +# Run docker image that generates Visio stencil +# using png images. +docker run \ + -v ${ICONS_PATH}:/app/content \ + ${DOCKER_IMAGE_REPO} \ + "--image-pattern=**/labeled/*-256.png" \ + "--image-path=/app/content/png" \ + "--output-filename=/app/content/visio/kubernetes-visio-stencil.vssx" diff --git a/icons/visio/kubernetes-visio-stencil.vssx b/icons/visio/kubernetes-visio-stencil.vssx Binary files differnew file mode 100644 index 00000000..eba36a70 --- /dev/null +++ b/icons/visio/kubernetes-visio-stencil.vssx |
