Skip to content

Commit dfbd612

Browse files
committed
Review Labs
1 parent 757eb47 commit dfbd612

File tree

69 files changed

+4081
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+4081
-348
lines changed

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "Kubernetes Labs Dev Container",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
6+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
7+
"version": "latest",
8+
"helm": "latest",
9+
"minikube": "latest"
10+
},
11+
"ghcr.io/devcontainers/features/python:1": {},
12+
"ghcr.io/devcontainers/features/node:1": {},
13+
"ghcr.io/devcontainers/features/git:1": {}
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"extensions": [
18+
"ms-kubernetes-tools.vscode-kubernetes-tools",
19+
"ms-vscode.vscode-json",
20+
"ms-python.python",
21+
"ms-vscode.vscode-yaml",
22+
"redhat.vscode-yaml",
23+
"ms-vscode-remote.remote-containers"
24+
]
25+
}
26+
},
27+
"postCreateCommand": "curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash ",
28+
"forwardPorts": [
29+
8000
30+
]
31+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and Push DevContainer Image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v3
21+
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Log in to GitHub Container Registry
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ghcr.io
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Build and push Docker image
33+
uses: docker/build-push-action@v5
34+
with:
35+
context: .
36+
file: ./.devcontainer/Dockerfile
37+
platforms: linux/amd64,linux/arm64
38+
push: true
39+
tags: |
40+
ghcr.io/nirgeier/kubernetes-labs:latest
41+
ghcr.io/nirgeier/kubernetes-labs:${{ github.sha }}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# -----------------------------------------------------------------------------
2+
# GitHub Actions Workflow: Deploy MkDocs to GitHub Pages
3+
#
4+
# This workflow automates the process of building and deploying an MkDocs site
5+
# to GitHub Pages using the traditional mkdocs gh-deploy command.
6+
#
7+
# Main Steps:
8+
# 1. Checkout the repository with full history.
9+
# 2. Set up Python environment.
10+
# 3. Install dependencies from requirements.txt.
11+
# 4. Build and deploy the MkDocs documentation site to gh-pages branch.
12+
#
13+
# This approach uses the mkdocs gh-deploy command which handles the GitHub Pages
14+
# deployment automatically without requiring special permissions.
15+
# -----------------------------------------------------------------------------
16+
17+
name: Deploy GitHub Pages
18+
19+
# Event triggers for the workflow
20+
on:
21+
push:
22+
branches:
23+
- main
24+
- master
25+
workflow_dispatch:
26+
27+
# Workflow permissions
28+
permissions:
29+
contents: write
30+
31+
# Concurrency settings
32+
concurrency:
33+
cancel-in-progress: false
34+
group: "pages"
35+
36+
# The deployment job
37+
jobs:
38+
deploy:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Setup Python
48+
uses: actions/setup-python@v5
49+
with:
50+
cache: "pip"
51+
python-version: "3.11"
52+
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install -r mkdocs/requirements.txt
57+
58+
- name: Configure Git
59+
run: |
60+
git config --global user.name "github-actions[bot]"
61+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
62+
63+
- name: Deploy to GitHub Pages
64+
run: |
65+
mkdocs gh-deploy --force --clean --config-file mkdocs.yml --no-history

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,84 @@ kustomize.exe
77
**/logs
88
Labs/22-Rancher/install.txt
99
.DS_Store
10+
mkdocs-site
11+
12+
# Python
13+
__pycache__/
14+
*.py[cod]
15+
*$py.class
16+
*.so
17+
.Python
18+
build/
19+
develop-eggs/
20+
dist/
21+
downloads/
22+
eggs/
23+
.eggs/
24+
lib/
25+
lib64/
26+
parts/
27+
sdist/
28+
var/
29+
wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
*.manifest
35+
*.spec
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
htmlcov/
39+
.tox/
40+
.nox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
*.mo
50+
*.pot
51+
*.log
52+
local_settings.py
53+
db.sqlite3
54+
instance/
55+
.webassets-cache
56+
.scrapy
57+
docs/_build/
58+
target/
59+
.ipynb_checkpoints
60+
profile_default/
61+
ipython_config.py
62+
.python-version
63+
celerybeat-schedule
64+
*.sage.py
65+
.env
66+
.venv
67+
env/
68+
venv/
69+
ENV/
70+
env.bak/
71+
venv.bak/
72+
.spyderproject
73+
.spyproject
74+
.ropeproject
75+
/site
76+
.mypy_cache/
77+
.dmypy.json
78+
dmypy.json
79+
.pyre/
80+
81+
# VSCode
82+
.vscode/
83+
84+
# Virtual environments
85+
.venv/
86+
87+
# Devbox
88+
.devbox/
89+
#devbox.lock
90+
#.devcontainer/

0 commit comments

Comments
 (0)