mirror of
https://github.com/minio/docs.git
synced 2025-08-05 03:41:24 +03:00
DOCS-1007: Create sync pattern to pull in the CRD during releases (#1025)
Closes #1007
This commit is contained in:
3
Makefile
3
Makefile
@@ -236,6 +236,9 @@ sync-minio-version:
|
|||||||
sync-sdks:
|
sync-sdks:
|
||||||
@(./sync-docs.sh)
|
@(./sync-docs.sh)
|
||||||
|
|
||||||
|
sync-operator-crd:
|
||||||
|
@(./sync-minio-operator-crd.sh)
|
||||||
|
|
||||||
# Can probably safely remove this at some point
|
# Can probably safely remove this at some point
|
||||||
sync-deps:
|
sync-deps:
|
||||||
# C++ and Rust repos do not have any releases yet.
|
# C++ and Rust repos do not have any releases yet.
|
||||||
|
23
README.md
23
README.md
@@ -9,7 +9,7 @@ MinIO uses [Sphinx](https://www.sphinx-doc.org/en/master/index.html) to generate
|
|||||||
- Any GNU/Linux Operating System, or macOS 12.3 or later.
|
- Any GNU/Linux Operating System, or macOS 12.3 or later.
|
||||||
- python 3.10.x and python-pip
|
- python 3.10.x and python-pip
|
||||||
- python3.10-venv
|
- python3.10-venv
|
||||||
- sphinx 4.3.2
|
- sphinx 6.2.1
|
||||||
- nodejs 14.5.0 or later
|
- nodejs 14.5.0 or later
|
||||||
- npm 16.19.1 or later
|
- npm 16.19.1 or later
|
||||||
- `git` or a git-compatible client
|
- `git` or a git-compatible client
|
||||||
@@ -69,6 +69,27 @@ Does the following:
|
|||||||
1. Check that the `build/GITDIR/linux` folder exists
|
1. Check that the `build/GITDIR/linux` folder exists
|
||||||
2. Copies the contents of `build/GITDIR/linux/html/*` to `docs-staging/staging/GITDIR/linux`
|
2. Copies the contents of `build/GITDIR/linux/html/*` to `docs-staging/staging/GITDIR/linux`
|
||||||
|
|
||||||
|
# Syncing Operator CRD Docs
|
||||||
|
|
||||||
|
For importing the Operator CRD Docs specifically, you must have:
|
||||||
|
|
||||||
|
- pandoc (latest stable)
|
||||||
|
- asciidoc (latest stable)
|
||||||
|
|
||||||
|
In addition to all other prerequisites.
|
||||||
|
|
||||||
|
Run
|
||||||
|
|
||||||
|
```
|
||||||
|
make sync-operator-crd
|
||||||
|
```
|
||||||
|
|
||||||
|
This downloads and converts the `tenant-crd.adoc` from the MinIO Operator github repository.
|
||||||
|
It converts it to XML, then to markdown.
|
||||||
|
Finally, it does some `sed` find/replace to tidy up the file for Sphinx ingest.
|
||||||
|
|
||||||
|
You can run this when we have a new Operator release being documented, assuming there are changes to the CRD as part of that release.
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
This project is licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/legalcode). See [CONTRIBUTING.md](https://github.com/minio/docs/tree/master/CONTRIBUTING.md) guide for more information on contributing to the MinIO Documentation project.
|
This project is licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/legalcode). See [CONTRIBUTING.md](https://github.com/minio/docs/tree/master/CONTRIBUTING.md) guide for more information on contributing to the MinIO Documentation project.
|
||||||
|
@@ -370,4 +370,14 @@ figcaption {
|
|||||||
font-size: small;
|
font-size: small;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------------------------
|
||||||
|
// Fixing table issues from asciidoc -> md
|
||||||
|
// ---------------------------------------
|
||||||
|
|
||||||
|
table thead tr.header {
|
||||||
|
background-color: lightgray;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
1603
source/includes/k8s/ext-tenant-crd.md
Normal file
1603
source/includes/k8s/ext-tenant-crd.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -209,6 +209,7 @@ Any file uploaded to ``play`` should be considered public and non-protected.
|
|||||||
MinIO Admin Client <https://min.io/docs/minio/linux/reference/minio-mc-admin.html?ref=docs>
|
MinIO Admin Client <https://min.io/docs/minio/linux/reference/minio-mc-admin.html?ref=docs>
|
||||||
Integrations <https://min.io/docs/minio/linux/integrations/integrations.html?ref=docs>
|
Integrations <https://min.io/docs/minio/linux/integrations/integrations.html?ref=docs>
|
||||||
/reference/kubectl-minio-plugin
|
/reference/kubectl-minio-plugin
|
||||||
|
/reference/operator-crd
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:titlesonly:
|
:titlesonly:
|
||||||
|
21
source/reference/operator-crd.rst
Normal file
21
source/reference/operator-crd.rst
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
.. _minio-operator-crd:
|
||||||
|
|
||||||
|
================================
|
||||||
|
MinIO Custom Resource Definition
|
||||||
|
================================
|
||||||
|
|
||||||
|
.. default-domain:: minio
|
||||||
|
|
||||||
|
.. contents:: Table of Contents
|
||||||
|
:local:
|
||||||
|
:depth: 2
|
||||||
|
|
||||||
|
|
||||||
|
The MinIO Operator installs a :kube-docs:`Custom Resource Definition (CRD) <concepts/extend-kubernetes/api-extension/custom-resources>` that describes a MinIO Tenant object.
|
||||||
|
The Operator uses this CRD for provisioning and managing Tenant resources within a Kubernetes cluster.
|
||||||
|
|
||||||
|
This page documents the CRD reference for use in customizing Operator-deployed Tenants.
|
||||||
|
This documentation assumes familiarity with all referenced Kubernetes concepts, utilities, and procedures.
|
||||||
|
|
||||||
|
.. include:: /includes/k8s/ext-tenant-crd.md
|
||||||
|
:parser: myst_parser.sphinx_
|
@@ -23,6 +23,7 @@ excludes:
|
|||||||
- 'reference/kubectl-minio-plugin/kubectl-minio-tenant-upgrade.rst'
|
- 'reference/kubectl-minio-plugin/kubectl-minio-tenant-upgrade.rst'
|
||||||
- 'reference/kubectl-minio-plugin/kubectl-minio-tenant.rst'
|
- 'reference/kubectl-minio-plugin/kubectl-minio-tenant.rst'
|
||||||
- 'reference/kubectl-minio-plugin/kubectl-minio-version.rst'
|
- 'reference/kubectl-minio-plugin/kubectl-minio-version.rst'
|
||||||
|
- 'reference/operator-crd.rst'
|
||||||
---
|
---
|
||||||
tag: macos
|
tag: macos
|
||||||
excludes:
|
excludes:
|
||||||
@@ -39,6 +40,7 @@ excludes:
|
|||||||
- 'reference/minio-server*'
|
- 'reference/minio-server*'
|
||||||
- 'reference/minio-mc*'
|
- 'reference/minio-mc*'
|
||||||
- 'reference/deprecated/*'
|
- 'reference/deprecated/*'
|
||||||
|
- 'reference/operator-crd.rst'
|
||||||
- 'developers/*'
|
- 'developers/*'
|
||||||
- 'integrations/*'
|
- 'integrations/*'
|
||||||
---
|
---
|
||||||
@@ -67,6 +69,7 @@ excludes:
|
|||||||
- 'reference/minio-server*'
|
- 'reference/minio-server*'
|
||||||
- 'reference/minio-mc*'
|
- 'reference/minio-mc*'
|
||||||
- 'reference/deprecated/*'
|
- 'reference/deprecated/*'
|
||||||
|
- 'reference/operator-crd.rst'
|
||||||
- 'developers/*'
|
- 'developers/*'
|
||||||
- 'integrations/*'
|
- 'integrations/*'
|
||||||
---
|
---
|
||||||
@@ -89,6 +92,7 @@ excludes:
|
|||||||
- 'reference/minio-server*'
|
- 'reference/minio-server*'
|
||||||
- 'reference/minio-mc*'
|
- 'reference/minio-mc*'
|
||||||
- 'reference/deprecated/*'
|
- 'reference/deprecated/*'
|
||||||
|
- 'reference/operator-crd.rst'
|
||||||
- 'developers/*'
|
- 'developers/*'
|
||||||
- 'integrations/*'
|
- 'integrations/*'
|
||||||
---
|
---
|
||||||
|
27
sync-minio-operator-crd.sh
Executable file
27
sync-minio-operator-crd.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
OPERATOR=$(curl --retry 10 -Ls -o /dev/null -w "%{url_effective}" https://github.com/minio/operator/releases/latest | sed "s/https:\/\/github.com\/minio\/operator\/releases\/tag\///" | sed "s/v//");
|
||||||
|
|
||||||
|
curl --retry 10 -Ls https://raw.githubusercontent.com/minio/operator/v${OPERATOR}/docs/tenant_crd.adoc | asciidoc -b docbook - | pandoc -f docbook -t markdown_strict - -o source/includes/k8s/ext-tenant-crd.md
|
||||||
|
|
||||||
|
# To make the include nicer, this strips out the top H1 and reorders all headers thereafter
|
||||||
|
|
||||||
|
KNAME=$(uname -s)
|
||||||
|
case "${KNAME}" in
|
||||||
|
"Darwin")
|
||||||
|
sed -i '' 's%# API Reference%%g' source/includes/k8s/ext-tenant-crd.md
|
||||||
|
sed -i '' 's%minio.min.io/v2%Operator CRD v2 Reference%g' source/includes/k8s/ext-tenant-crd.md
|
||||||
|
sed -i '' 's%k8s-api-github-com-minio-operator-pkg-apis-minio-min-io-v2-%%g' source/includes/k8s/ext-tenant-crd.md
|
||||||
|
sed -i '' 's%# % %g' source/includes/k8s/ext-tenant-crd.md;;
|
||||||
|
*)
|
||||||
|
sed -i 's%# API Reference%%g' source/includes/k8s/ext-tenant-crd.md
|
||||||
|
sed -i 's%minio.min.io/v2%Operator CRD v2 Reference%g' source/includes/k8s/ext-tenant-crd.md
|
||||||
|
sed -i 's%k8s-api-github-com-minio-operator-pkg-apis-minio-min-io-v2-%%g' source/includes/k8s/ext-tenant-crd.md
|
||||||
|
sed -i 's%# % %g' source/includes/k8s/ext-tenant-crd.md;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
Reference in New Issue
Block a user