Merge pull request #3470 from dahovey/master

Add Microsoft Visio stencil for icons
This commit is contained in:
Kubernetes Prow Robot 2019-11-01 10:25:24 -07:00 committed by GitHub
commit f994e620db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 2 deletions

View File

@ -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)

View File

@ -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}

View File

@ -0,0 +1,4 @@
#/bin/bash
./tools/rasterize.sh
./tools/update-visio.sh

13
icons/tools/update-visio.sh Executable file
View File

@ -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"

Binary file not shown.