Skip to content

Commit

Permalink
Merge pull request #433 from furkatgofurov7/netlify-config
Browse files Browse the repository at this point in the history
 馃摉 Add netlify configuration
  • Loading branch information
k8s-ci-robot committed Feb 26, 2024
2 parents 8a314f3 + 9651083 commit 3e0130f
Show file tree
Hide file tree
Showing 14 changed files with 281 additions and 462 deletions.
21 changes: 16 additions & 5 deletions docs/book/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,30 @@ TOOLS_DIR := $(realpath ../../hack/tools)
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
BIN_DIR := bin
MDBOOK_INSTALL := $(realpath ../../scripts/ci-install-mdbook.sh)
TABULATE := $(TOOLS_BIN_DIR)/mdbook-tabulate
EMBED := $(TOOLS_BIN_DIR)/mdbook-embed
RELEASELINK := $(TOOLS_BIN_DIR)/mdbook-releaselink
MDBOOK := $(TOOLS_BIN_DIR)/bin/mdbook

export PATH := $(abspath $(TOOLS_BIN_DIR)/bin):$(PATH)

# Only set MDBOOK if it's not set as an environment variable
MDBOOK ?= $(TOOLS_BIN_DIR)/bin/mdbook
BOOK_DEPS := $(MDBOOK) $(TABULATE) $(EMBED) $(RELEASELINK)

$(TOOLS_BIN_DIR)/%: $(TOOLS_DIR_DEPS)
make -C $(TOOLS_DIR) $(subst $(TOOLS_DIR)/,,$@)

$(MDBOOK):
$(MDBOOK_INSTALL) 0.4.35 $(TOOLS_BIN_DIR)
$(MDBOOK_INSTALL) 0.4.37 $(TOOLS_BIN_DIR)

.PHONY: serve
serve: $(MDBOOK)
serve: $(BOOK_DEPS) ## Run a local web server with the compiled book
$(MDBOOK) serve

.PHONY: build
build: $(MDBOOK)
build: $(BOOK_DEPS) ## Build the book
$(MDBOOK) build
cp $(ROOT_DIR)/index.yaml book

.PHONY: clean
clean:
rm -rf book
25 changes: 12 additions & 13 deletions docs/book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ src = "src"
title = "Cluster API Operator"
description = "Cluster API Operator"

[preprocessor.toc]
command = "mdbook-toc"
marker = "[[_TOC_]]"

[preprocessor.fs-summary]
# (default: true)
clean-paths = false

# other preprocessors will naturally need to
# run after the summary has been generated
[preprocessor.links]
after = ["fs-summary"]

[output.html]
mathjax-support = true
git-repository-url = "https://github.com/kubernetes-sigs/cluster-api-operator"
git-repository-icon = "fa-github"
site-url = "/cluster-api-operator/"

[output.html.redirect]
"/agenda.html" = "/agenda/2024.html"
"/agenda/2024.html" = "https://docs.google.com/document/d/1-X4TQBLrGrVhUMTZokwaMil94aA-gXqdJj4Sp3Asdps"

[preprocessor.tabulate]
command = "./util-tabulate.sh"

[preprocessor.embed]
command = "./util-embed.sh"

[preprocessor.releaselink]
command = "./util-releaselink.sh"
3 changes: 3 additions & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Introduction](./01_intro.md)
-[Installation](./02_installation/00.md)
- [Plugin](./02_installation/01_plugin.md)
24 changes: 24 additions & 0 deletions docs/book/util-embed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT=$(git rev-parse --show-toplevel)
EMBED=${REPO_ROOT}/hack/tools/bin/mdbook-embed
make "${EMBED}" GOPROXY="${GOPROXY:-"https://proxy.golang.org"}" &>/dev/null
${EMBED} "$@"
24 changes: 24 additions & 0 deletions docs/book/util-releaselink.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT=$(git rev-parse --show-toplevel)
RELEASELINK=${REPO_ROOT}/hack/tools/bin/mdbook-releaselink
make "${RELEASELINK}" GOPROXY="${GOPROXY:-"https://proxy.golang.org"}" &>/dev/null
${RELEASELINK} "$@"
24 changes: 24 additions & 0 deletions docs/book/util-tabulate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail

REPO_ROOT=$(git rev-parse --show-toplevel)
TABULATE=${REPO_ROOT}/hack/tools/bin/mdbook-tabulate
make "${TABULATE}" GOPROXY="${GOPROXY:-"https://proxy.golang.org"}" &>/dev/null
${TABULATE} "$@"
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module sigs.k8s.io/cluster-api-operator

go 1.20

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.0

