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

Adding initial docs infra #118

Merged
merged 2 commits into from
Dec 19, 2024
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ go.work.sum
*.swp
*.swo
*~

# generated docs
site
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,23 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default > dist/install.yaml

##@ Docs

.PHONY: build-docs
build-docs:
docker build --pull -t gaie/mkdocs hack/mkdocs/image
docker run --rm -v ${PWD}:/docs gaie/mkdocs build

.PHONY: build-docs-netlify
build-docs-netlify:
pip install -r hack/mkdocs/image/requirements.txt
mkdocs build

.PHONY: live-docs
live-docs:
docker build -t gaie/mkdocs hack/mkdocs/image
docker run --rm -it -p 3000:3000 -v ${PWD}:/docs gaie/mkdocs

##@ Deployment

ifndef ignore-not-found
Expand Down
26 changes: 26 additions & 0 deletions hack/mkdocs/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.

FROM python:3.13-alpine

COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt

WORKDIR /docs

EXPOSE 3000

COPY entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]
28 changes: 28 additions & 0 deletions hack/mkdocs/image/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# 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 pipefail

CMD=$1

if [ "$CMD" == "build" ];
then
mkdocs build
exit 0;
fi

mkdocs serve --dev-addr=0.0.0.0:3000 --livereload
25 changes: 25 additions & 0 deletions hack/mkdocs/image/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# required for mkdocs-core
jinja2~=3.0
# mkdocs 2.4.1 requires Markdown < 3.4.0
# https://github.com/kubernetes-sigs/gateway-api/pull/1671#issuecomment-1400586465
markdown~=3.7
mkdocs~=1.6
mkdocs-material-extensions~=1.3
pygments~=2.16
pymdown-extensions~=10.2

# Requirements for plugins
babel~=2.10
colorama~=0.4
paginate~=0.5
regex>=2022.4
requests~=2.26

# mkdocs + mkdocs plugins
mkdocs==1.6.1
mkdocs-awesome-pages-plugin==2.9.3
mkdocs-macros-plugin==1.2.0
mkdocs-material==9.5.36
mkdocs-material-extensions==1.3.1
mkdocs-redirects==1.2.1
mkdocs-mermaid2-plugin==1.1.1
72 changes: 72 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
site_name: Kubernetes Gateway API Inference Extension
repo_url: https://github.com/kubernetes-sigs/gateway-api-inference-extension
repo_name: kubernetes-sigs/gateway-api-inference-extension
site_dir: site
docs_dir: site-src
extra_css:
- stylesheets/extra.css
theme:
name: material
icon:
repo: fontawesome/brands/git-alt
logo: images/logo/logo-text-large-horizontal-white.png
favicon: images/k8s-favicon.png
features:
- search.highlight
- navigation.tabs
- navigation.top
- navigation.expand
palette:
primary: custom
custom_dir: site-src/overrides
edit_uri: edit/main/site-src/
plugins:
- search
- awesome-pages
- macros:
include_dir: examples
j2_line_comment_prefix: "#$"
- mermaid2
markdown_extensions:
- admonition
- meta
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.details
- pymdownx.highlight
- pymdownx.inlinehilite
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.snippets
- toc:
permalink: true
- tables
nav:
- Overview:
- Introduction: index.md
- Concepts:
API Overview: concepts/api-overview.md
Conformance: concepts/conformance.md
Roles and Personas: concepts/roles-and-personas.md
Use Cases: concepts/use-cases.md
- Implementations: implementations.md
- FAQ: faq.md
- Glossary: concepts/glossary.md
- Guides:
- User Guides:
- Getting started: guides/index.md
- Implementer's Guide: guides/implementers.md
- Reference:
- API Types:
- InferencePool: api-types/inferencepool.md
- InferenceModel: api-types/inferencemodel.md
- API specification: reference/spec.md
- Enhancements:
- Overview: gieps/overview.md
- Contributing:
- How to Get Involved: contributing/index.md
- Developer Guide: contributing/devguide.md
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# netlify configuration
[build]
publish = "site"
command = "make build-docs-netlify"
# available here https://github.com/netlify/build-image/blob/focal/included_software.md#languages
environment = { PYTHON_VERSION = "3.8" }
6 changes: 6 additions & 0 deletions site-src/.mkdocs-exclude
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.mkdocs-exclude
.nojekyll
.placeholder
search/search_index.json
sitemap.xml.gz
sitemap.xml
14 changes: 14 additions & 0 deletions site-src/api-types/inferencemodel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Inference Model

