Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Use official plantuml image for diagrams #9328

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ BIN_DIR := bin
TEST_DIR := test
TOOLS_DIR := hack/tools
TOOLS_BIN_DIR := $(abspath $(TOOLS_DIR)/$(BIN_DIR))
DOCS_DIR := docs
E2E_FRAMEWORK_DIR := $(TEST_DIR)/framework
CAPD_DIR := $(TEST_DIR)/infrastructure/docker
CAPIM_DIR := $(TEST_DIR)/infrastructure/inmemory
Expand Down Expand Up @@ -154,6 +155,8 @@ YQ_BIN := yq
YQ := $(abspath $(TOOLS_BIN_DIR)/$(YQ_BIN)-$(YQ_VER))
YQ_PKG := github.com/mikefarah/yq/v4

PLANTUML_VER := 1.2023

GINKGO_BIN := ginkgo
GINGKO_VER := $(call get_go_version,github.com/onsi/ginkgo/v2)
GINKGO := $(abspath $(TOOLS_BIN_DIR)/$(GINKGO_BIN)-$(GINGKO_VER))
Expand Down Expand Up @@ -571,7 +574,16 @@ generate-metrics-config: $(ENVSUBST_BIN) ## Generate ./hack/observability/kube-s

.PHONY: generate-diagrams
generate-diagrams: ## Generate diagrams for *.plantuml files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's a good idea, but wondering if we should run this in CI with a corresponding verify target
(I assume the resulting png files are reproducible)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're doing a basic verification - that the images don't disappear - using the link checker - I don't know if we really need something more advanced, but can look into it and take it as a follow up.

One issue is we also host a couple of svg images which are not generated by plantuml AFAIK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I leave it up to you. I'm fine with just this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a bunch of images that are not generated from plantuml - list is below:

I'm not going to add a verify target in this PR - but I'll open an issue mentioning the current issues. I think this was supposed to be followed up from #7033 but was missed.

        deleted:    docs/book/src/images/describe-cluster-disable-grouping.png
        deleted:    docs/book/src/images/describe-cluster-echo.png
        deleted:    docs/book/src/images/describe-cluster-how-grouping-works.png
        deleted:    docs/book/src/images/describe-cluster-show-conditions.png
        deleted:    docs/book/src/images/describe-cluster.png
        deleted:    docs/book/src/images/introduction.png
        deleted:    docs/book/src/images/runtime-sdk-lifecycle-hooks.png
        deleted:    docs/proposals/images/capi-provider-operator/fig3.png
        deleted:    docs/proposals/images/capi-provider-operator/fig4.png
        deleted:    docs/proposals/images/clusterctl-redesign/components.png
        deleted:    docs/proposals/images/conditions/cluster-provision-workflow.png
        deleted:    docs/proposals/images/conditions/upgrade-workflow.png
        deleted:    docs/proposals/images/externally-managed-cluster-infrastructure/infrastructure.png
        deleted:    docs/proposals/images/in-place-propagation/current-state.png
        deleted:    docs/proposals/images/in-place-propagation/optional-changes.png
        deleted:    docs/proposals/images/in-place-propagation/proposed-changes.png
        deleted:    docs/proposals/images/ipam-integration/consumption.png
        deleted:    docs/proposals/images/ipam-integration/sequence.png
        deleted:    docs/proposals/images/machine-states-preboot/Figure2.png
        deleted:    docs/proposals/images/runtime-hooks/runtime-hooks.png
        deleted:    docs/proposals/images/runtime-sdk/overview.png
        deleted:    docs/proposals/images/runtime-sdk/swagger-ui.png

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(MAKE) -C docs diagrams
$(MAKE) generate-diagrams-book
$(MAKE) generate-diagrams-proposals

.PHONY: generate-diagrams-book
generate-diagrams-book: ## Generate diagrams for *.plantuml files in book
sbueringer marked this conversation as resolved.
Show resolved Hide resolved
docker run -v $(ROOT_DIR)/$(DOCS_DIR):/$(DOCS_DIR)$(DOCKER_VOL_OPTS) plantuml/plantuml:$(PLANTUML_VER) /$(DOCS_DIR)/book/**/*.plantuml

.PHONY: generate-diagrams-proposals
generate-diagrams-proposals: ## Generate diagrams for *.plantuml files in proposals
docker run -v $(ROOT_DIR)/$(DOCS_DIR):/$(DOCS_DIR)$(DOCKER_VOL_OPTS) plantuml/plantuml:$(PLANTUML_VER) /$(DOCS_DIR)/proposals/**/*.plantuml


## --------------------------------------
Expand Down
25 changes: 0 additions & 25 deletions docs/Dockerfile

This file was deleted.

50 changes: 0 additions & 50 deletions docs/Makefile

This file was deleted.

Binary file modified docs/book/src/images/bootstrap-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/bootstrap-provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-admission-cluster-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-admission-machine-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-admission-machineset-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-infra-provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-resource-set-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-topology-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/cluster-topology-reconciller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/control-plane-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/machine-infra-provider.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/machinehealthcheck-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/management-workload-same-cluster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/management-workload-separate-clusters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/runtime-sdk-topology-mutation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/book/src/images/worker-machines-resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/capi-provider-operator/fig1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/capi-provider-operator/fig2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/cluster-class/create.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/cluster-class/update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/cluster-spec-crds/figure1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/cluster-spec-crds/figure2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/proposals/images/clusterctl-redesign/config.png
Binary file modified docs/proposals/images/clusterctl-redesign/init.png
Binary file modified docs/proposals/images/controlplane/controlplane-init-1.png
Binary file modified docs/proposals/images/controlplane/controlplane-init-2.png
Binary file modified docs/proposals/images/controlplane/controlplane-init-3.png
Binary file modified docs/proposals/images/controlplane/controlplane-init-4.png
Binary file modified docs/proposals/images/controlplane/controlplane-init-6.png
Binary file modified docs/proposals/images/controlplane/controlplane-init-7.png
Binary file modified docs/proposals/images/developer/diagram.png
Binary file modified docs/proposals/images/machine-health-check/mhc.png
Binary file modified docs/proposals/images/machine-states-preboot/Figure3.png
Binary file modified docs/proposals/images/machine-states-preboot/Figure4.png
Binary file modified docs/proposals/images/machine-states-preboot/Figure5.png
Binary file modified docs/proposals/images/machine-states-preboot/Figure6.png
Binary file modified docs/proposals/images/machine-states-preboot/Figure7.png
Binary file modified docs/proposals/images/machine-states-preboot/Figure8.png
Binary file modified docs/proposals/images/machinepool-api/figure1.png
Loading