-
Notifications
You must be signed in to change notification settings - Fork 20
Website #77
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
Merged
Merged
Website #77
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c481559
Website
aliok 71132b0
Address comments
aliok def8c70
Update Go version requirement to 1.25+ in quickstart.md
aliok bc5c1d5
Update introduction.md to clarify storage options and improve securit…
aliok 15468db
Update Python version requirements in README.md and netlify.toml
aliok b2a256f
Update copyright year to 2026 and add license information in some files
aliok f52adf8
Enhance local-serve.sh by enabling pipefail option for improved error…
aliok 211c177
Remove the accidentally checked in file
aliok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| processor: | ||
| # Ignore fields using regex patterns (RE2 syntax) | ||
| ignoreFields: | ||
| - "TypeMeta$" | ||
| - "ObjectMeta$" | ||
| - "ListMeta$" | ||
| # Ignore types matching regex patterns | ||
| ignoreTypes: | ||
| - "()List$" | ||
|
|
||
| render: | ||
| kubernetesVersion: "1.28" | ||
|
|
||
| output: | ||
| markdown: | ||
| outputFile: site-src/reference/index.md | ||
|
|
||
| sourceDirectories: | ||
| - api/v1alpha1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright 2024 The Kubernetes Authors. | ||
|
aliok marked this conversation as resolved.
Outdated
|
||
| # | ||
| # 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 -e | ||
| set -u | ||
| set -o pipefail | ||
|
|
||
| SCRIPT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd) | ||
|
|
||
| cd "${SCRIPT_ROOT}" | ||
|
|
||
| echo "Generating API reference documentation..." | ||
|
|
||
| # Install crd-ref-docs if not present | ||
| if ! command -v crd-ref-docs &> /dev/null; then | ||
| echo "Installing crd-ref-docs..." | ||
| go install github.com/elastic/crd-ref-docs@latest | ||
| fi | ||
|
|
||
| # Generate the API reference documentation | ||
| crd-ref-docs \ | ||
| --source-path=./api/v1alpha1 \ | ||
| --config=./crd-ref-docs.yaml \ | ||
| --renderer=markdown \ | ||
| --output-path=./site-src/reference/index.md | ||
|
|
||
| echo "API reference documentation generated successfully!" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM python:3.13-alpine | ||
|
|
||
| # Install dependencies | ||
| COPY requirements.txt /tmp/ | ||
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | ||
|
|
||
| # Set working directory | ||
| WORKDIR /work | ||
|
|
||
| # Copy entrypoint script | ||
| COPY entrypoint.sh /entrypoint.sh | ||
| RUN chmod +x /entrypoint.sh | ||
|
|
||
| # Expose port for local development | ||
| EXPOSE 3000 | ||
|
|
||
| # Set entrypoint | ||
| ENTRYPOINT ["/entrypoint.sh"] | ||
| CMD ["build"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -e | ||
|
|
||
| # Run mkdocs command | ||
| if [ "$1" = "build" ]; then | ||
| echo "Building MkDocs site..." | ||
| exec python -m mkdocs build | ||
| elif [ "$1" = "serve" ]; then | ||
| echo "Starting MkDocs development server..." | ||
| shift # Remove 'serve' from arguments | ||
| exec python -m mkdocs serve "$@" | ||
| else | ||
| # Run custom command | ||
| exec "$@" | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| mkdocs~=1.6 | ||
| mkdocs-material~=9.5 | ||
| mkdocs-material-extensions~=1.3 | ||
| mkdocs-awesome-pages-plugin~=2.9 | ||
| mkdocs-mermaid2-plugin~=1.1 | ||
| pymdown-extensions~=10.2 | ||
| markdown~=3.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Script to run MkDocs locally using a Python virtual environment | ||
| # This avoids conflicts with system Python on macOS | ||
|
|
||
| set -e | ||
|
aliok marked this conversation as resolved.
|
||
|
|
||
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
| ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." && pwd )" | ||
| VENV_DIR="${ROOT_DIR}/.venv-mkdocs" | ||
|
|
||
| cd "${ROOT_DIR}" | ||
|
|
||
| # Create virtual environment if it doesn't exist | ||
| if [ ! -d "${VENV_DIR}" ]; then | ||
| echo "Creating Python virtual environment..." | ||
| python3 -m venv "${VENV_DIR}" | ||
| fi | ||
|
|
||
| # Activate virtual environment | ||
| echo "Activating virtual environment..." | ||
| source "${VENV_DIR}/bin/activate" | ||
|
|
||
| # Install/upgrade dependencies | ||
| echo "Installing MkDocs dependencies..." | ||
| pip install -q --upgrade pip | ||
| pip install -q -r hack/mkdocs/image/requirements.txt | ||
|
|
||
| # Generate API docs | ||
| echo "Generating API documentation..." | ||
| make api-ref-docs | ||
|
|
||
| # Start MkDocs server | ||
| echo "" | ||
| echo "Starting MkDocs development server..." | ||
| echo "Documentation will be available at: http://127.0.0.1:3000" | ||
| echo "Press Ctrl+C to stop" | ||
| echo "" | ||
|
|
||
| python -m mkdocs serve --dev-addr=127.0.0.1:3000 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| site_name: MCP Lifecycle Operator | ||
| site_url: https://mcp-lifecycle-operator.sigs.k8s.io | ||
| repo_url: https://github.com/kubernetes-sigs/mcp-lifecycle-operator | ||
| repo_name: kubernetes-sigs/mcp-lifecycle-operator | ||
| edit_uri: edit/main/site-src/ | ||
| site_dir: site | ||
| docs_dir: site-src | ||
|
|
||
| theme: | ||
| name: material | ||
| icon: | ||
| repo: fontawesome/brands/github | ||
| logo: images/logo.png | ||
| favicon: images/favicon-64.png | ||
| palette: | ||
| primary: custom | ||
| features: | ||
| - search.highlight | ||
| - navigation.tabs | ||
| - navigation.top | ||
| - navigation.expand | ||
| - content.code.copy | ||
| - content.action.edit | ||
|
|
||
| plugins: | ||
| - search | ||
| - awesome-pages | ||
| - mermaid2 | ||
|
|
||
| markdown_extensions: | ||
| - admonition | ||
| - pymdownx.details | ||
| - pymdownx.superfences: | ||
| custom_fences: | ||
| - name: mermaid | ||
| class: mermaid | ||
| format: !!python/name:pymdownx.superfences.fence_code_format | ||
| - pymdownx.highlight: | ||
| anchor_linenums: true | ||
| line_spans: __span | ||
| pygments_lang_class: true | ||
| - pymdownx.inlinehilite | ||
| - pymdownx.snippets | ||
| - pymdownx.tabbed: | ||
| alternate_style: true | ||
| - pymdownx.emoji: | ||
| emoji_index: !!python/name:material.extensions.emoji.twemoji | ||
| emoji_generator: !!python/name:material.extensions.emoji.to_svg | ||
| - tables | ||
| - toc: | ||
| permalink: true | ||
| - attr_list | ||
| - md_in_html | ||
|
|
||
| extra_css: | ||
| - stylesheets/extra.css | ||
|
|
||
| extra: | ||
| social: | ||
| - icon: fontawesome/brands/github | ||
| link: https://github.com/kubernetes-sigs/mcp-lifecycle-operator | ||
| - icon: fontawesome/brands/slack | ||
| link: https://kubernetes.slack.com/messages/sig-apps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [build] | ||
| publish = "site" | ||
| command = "make build-docs-netlify" | ||
|
|
||
| [build.environment] | ||
| PYTHON_VERSION = "3.8" | ||
|
aliok marked this conversation as resolved.
Outdated
|
||
|
|
||
| [[redirects]] | ||
| from = "/*" | ||
| to = "/index.html" | ||
| status = 200 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| nav: | ||
| - Home: index.md | ||
| - Introduction: introduction.md | ||
| - Guides: guides | ||
| - Reference: reference | ||
| - Contributing: contributing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # MCP Lifecycle Operator Website | ||
|
|
||
| This directory contains the source files for the MCP Lifecycle Operator documentation website. | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| ``` | ||
| site-src/ | ||
| ├── index.md # Landing page | ||
| ├── introduction.md # Introduction and overview | ||
| ├── guides/ # Getting started guides | ||
| │ ├── index.md | ||
| │ └── quickstart.md | ||
| ├── reference/ # API reference documentation | ||
| │ └── index.md # Auto-generated from Go API types | ||
| ├── contributing/ # Contributing guide | ||
| │ └── index.md | ||
| ├── images/ # Image assets | ||
| └── stylesheets/ # Custom CSS | ||
| └── extra.css | ||
| ``` | ||
|
|
||
| ## Building the Website | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Docker (recommended for local development) | ||
| - Python 3.8+ with pip (for Netlify deployment) | ||
|
|
||
| ### Local Development | ||
|
|
||
| **Option 1: Using Docker (recommended for consistency)** | ||
|
|
||
| ```bash | ||
| make live-docs | ||
| ``` | ||
|
|
||
| This will start a development server at http://localhost:3000 | ||
|
|
||
| **Option 2: Using Python virtual environment (faster startup)** | ||
|
|
||
| ```bash | ||
| ./hack/mkdocs/local-serve.sh | ||
| ``` | ||
|
|
||
| This will start a development server at http://127.0.0.1:3000 | ||
|
|
||
| ### Build for Production | ||
|
|
||
| Build the static site: | ||
|
|
||
| ```bash | ||
| make build-docs | ||
| ``` | ||
|
|
||
| The generated site will be in the `site/` directory. | ||
|
|
||
| ### Generate API Documentation | ||
|
|
||
| The API reference documentation is auto-generated from Go source code: | ||
|
|
||
| ```bash | ||
| make api-ref-docs | ||
| ``` | ||
|
|
||
| This creates `site-src/reference/index.md` from the CRD types in `api/v1alpha1/`. | ||
|
|
||
| ## Technology Stack | ||
|
|
||
| - **Static Site Generator**: MkDocs ~1.6 | ||
| - **Theme**: Material for MkDocs ~9.7 | ||
|
aliok marked this conversation as resolved.
Outdated
|
||
| - **Plugins**: | ||
| - `awesome-pages`: Advanced navigation control | ||
| - `mermaid2`: Diagram support | ||
| - `search`: Full-text search | ||
|
|
||
| ## Deployment | ||
|
|
||
| The website is deployed to Netlify automatically when changes are pushed to the main branch. | ||
|
|
||
| Netlify configuration: `netlify.toml` | ||
|
|
||
| ## Making Changes | ||
|
|
||
| 1. Edit content in `site-src/` | ||
| 2. Run `make live-docs` to preview changes | ||
| 3. Commit and push to trigger deployment | ||
|
|
||
| ## Content Guidelines | ||
|
|
||
| - Use Markdown with Material extensions | ||
| - Include code examples where appropriate | ||
| - Add diagrams using Mermaid syntax | ||
| - Keep navigation structure in `.pages` files | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.