Skip to content

Commit

Permalink
Docs restructuring (#644)
Browse files Browse the repository at this point in the history
* update

* update

* update
  • Loading branch information
karl-johan-grahn committed Apr 26, 2024
1 parent 7cde0e7 commit f0c3b61
Show file tree
Hide file tree
Showing 14 changed files with 136 additions and 15 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/pull_request.yaml
Expand Up @@ -13,12 +13,6 @@ env:
REGISTRY: ghcr.io

jobs:
qa:
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.71
with:
MD_CONFIG: .github/md_config.json
DOC_SRC: README.md docs
MD_LINT_CONFIG: .markdownlint.yaml
build:
runs-on: ubuntu-latest
name: Build
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/pull_request_docs.yaml
@@ -0,0 +1,26 @@
name: Pull Request for Documentation Changes

on:
pull_request_target:
branches:
- master
paths:
- 'README.md'
- 'docs/**'

jobs:
qa:
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.71
with:
MD_CONFIG: .github/md_config.json
DOC_SRC: README.md docs
MD_LINT_CONFIG: .markdownlint.yaml
build:
uses: stakater/.github/.github/workflows/pull_request_container_build.yaml@v0.0.71
with:
DOCKER_FILE_PATH: Dockerfile-docs
secrets:
CONTAINER_REGISTRY_URL: ghcr.io/stakater/docs
CONTAINER_REGISTRY_USERNAME: stakater-user
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.STAKATER_GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
22 changes: 22 additions & 0 deletions .github/workflows/push_docs.yaml
@@ -0,0 +1,22 @@
name: Push Documentation Changes

on:
push:
branches:
- master
paths:
- 'README.md'
- 'docs/**'

jobs:
push:
uses: stakater/.github/.github/workflows/push_container.yaml@v0.0.71
with:
DOCKER_FILE_PATH: Dockerfile-docs
RELEASE_BRANCH: master
secrets:
CONTAINER_REGISTRY_URL: ghcr.io/stakater/docs
CONTAINER_REGISTRY_USERNAME: stakater-user
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.STAKATER_GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}
GH_TOKEN: ${{ secrets.STAKATER_GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -13,3 +13,5 @@ Reloader
!**/chart/reloader
*.tgz
styles/
site/
/mkdocs.yml
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "theme_common"]
path = theme_common
url = git@github.com:stakater/stakater-docs-mkdocs-theme.git
35 changes: 35 additions & 0 deletions Dockerfile-docs
@@ -0,0 +1,35 @@
FROM python:3.12 as builder

# set workdir
RUN mkdir -p $HOME/application
WORKDIR $HOME/application

# copy the entire application
COPY --chown=1001:root . .

RUN pip3 install -r theme_common/requirements.txt

# Combine Theme Resources
RUN python theme_common/scripts/combine_theme_resources.py theme_common/resources theme_override/resources dist/_theme
# Produce mkdocs file
RUN python theme_common/scripts/combine_mkdocs_config_yaml.py theme_common/mkdocs.yml theme_override/mkdocs.yml mkdocs.yml

# build the docs
RUN mkdocs build

FROM nginxinc/nginx-unprivileged:1.25-alpine as deploy
COPY --from=builder $HOME/application/site/ /usr/share/nginx/html/reloader/
COPY docs-nginx.conf /etc/nginx/conf.d/default.conf

# set non-root user
USER 1001

LABEL name="Stakater Reloader Documentation" \
maintainer="Stakater <hello@stakater.com>" \
vendor="Stakater" \
release="1" \
summary="Documentation for Stakater Reloader"

EXPOSE 8080:8080/tcp

CMD ["nginx", "-g", "daemon off;"]
11 changes: 11 additions & 0 deletions docs-nginx.conf
@@ -0,0 +1,11 @@
server {
listen 8080;
root /usr/share/nginx/html/;
index index.html;
error_page 403 404 /404.html;
location = /404.html {
internal;
}
# redirects issued by nginx will be relative
absolute_redirect off;
}
2 changes: 1 addition & 1 deletion docs/How-it-works.md
@@ -1,4 +1,4 @@
# How it works?
# How does Reloader work?

Reloader watches for `ConfigMap` and `Secret` and detects if there are changes in data of these objects. After change detection Reloader performs rolling upgrade on relevant Pods via associated `Deployment`, `Daemonset` and `Statefulset`.

Expand Down
8 changes: 0 additions & 8 deletions docs/features.md

This file was deleted.

12 changes: 12 additions & 0 deletions docs/index.md
@@ -0,0 +1,12 @@
# Introduction

Reloader can watch changes in `ConfigMap` and `Secret` and do rolling upgrades on Pods with their associated `DeploymentConfigs`, `Deployments`, `Daemonsets` `Statefulsets` and `Rollouts`.

These are the key features of Reloader:

1. Restart pod in a `deployment` on change in linked/related configmap's or secret's
1. Restart pod in a `daemonset` on change in linked/related configmap's or secret's
1. Restart pod in a `statefulset` on change in linked/related configmap's or secret's
1. Restart pod in a `rollout` on change in linked/related configmap's or secret's

This site contains more details on how Reloader works. For an overview, please see the repository's [README file](https://github.com/stakater/Reloader/blob/master/README.md).
1 change: 1 addition & 0 deletions theme_common
Submodule theme_common added at f63139
22 changes: 22 additions & 0 deletions theme_override/mkdocs.yml
@@ -0,0 +1,22 @@
site_name: Stakater Reloader
docs_dir: docs
site_url: https://docs.stakater.com/reloader/
repo_url: https://github.com/stakater/reloader
edit_uri: blob/master/docs/

theme:
favicon: assets/images/favicon.svg

nav:
- index.md
- How-to Guides:
- Verify-Reloader-Working.md
- Alerting.md
- Reloader-with-Sealed-Secrets.md
- Helm2-to-Helm3.md
- References:
- How-it-works.md
- Container Build.md
- Comparisons with similar tools:
- Reloader-vs-ConfigmapController.md
- Reloader-vs-k8s-trigger-controller.md
Empty file.
1 change: 1 addition & 0 deletions theme_override/resources/assets/images/favicon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f0c3b61

Please sign in to comment.