Skip to content

Commit

Permalink
Merge branch 'main' into add-storageClassWhitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-johan-grahn authored Nov 14, 2024
2 parents 4da390b + 4a21800 commit e1a7511
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/closed_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
push:
uses: stakater/.github/.github/workflows/[email protected].98
uses: stakater/.github/.github/workflows/[email protected].103
secrets:
GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/delete_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on: delete

jobs:
delete:
uses: stakater/.github/.github/workflows/[email protected]
uses: stakater/.github/.github/workflows/[email protected]
with:
LATEST_DOC_VERSION: "1.0"
secrets:
GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
16 changes: 8 additions & 8 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ on:

jobs:
doc_qa:
uses: stakater/.github/.github/workflows/[email protected].98
uses: stakater/.github/.github/workflows/[email protected].103
with:
MD_CONFIG: .github/md_config.json
DOC_SRC: content
DOC_SRC: content README.md
MD_LINT_CONFIG: .markdownlint.yaml
deploy_doc:
uses: stakater/.github/.github/workflows/[email protected]
secrets:
GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
build_container:
needs: deploy_doc
if: ${{ github.base_ref == 'main' }}
uses: stakater/.github/.github/workflows/[email protected].98
uses: stakater/.github/.github/workflows/[email protected].103
with:
DOCKER_BUILD_CONTEXTS: content=https://github.com/stakater/mto-docs.git#pull-request-deployments
DOCKER_FILE_PATH: Dockerfile
Expand All @@ -25,8 +30,3 @@ jobs:
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GHCR_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
DOCKER_SECRETS: GIT_AUTH_TOKEN=${{ secrets.PUBLISH_TOKEN }}

deploy_doc:
uses: stakater/.github/.github/workflows/[email protected]
secrets:
GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

jobs:
push:
uses: stakater/.github/.github/workflows/[email protected]
uses: stakater/.github/.github/workflows/[email protected]
with:
LATEST_DOC_VERSION: "1.0"
secrets:
GH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:

jobs:
create_release:
uses: stakater/.github/.github/workflows/[email protected].98
uses: stakater/.github/.github/workflows/[email protected].103
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
build_container:
uses: stakater/.github/.github/workflows/[email protected].98
uses: stakater/.github/.github/workflows/[email protected].103
with:
DOCKER_BUILD_CONTEXTS: content=https://github.com/stakater/mto-docs.git#gh-pages
DOCKER_FILE_PATH: Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion DockerfileLocal
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN pip install -r theme_common/requirements.txt
# RUN pip install -r requirements.txt

# pre-mkbuild step, we are infusing common and local theme changes
RUN python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
RUN python theme_common/scripts/combine_theme_resources.py -s theme_common/resources -ov theme_override/resources -o dist/_theme
RUN python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml

RUN rm -f 'prepare_theme.sh' && \
Expand Down
44 changes: 19 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Multi Tenant Operator Documentation

Documentation for [Multi Tenant Operator](https://www.stakater.com/mto)
This repository contains the source for the documentation for [Multi Tenant Operator](https://www.stakater.com/mto). It is built using [MkDocs](https://github.com/mkdocs/mkdocs) which is based on Python. It is also versioned using [mike](https://github.com/jimporter/mike).

SAAP docs are built using [MkDocs](https://github.com/mkdocs/mkdocs) which is based on Python.
## Latest doc version

Before deploying or deleting a version, make sure to specify the correct latest version in the workflow files.

Make sure the latest doc version is also specified in the versioned branches.

## GitHub Actions

This repository has GitHub action workflow which checks the quality of the documentation and builds the Dockerfile image on Pull Requests. On a push to the main branch, it will create a GitHub release and push the built Dockerfile image to an image repository.
This repository has [GitHub action workflow](./.github/workflows/) which checks the quality of the documentation and builds the [`Dockerfile`](./Dockerfile) image on Pull Requests. On a push to the `main` branch, it will create a GitHub release and push the built image to an image repository.

## How to make changes

It is important to know that you should only make changes in `theme_override` and `content` directory. Also, be mindful of which `mkdocs.yml` file you change since there are more than one such files.
Fork the repository and make a pull request.

For MkDocs overrides, it is important to know that you should only make changes in the [`theme_override`](./theme_override/) and the [`content`](./content/) directory. Also, be mindful of only changing the [`theme_override/mkdocs.yml`](./theme_override/mkdocs.yml) file since there are more than one such file.

## Take update on git submodule

Expand All @@ -20,11 +26,11 @@ This project contains a git submodule and if you wish to take an update on it, y
git submodule update --init --recursive --remote
```

view `.gitmodules` file to see linked git submodules.
View the [`.gitmodules`](./.gitmodules) file to see linked git submodules.

## Build locally

There are at least three options to get fast continuous feedback during local development:
There are at least two options to get fast continuous feedback during local development:

1. Build and run the docs using the Dockerfile image
1. Run the commands locally
Expand Down Expand Up @@ -59,29 +65,25 @@ Then run below script to prepare theme from local and common theme resources. It
./prepare_theme.sh
```

Finally, serve the docs using the built-in web server which is based on Python http server - note that the production build will use Nginx instead:
Finally, serve the docs using the built-in web server which is based on Python http server - note that the production build will use `nginx` instead:

```bash
mkdocs serve
mike serve
```

or

```bash
python3 -m mkdocs serve
```

if you want to make theme changes with live reload, you can use `--watch-theme` with serve like below:

```bash
mkdocs serve --watch-theme
python3 -m mike serve
```

Then, you can make changes in `content` or `dist/_theme` folder. Please note that `dist/_theme` is a build folder and any changes made here will be lost if you do not move them to theme_common or theme_override folder.
Then, you can make changes in `content` or `dist/_theme` folder. Please note that `dist/_theme` is a build folder and any changes made here will be lost if you do not move them to the `theme_common` or the `theme_override` folder.

### QA Checks

Markdown linting:
You can run QA checks locally. They are also run as part of pull request builds.

To run markdown linting:

```bash
brew install markdownlint-cli
Expand All @@ -95,11 +97,3 @@ brew install vale
vale sync
vale content
```

## Use Tilt

Install [Tilt](https://docs.tilt.dev/index.html), then run:

```bash
tilt up
```
2 changes: 1 addition & 1 deletion prepare_theme.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pip install -r theme_common/requirements.txt
python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
python theme_common/scripts/combine_theme_resources.py -s theme_common/resources -ov theme_override/resources -o dist/_theme
python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
6 changes: 6 additions & 0 deletions prepare_theme_pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This script is meant to be used for pull request builds
pip install -r theme_common/requirements.txt
python theme_common/scripts/combine_theme_resources.py -s theme_common/resources -ov theme_override/resources -o dist/_theme
# The next step is used to override resources for pull request builds - these overrides could as well have been put in the local theme_override folder, but this is a generic solution
python theme_common/scripts/combine_theme_resources.py -s theme_common/resources_pr_specific -ov theme_override/resources -o dist/_theme -skiprmtree
python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml
4 changes: 4 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"labels": [
"dependencies"
],
"baseBranches": [
"$default",
"/^[0-9]+\\.[0-9]+$/"
],
"customManagers": [
{
"customType": "regex",
Expand Down

0 comments on commit e1a7511

Please sign in to comment.