require (
github.com/MakeNowJust/heredoc v1.0.0
github.com/evanphx/json-patch/v5 v5.7.0
Expand All @@ -23,7 +21,7 @@ require (
k8s.io/component-base v0.28.5
k8s.io/klog/v2 v2.100.1
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/cluster-api v1.6.0
sigs.k8s.io/cluster-api v1.6.1
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/yaml v1.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 h1:trsWhjU5jZrx6UvFu4WzQDrN7Pga4a7Qg+zcfcj64PA=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISXqCDVVcyO8hLn12AKVYYUjM7ftlqsqmrhMZE0=
sigs.k8s.io/cluster-api v1.6.0 h1:2bhVSnUbtWI8taCjd9lGiHExsRUpKf7Z1fXqi/IwYx4=
sigs.k8s.io/cluster-api v1.6.0/go.mod h1:LB7u/WxiWj4/bbpHNOa1oQ8nq0MQ5iYlD0pGfRSBGLI=
sigs.k8s.io/cluster-api v1.6.1 h1:I34p/fwgRlEhs+o9cUhKXDwNNfPS3no0yJsd2bJyQVc=
sigs.k8s.io/cluster-api v1.6.1/go.mod h1:DaxwruDvSaEYq5q6FREDaGzX6UsAVUCA99Sp8vfMHyQ=
sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4=
sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
Expand Down
42 changes: 42 additions & 0 deletions hack/tools/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Directories.
BIN_DIR := bin
BIN_DIR_ABS := $(abspath $(BIN_DIR))
SHARE_DIR := share

MDBOOK_EXTRACT_COMMAND := tar xfvz $(SHARE_DIR)/mdbook.tar.gz -C bin
MDBOOK_ARCHIVE_EXT := .tar.gz

MDBOOK_VERSION := v0.4.5

# Tooling binaries.
$(BIN_DIR):
mkdir -p $@

$(SHARE_DIR):
mkdir -p $@

# Binaries.
MDBOOK := $(BIN_DIR)/mdbook
MDBOOK_SHARE := $(SHARE_DIR)/mdbook$(MDBOOK_ARCHIVE_EXT)
$(MDBOOK): $(BIN_DIR) $(SHARE_DIR)
curl -sL -o $(MDBOOK_SHARE) "https://github.com/rust-lang/mdBook/releases/download/$(MDBOOK_VERSION)/mdBook-$(MDBOOK_VERSION)-x86_64-$(RUST_TARGET)$(MDBOOK_ARCHIVE_EXT)"
$(MDBOOK_EXTRACT_COMMAND)
chmod +x $@
touch -m $@

MDBOOK_EMBED := $(BIN_DIR)/mdbook-embed
$(MDBOOK_EMBED): $(BIN_DIR) go.mod go.sum
go build -tags=tools -o $(BIN_DIR)/mdbook-embed sigs.k8s.io/cluster-api/hack/tools/mdbook/embed

MDBOOK_RELEASELINK := $(BIN_DIR)/mdbook-releaselink
$(MDBOOK_RELEASELINK): $(BIN_DIR) go.mod go.sum
go build -tags=tools -o $(BIN_DIR)/mdbook-releaselink sigs.k8s.io/cluster-api/hack/tools/mdbook/releaselink

MDBOOK_TABULATE := $(BIN_DIR)/mdbook-tabulate
$(MDBOOK_TABULATE): $(BIN_DIR) go.mod go.sum
go build -tags=tools -o $(BIN_DIR)/mdbook-tabulate sigs.k8s.io/cluster-api/hack/tools/mdbook/tabulate

.PHONY: clean
clean: ## Remove all tools
rm -rf bin
rm -rf share
57 changes: 30 additions & 27 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
module sigs.k8s.io/cluster-api-operator/hack/tools

go 1.20
go 1.21

toolchain go1.21.3

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.1

require (
github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46
github.com/joelanford/go-apidiff v0.7.0
github.com/onsi/ginkgo/v2 v2.13.2
gotest.tools/gotestsum v1.11.0
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20230809141950-03ab8cd50a41
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20240116064735-bfe8d0d16ff3
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211110210527-619e6b92dab9
sigs.k8s.io/controller-tools v0.13.0
)
Expand All @@ -17,65 +21,64 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/bitfield/gotestdox v0.2.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/dnephin/pflag v1.0.7 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.11.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/zapr v1.2.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cobra v1.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20220921164117-439092de6870 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/tools v0.16.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.28.0 // indirect
k8s.io/apiextensions-apiserver v0.28.0 // indirect
k8s.io/apimachinery v0.28.0 // indirect
k8s.io/api v0.28.5 // indirect
k8s.io/apiextensions-apiserver v0.28.5 // indirect
k8s.io/apimachinery v0.28.5 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 3e0130f

Please sign in to comment.