Skip to content

Commit 67026d8

Browse files
committed
Initial docs infra
1 parent 46cfbf0 commit 67026d8

File tree

7 files changed

+178
-0
lines changed

7 files changed

+178
-0
lines changed

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
bin/*
8+
Dockerfile.cross
9+
# Test binary, built with `go test -c`
10+
*.test
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
# Go workspace file
14+
go.work
15+
go.work.sum
16+
# Kubernetes Generated files - skip generated files, except for vendored files
17+
!vendor/**/zz_generated.*
18+
# editor and IDE paraphernalia
19+
.idea
20+
.vscode
21+
*.swp
22+
*.swo
23+
*~
24+
25+
# generated docs
26+
site

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Setting SHELL to bash allows bash commands to be executed by recipes.
2+
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
3+
SHELL = /usr/bin/env bash -o pipefail
4+
.SHELLFLAGS = -ec
5+
6+
##@Docs
7+
8+
.PHONY: build-docs
9+
build-docs:
10+
docker build --pull -t kube-agentic-net/mkdocs hack/mkdocs/image
11+
docker run --rm -v ${PWD}:/docs kube-agentic-net/mkdocs build
12+
13+
.PHONY: build-docs-netlify
14+
build-docs-netlify:
15+
pip install -r hack/mkdocs/image/requirements.txt
16+
mkdocs build
17+
18+
.PHONY: live-docs
19+
live-docs:
20+
docker build -t kube-agentic-net/mkdocs hack/mkdocs/image
21+
docker run --rm -it -p 3000:3000 -v ${PWD}:/docs kube-agentic-net/mkdocs

hack/mkdocs/image/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2019 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM python:3.13-alpine
16+
17+
COPY requirements.txt /requirements.txt
18+
RUN pip install -r /requirements.txt
19+
20+
WORKDIR /docs
21+
22+
EXPOSE 3000
23+
24+
COPY entrypoint.sh /
25+
26+
ENTRYPOINT ["/entrypoint.sh"]

hack/mkdocs/image/entrypoint.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
# Copyright 2019 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o pipefail
19+
20+
CMD=$1
21+
22+
if [ "$CMD" == "build" ];
23+
then
24+
mkdocs build
25+
exit 0;
26+
fi
27+
28+
mkdocs serve --dev-addr=0.0.0.0:3000 --livereload#!/bin/bash

hack/mkdocs/image/requirements.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# required for mkdocs-core
2+
jinja2~=3.0
3+
# mkdocs 2.4.1 requires Markdown < 3.4.0
4+
# https://github.com/kubernetes-sigs/gateway-api/pull/1671#issuecomment-1400586465
5+
markdown~=3.7
6+
mkdocs~=1.6
7+
mkdocs-material-extensions~=1.3
8+
pygments~=2.16
9+
pymdown-extensions~=10.2
10+
11+
# Requirements for plugins
12+
babel~=2.10
13+
colorama~=0.4
14+
paginate~=0.5
15+
regex>=2022.4
16+
requests~=2.26
17+
18+
# mkdocs + mkdocs plugins
19+
mkdocs==1.6.1
20+
mkdocs-awesome-pages-plugin==2.9.3
21+
mkdocs-macros-plugin==1.2.0
22+
mkdocs-material==9.5.36
23+
mkdocs-material-extensions==1.3.1
24+
mkdocs-redirects==1.2.1
25+
mkdocs-mermaid2-plugin==1.1.1

mkdocs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
site_name: Kubernetes Agentic Networking
2+
repo_url: https://github.com/kubernetes-sigs/kube-agentic-networking
3+
repo_name: kubernetes-sigs/kube-agentic-networking
4+
site_dir: site
5+
docs_dir: site-src
6+
extra_css:
7+
- stylesheets/extra.css
8+
theme:
9+
name: material
10+
icon:
11+
repo: fontawesome/brands/git-alt
12+
logo: images/logo/logo-text-large-horizontal-white.png
13+
favicon: images/k8s-favicon.png
14+
features:
15+
- search.highlight
16+
- navigation.tabs
17+
- navigation.top
18+
- navigation.expand
19+
palette:
20+
primary: custom
21+
edit_uri: edit/main/site-src/
22+
plugins:
23+
- search
24+
- awesome-pages
25+
- macros:
26+
include_dir: examples
27+
j2_line_comment_prefix: "#$"
28+
- mermaid2
29+
markdown_extensions:
30+
- admonition
31+
- meta
32+
- pymdownx.emoji:
33+
emoji_index: !!python/name:material.extensions.emoji.twemoji
34+
emoji_generator: !!python/name:materialx.emoji.to_svg
35+
- pymdownx.details
36+
- pymdownx.highlight
37+
- pymdownx.inlinehilite
38+
- pymdownx.superfences:
39+
custom_fences:
40+
- name: mermaid
41+
class: mermaid
42+
format: !!python/name:pymdownx.superfences.fence_code_format
43+
- pymdownx.snippets
44+
- toc:
45+
permalink: true
46+
- tables

netlify.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# netlify configuration
2+
[build]
3+
publish = "site"
4+
command = "make build-docs-netlify"
5+
# available here https://github.com/netlify/build-image/blob/focal/included_software.md#languages
6+
environment = { PYTHON_VERSION = "3.8" }

0 commit comments

Comments
 (0)