??? example "Alpha since v0.1.0"

The `InferenceModel` resource is alpha and may have breaking changes in
future releases of the API.

## Background

TODO

## Spec

TODO
14 changes: 14 additions & 0 deletions site-src/api-types/inferencepool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Inference Pool

??? example "Alpha since v0.1.0"

The `InferencePool` resource is alpha and may have breaking changes in
future releases of the API.

## Background

TODO

## Spec

TODO
3 changes: 3 additions & 0 deletions site-src/concepts/api-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# API Overview

TODO
3 changes: 3 additions & 0 deletions site-src/concepts/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Gateway API Glossary

TODO
3 changes: 3 additions & 0 deletions site-src/concepts/roles-and-personas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Roles and Personas

TODO
3 changes: 3 additions & 0 deletions site-src/concepts/use-cases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Use Cases

TODO
3 changes: 3 additions & 0 deletions site-src/contributing/devguide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Developer Guide

TODO
3 changes: 3 additions & 0 deletions site-src/contributing/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# How to Get Involved

TODO
3 changes: 3 additions & 0 deletions site-src/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Frequently Asked Questions (FAQ)

TODO
47 changes: 47 additions & 0 deletions site-src/gieps/giep-116/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# GIEP-116: GIEP template

* Issue: [#0](https://github.com/kubernetes-sigs/gateway-api-inference-extension/issues/116)
* Status: Provisional|Implementable|Experimental|Standard|Deferred|Rejected|Withdrawn|Replaced

(See status definitions [here](overview.md#status).)

## TLDR

(1-2 sentence summary of the proposal)

## Goals

(Primary goals of this proposal.)

## Non-Goals

(What is out of scope for this proposal.)

## Introduction

(Can link to external doc -- but we should bias towards copying
the content into the GEP as online documents are easier to lose
-- e.g. owner messes up the permissions, accidental deletion)

## API

(... details, can point to PR with changes)

## Conformance Details

(This section describes the names to be used for the feature or
features in conformance tests and profiles.

These should be `CamelCase` names that specify the feature as
precisely as possible, and are particularly important for
Extended features, since they may be surfaced to users.)

## Alternatives

(List other design alternatives and why we did not go in that
direction)

## References

(Add any additional document links. Again, we should try to avoid
too much content not in version control to avoid broken links)
32 changes: 32 additions & 0 deletions site-src/gieps/giep-116/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: internal.gateway.networking.k8s.io/v1alpha1
kind: GIEPDetails
number: 116
name: GIEP template
status: Completed
# Any authors who contribute to the GEP in any way should be listed here using
# their Github handle.
authors:
- robscott
relationships:
# obsoletes indicates that a GEP makes the linked GEP obsolete, and completely
# replaces that GEP. The obsoleted GEP MUST have its obsoletedBy field
# set back to this GEP, and MUST be moved to Declined.
obsoletes: {}
obsoletedBy: {}
# extends indicates that a GEP extends the linkned GEP, adding more detail
# or additional implementation. The extended GEP MUST have its extendedBy
# field set back to this GEP.
extends: {}
extendedBy: {}
# seeAlso indicates other GEPs that are relevant in some way without being
# covered by an existing relationship.
seeAlso: {}
# references is a list of hyperlinks to relevant external references.
# It's intended to be used for storing Github discussions, Google docs, etc.
references: {}
# featureNames is a list of the feature names introduced by the GEP, if there
# are any. This will allow us to track which feature was introduced by which GEP.
featureNames: {}
# changelog is a list of hyperlinks to PRs that make changes to the GEP, in
# ascending date order.
changelog: {}
Loading